Remove build warning
[platform/upstream/libsoup.git] / libsoup / soup-connection.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2000-2003, Ximian, Inc.
4  */
5
6 #ifndef SOUP_CONNECTION_H
7 #define SOUP_CONNECTION_H 1
8
9 #include "soup-types.h"
10 #include "soup-message-private.h"
11 #include "soup-misc.h"
12
13 #include "TIZEN.h"
14
15 G_BEGIN_DECLS
16
17 #define SOUP_TYPE_CONNECTION            (soup_connection_get_type ())
18 #define SOUP_CONNECTION(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), SOUP_TYPE_CONNECTION, SoupConnection))
19 #define SOUP_CONNECTION_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), SOUP_TYPE_CONNECTION, SoupConnectionClass))
20 #define SOUP_IS_CONNECTION(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), SOUP_TYPE_CONNECTION))
21 #define SOUP_IS_CONNECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((obj), SOUP_TYPE_CONNECTION))
22 #define SOUP_CONNECTION_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), SOUP_TYPE_CONNECTION, SoupConnectionClass))
23
24 struct _SoupConnection {
25         GObject parent;
26
27 };
28
29 typedef struct {
30         GObjectClass parent_class;
31
32         /* signals */
33         void (*disconnected)    (SoupConnection *);
34
35 } SoupConnectionClass;
36
37 GType soup_connection_get_type (void);
38
39
40 #define SOUP_CONNECTION_LOCAL_ADDRESS   "local-address"
41 #define SOUP_CONNECTION_REMOTE_URI      "remote-uri"
42 #define SOUP_CONNECTION_PROXY_RESOLVER  "proxy-resolver"
43 #define SOUP_CONNECTION_SSL             "ssl"
44 #define SOUP_CONNECTION_SSL_CREDENTIALS "ssl-creds"
45 #define SOUP_CONNECTION_SSL_STRICT      "ssl-strict"
46 #define SOUP_CONNECTION_SSL_FALLBACK    "ssl-fallback"
47 #define SOUP_CONNECTION_ASYNC_CONTEXT   "async-context"
48 #define SOUP_CONNECTION_USE_THREAD_CONTEXT "use-thread-context"
49 #define SOUP_CONNECTION_TIMEOUT         "timeout"
50 #define SOUP_CONNECTION_IDLE_TIMEOUT    "idle-timeout"
51 #define SOUP_CONNECTION_STATE           "state"
52 #define SOUP_CONNECTION_MESSAGE         "message"
53 //#if ENABLE(TIZEN_TV_CLIENT_CERTIFICATE)
54 #define SOUP_CONNECTION_WIDGET_ENGINE   "widget-engine"
55 //#endif
56
57 void            soup_connection_connect_async    (SoupConnection       *conn,
58                                                   GCancellable         *cancellable,
59                                                   GAsyncReadyCallback   callback,
60                                                   gpointer              user_data);
61 gboolean        soup_connection_connect_finish   (SoupConnection       *conn,
62                                                   GAsyncResult         *result,
63                                                   GError              **error);
64 gboolean        soup_connection_connect_sync     (SoupConnection       *conn,
65                                                   GCancellable         *cancellable,
66                                                   GError              **error);
67 gboolean        soup_connection_start_ssl_sync   (SoupConnection       *conn,
68                                                   GCancellable         *cancellable,
69                                                   GError              **error);
70 void            soup_connection_start_ssl_async  (SoupConnection       *conn,
71                                                   GCancellable         *cancellable,
72                                                   GAsyncReadyCallback   callback,
73                                                   gpointer              user_data);
74 gboolean        soup_connection_start_ssl_finish (SoupConnection       *conn,
75                                                   GAsyncResult         *result,
76                                                   GError              **error);
77
78 void            soup_connection_disconnect     (SoupConnection   *conn);
79
80 SoupSocket     *soup_connection_get_socket     (SoupConnection   *conn);
81 SoupURI        *soup_connection_get_remote_uri (SoupConnection   *conn);
82 SoupURI        *soup_connection_get_proxy_uri  (SoupConnection   *conn);
83 gboolean        soup_connection_is_via_proxy   (SoupConnection   *conn);
84 gboolean        soup_connection_is_tunnelled   (SoupConnection   *conn);
85
86 SoupConnectionState soup_connection_get_state  (SoupConnection   *conn);
87 void                soup_connection_set_state  (SoupConnection   *conn,
88                                                 SoupConnectionState state);
89
90 gboolean        soup_connection_get_ever_used  (SoupConnection   *conn);
91
92 void            soup_connection_send_request   (SoupConnection          *conn,
93                                                 SoupMessageQueueItem    *item,
94                                                 SoupMessageCompletionFn  completion_cb,
95                                                 gpointer                 user_data);
96
97 gboolean        soup_connection_get_ssl_fallback (SoupConnection   *conn);
98
99 #if ENABLE(TIZEN_TV_CREATE_IDLE_TCP_CONNECTION)
100 gboolean              soup_connection_has_current_item (SoupConnection *conn);
101 SoupMessageQueueItem *soup_connection_get_current_item (SoupConnection *conn);
102 void                  soup_connection_set_current_item (SoupConnection *conn, SoupMessageQueueItem *item);
103 void            soup_connection_set_pre_connect_idle (SoupConnection *conn);
104 #endif
105
106 G_END_DECLS
107
108 #endif /* SOUP_CONNECTION_H */