changes: Bump to 3.8.1
[platform/upstream/evolution-data-server.git] / libedataserver / e-source-proxy.h
1 /*
2  * e-source-proxy.h
3  *
4  * This library is free software you can redistribute it and/or modify it
5  * under the terms of the GNU Lesser General Public License as published by
6  * the Free Software Foundation.
7  *
8  * This library is distributed in the hope that it will be useful, but
9  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
10  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
11  * for more details.
12  *
13  * You should have received a copy of the GNU Lesser General Public License
14  * along with this library; if not, see <http://www.gnu.org/licenses/>.
15  *
16  */
17
18 #if !defined (__LIBEDATASERVER_H_INSIDE__) && !defined (LIBEDATASERVER_COMPILATION)
19 #define "Only <libedataserver/libedataserver.h> should be included directly."
20 #endif
21
22 #ifndef E_SOURCE_PROXY_H
23 #define E_SOURCE_PROXY_H
24
25 #include <libedataserver/e-source-enums.h>
26 #include <libedataserver/e-source-extension.h>
27
28 /* Standard GObject macros */
29 #define E_TYPE_SOURCE_PROXY \
30         (e_source_proxy_get_type ())
31 #define E_SOURCE_PROXY(obj) \
32         (G_TYPE_CHECK_INSTANCE_CAST \
33         ((obj), E_TYPE_SOURCE_PROXY, ESourceProxy))
34 #define E_SOURCE_PROXY_CLASS(cls) \
35         (G_TYPE_CHECK_CLASS_CAST \
36         ((cls), E_TYPE_SOURCE_PROXY, ESourceProxyClass))
37 #define E_IS_SOURCE_PROXY(obj) \
38         (G_TYPE_CHECK_INSTANCE_TYPE \
39         ((obj), E_TYPE_SOURCE_PROXY))
40 #define E_IS_SOURCE_PROXY_CLASS(cls) \
41         (G_TYPE_CHECK_CLASS_TYPE \
42         ((cls), E_TYPE_SOURCE_PROXY))
43 #define E_SOURCE_PROXY_GET_CLASS(obj) \
44         (G_TYPE_INSTANCE_GET_CLASS \
45         ((obj), E_TYPE_SOURCE_PROXY, ESourceProxyClass))
46
47 /**
48  * E_SOURCE_EXTENSION_PROXY:
49  *
50  * Pass this extension name to e_source_get_extension() to access
51  * #ESourceProxy.  This is also used as a group name in key files.
52  *
53  * Since: 3.12
54  **/
55 #define E_SOURCE_EXTENSION_PROXY "Proxy"
56
57 G_BEGIN_DECLS
58
59 typedef struct _ESourceProxy ESourceProxy;
60 typedef struct _ESourceProxyClass ESourceProxyClass;
61 typedef struct _ESourceProxyPrivate ESourceProxyPrivate;
62
63 /**
64  * ESourceProxy:
65  *
66  * Contains only private data that should be read and manipulated using the
67  * functions below.
68  *
69  * Since: 3.12
70  **/
71 struct _ESourceProxy {
72         ESourceExtension parent;
73         ESourceProxyPrivate *priv;
74 };
75
76 struct _ESourceProxyClass {
77         ESourceExtensionClass parent_class;
78 };
79
80 GType           e_source_proxy_get_type         (void) G_GNUC_CONST;
81 EProxyMethod    e_source_proxy_get_method       (ESourceProxy *extension);
82 void            e_source_proxy_set_method       (ESourceProxy *extension,
83                                                  EProxyMethod method);
84 const gchar *   e_source_proxy_get_autoconfig_url
85                                                 (ESourceProxy *extension);
86 gchar *         e_source_proxy_dup_autoconfig_url
87                                                 (ESourceProxy *extension);
88 void            e_source_proxy_set_autoconfig_url
89                                                 (ESourceProxy *extension,
90                                                  const gchar *autoconfig_url);
91 const gchar * const *
92                 e_source_proxy_get_ignore_hosts (ESourceProxy *extension);
93 gchar **        e_source_proxy_dup_ignore_hosts (ESourceProxy *extension);
94 void            e_source_proxy_set_ignore_hosts (ESourceProxy *extension,
95                                                  const gchar * const *ignore_hosts);
96 const gchar *   e_source_proxy_get_ftp_host     (ESourceProxy *extension);
97 gchar *         e_source_proxy_dup_ftp_host     (ESourceProxy *extension);
98 void            e_source_proxy_set_ftp_host     (ESourceProxy *extension,
99                                                  const gchar *ftp_host);
100 guint16         e_source_proxy_get_ftp_port     (ESourceProxy *extension);
101 void            e_source_proxy_set_ftp_port     (ESourceProxy *extension,
102                                                  guint16 ftp_port);
103 const gchar *   e_source_proxy_get_http_host    (ESourceProxy *extension);
104 gchar *         e_source_proxy_dup_http_host    (ESourceProxy *extension);
105 void            e_source_proxy_set_http_host    (ESourceProxy *extension,
106                                                  const gchar *http_host);
107 guint16         e_source_proxy_get_http_port    (ESourceProxy *extension);
108 void            e_source_proxy_set_http_port    (ESourceProxy *extension,
109                                                  guint16 http_port);
110 gboolean        e_source_proxy_get_http_use_auth
111                                                 (ESourceProxy *extension);
112 void            e_source_proxy_set_http_use_auth
113                                                 (ESourceProxy *extension,
114                                                  gboolean http_use_auth);
115 const gchar *   e_source_proxy_get_http_auth_user
116                                                 (ESourceProxy *extension);
117 gchar *         e_source_proxy_dup_http_auth_user
118                                                 (ESourceProxy *extension);
119 void            e_source_proxy_set_http_auth_user
120                                                 (ESourceProxy *extension,
121                                                  const gchar *http_auth_user);
122 const gchar *   e_source_proxy_get_http_auth_password
123                                                 (ESourceProxy *extension);
124 gchar *         e_source_proxy_dup_http_auth_password
125                                                 (ESourceProxy *extension);
126 void            e_source_proxy_set_http_auth_password
127                                                 (ESourceProxy *extension,
128                                                  const gchar *http_auth_password);
129 const gchar *   e_source_proxy_get_https_host   (ESourceProxy *extension);
130 gchar *         e_source_proxy_dup_https_host   (ESourceProxy *extension);
131 void            e_source_proxy_set_https_host   (ESourceProxy *extension,
132                                                  const gchar *https_host);
133 guint16         e_source_proxy_get_https_port   (ESourceProxy *extension);
134 void            e_source_proxy_set_https_port   (ESourceProxy *extension,
135                                                  guint16 https_port);
136 const gchar *   e_source_proxy_get_socks_host   (ESourceProxy *extension);
137 gchar *         e_source_proxy_dup_socks_host   (ESourceProxy *extension);
138 void            e_source_proxy_set_socks_host   (ESourceProxy *extension,
139                                                  const gchar *socks_host);
140 guint16         e_source_proxy_get_socks_port   (ESourceProxy *extension);
141 void            e_source_proxy_set_socks_port   (ESourceProxy *extension,
142                                                  guint16 socks_port);
143
144 gchar **        e_source_proxy_lookup_sync      (ESource *source,
145                                                  const gchar *uri,
146                                                  GCancellable *cancellable,
147                                                  GError **error);
148 void            e_source_proxy_lookup           (ESource *source,
149                                                  const gchar *uri,
150                                                  GCancellable *cancellable,
151                                                  GAsyncReadyCallback callback,
152                                                  gpointer user_data);
153 gchar **        e_source_proxy_lookup_finish    (ESource *source,
154                                                  GAsyncResult *result,
155                                                  GError **error);
156
157 G_END_DECLS
158
159 #endif /* E_SOURCE_PROXY_H */
160