1/*
2 * Copyright (C) 2012 Igalia S.L.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public License
15 * along with this library; see the file COPYING.LIB.  If not, write to
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 */
19
20#ifndef WebKitSoupRequestGeneric_h
21#define WebKitSoupRequestGeneric_h
22
23#include <glib-object.h>
24#include <libsoup/soup.h>
25
26#if ENABLE(CUSTOM_PROTOCOLS)
27#include "CustomProtocolManagerImpl.h"
28#endif
29
30G_BEGIN_DECLS
31
32#define WEBKIT_TYPE_SOUP_REQUEST_GENERIC            (webkit_soup_request_generic_get_type())
33#define WEBKIT_SOUP_REQUEST_GENERIC(object)         (G_TYPE_CHECK_INSTANCE_CAST((object), WEBKIT_TYPE_SOUP_REQUEST_GENERIC, WebKitSoupRequestGeneric))
34#define WEBKIT_IS_SOUP_REQUEST_GENERIC(object)      (G_TYPE_CHECK_INSTANCE_TYPE((object), WEBKIT_TYPE_SOUP_REQUEST_GENERIC))
35#define WEBKIT_SOUP_REQUEST_GENERIC_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST((klass), WEBKIT_TYPE_SOUP_REQUEST_GENERIC, WebKitSoupRequestGenericClass))
36#define WEBKIT_IS_SOUP_REQUEST_GENERIC_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), WEBKIT_TYPE_SOUP_REQUEST_GENERIC))
37#define WEBKIT_SOUP_REQUEST_GENERIC_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS((obj), WEBKIT_TYPE_SOUP_REQUEST_GENERIC, WebKitSoupRequestGenericClass))
38
39typedef struct _WebKitSoupRequestGeneric WebKitSoupRequestGeneric;
40typedef struct _WebKitSoupRequestGenericClass WebKitSoupRequestGenericClass;
41typedef struct _WebKitSoupRequestGenericPrivate WebKitSoupRequestGenericPrivate;
42
43struct _WebKitSoupRequestGeneric {
44    SoupRequest parent;
45
46    WebKitSoupRequestGenericPrivate *priv;
47};
48
49struct _WebKitSoupRequestGenericClass {
50    SoupRequestClass parent;
51
52#if ENABLE(CUSTOM_PROTOCOLS)
53    WebKit::CustomProtocolManagerImpl* customProtocolManager;
54#endif
55};
56
57GType webkit_soup_request_generic_get_type();
58
59void webkitSoupRequestGenericSetContentLength(WebKitSoupRequestGeneric*, goffset contentLength);
60void webkitSoupRequestGenericSetContentType(WebKitSoupRequestGeneric*, const char* mimeType);
61
62G_END_DECLS
63
64#endif // WebKitSoupRequestGeneric_h
65