Extending test-client-custom-summary to try e_book_client_get_contacts_uids()
[platform/upstream/evolution-data-server.git] / camel / camel-network-service.h
1 /*
2  * camel-network-service.h
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) version 3.
8  *
9  * This program 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  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with the program; if not, see <http://www.gnu.org/licenses/>
16  *
17  */
18
19 #if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
20 #error "Only <camel/camel.h> can be included directly."
21 #endif
22
23 #ifndef CAMEL_NETWORK_SERVICE_H
24 #define CAMEL_NETWORK_SERVICE_H
25
26 #include <camel/camel-enums.h>
27 #include <camel/camel-network-settings.h>
28 #include <camel/camel-stream.h>
29
30 /* Standard GObject macros */
31 #define CAMEL_TYPE_NETWORK_SERVICE \
32         (camel_network_service_get_type ())
33 #define CAMEL_NETWORK_SERVICE(obj) \
34         (G_TYPE_CHECK_INSTANCE_CAST \
35         ((obj), CAMEL_TYPE_NETWORK_SERVICE, CamelNetworkService))
36 #define CAMEL_NETWORK_SERVICE_INTERFACE(cls) \
37         (G_TYPE_CHECK_CLASS_CAST \
38         ((cls), CAMEL_TYPE_NETWORK_SERVICE, CamelNetworkServiceInterface))
39 #define CAMEL_IS_NETWORK_SERVICE(obj) \
40         (G_TYPE_CHECK_INSTANCE_TYPE \
41         ((obj), CAMEL_TYPE_NETWORK_SERVICE))
42 #define CAMEL_IS_NETWORK_SERVICE_INTERFACE(cls) \
43         (G_TYPE_CHECK_CLASS_TYPE \
44         ((cls), CAMEL_TYPE_NETWORK_SERVICE))
45 #define CAMEL_NETWORK_SERVICE_GET_INTERFACE(obj) \
46         (G_TYPE_INSTANCE_GET_INTERFACE \
47         ((obj), CAMEL_TYPE_NETWORK_SERVICE, CamelNetworkServiceInterface))
48
49 G_BEGIN_DECLS
50
51 /**
52  * CamelNetworkService:
53  *
54  * Since: 3.2
55  **/
56 typedef struct _CamelNetworkService CamelNetworkService;
57 typedef struct _CamelNetworkServiceInterface CamelNetworkServiceInterface;
58
59 struct _CamelNetworkServiceInterface {
60         GTypeInterface parent_interface;
61
62         const gchar *   (*get_service_name)
63                                         (CamelNetworkService *service,
64                                          CamelNetworkSecurityMethod method);
65         guint16         (*get_default_port)
66                                         (CamelNetworkService *service,
67                                          CamelNetworkSecurityMethod method);
68
69         CamelStream *   (*connect_sync) (CamelNetworkService *service,
70                                          GCancellable *cancellable,
71                                          GError **error);
72
73         gpointer reserved[16];
74 };
75
76 GType           camel_network_service_get_type  (void) G_GNUC_CONST;
77 const gchar *   camel_network_service_get_service_name
78                                         (CamelNetworkService *service,
79                                          CamelNetworkSecurityMethod method);
80 guint16         camel_network_service_get_default_port
81                                         (CamelNetworkService *service,
82                                          CamelNetworkSecurityMethod method);
83 CamelStream *   camel_network_service_connect_sync
84                                         (CamelNetworkService *service,
85                                          GCancellable *cancellable,
86                                          GError **error);
87
88 G_END_DECLS
89
90 #endif /* CAMEL_NETWORK_SERVICE_H */