Split camel-imapx library and merge into camel so that providers can be written on...
[platform/upstream/evolution-data-server.git] / camel / camel-imapx-conn-manager.h
1 /*-*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* camel-imap-conn-manager.h
3  *
4  * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
5  *
6  * Authors: Chenthill Palanisamy <pchenthill@novell.com>
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of version 2 of the GNU Lesser General Public
10  * License as published by the Free Software Foundation.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  * GNU Lesser General Public License for more details.
16  *
17  * You should have received a copy of the GNU Lesser General Public License
18  * along with this program; if not, write to the Free Software
19  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  */
21
22 #if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
23 #error "Only <camel/camel.h> can be included directly."
24 #endif
25
26
27 #ifndef _CAMEL_IMAPX_CONN_MANAGER_H
28 #define _CAMEL_IMAPX_CONN_MANAGER_H
29
30 #include "camel-imapx-server.h"
31
32 #define CAMEL_TYPE_IMAPX_CONN_MANAGER \
33         (camel_imapx_conn_manager_get_type ())
34 #define CAMEL_IMAPX_CONN_MANAGER(obj) \
35         (G_TYPE_CHECK_INSTANCE_CAST \
36         ((obj), CAMEL_TYPE_IMAPX_CONN_MANAGER, CamelIMAPXConnManager))
37 #define CAMEL_IMAPX_CONN_MANAGER_CLASS(cls) \
38         (G_TYPE_CHECK_CLASS_CAST \
39         ((cls), CAMEL_TYPE_IMAPX_CONN_MANAGER, CamelIMAPXConnManagerClass))
40 #define CAMEL_IS_IMAPX_CONN_MANAGER(obj) \
41         (G_TYPE_CHECK_INSTANCE_TYPE \
42         ((obj), CAMEL_TYPE_IMAPX_CONN_MANAGER))
43 #define CAMEL_IS_CONN_MANAGER_CLASS(obj) \
44         (G_TYPE_CHECK_CLASS_TYPE \
45         ((cls), CAMEL_TYPE_IMAPX_CONN_MANAGER))
46 #define CAMEL_IMAPX_CONN_MANAGER_GET_CLASS(obj) \
47         (G_TYPE_INSTANCE_GET_CLASS \
48         ((obj), CAMEL_TYPE_IMAPX_CONN_MANAGER, CamelIMAPXConnManagerClass))
49
50 typedef struct _CamelIMAPXConnManager CamelIMAPXConnManager;
51 typedef struct _CamelIMAPXConnManagerClass CamelIMAPXConnManagerClass;
52 typedef struct _CamelIMAPXConnManagerPrivate CamelIMAPXConnManagerPrivate;
53
54 struct _CamelIMAPXConnManager {
55         CamelObject cobject;
56         CamelIMAPXConnManagerPrivate *priv;
57 };
58
59 struct _CamelIMAPXConnManagerClass {
60         CamelObjectClass cclass;
61 };
62
63 GType           camel_imapx_conn_manager_get_type (void);
64 CamelIMAPXConnManager *
65                 camel_imapx_conn_manager_new    (CamelStore *store);
66 CamelStore *    camel_imapx_conn_manager_get_store
67                                                 (CamelIMAPXConnManager *con_man);
68 CamelIMAPXServer *
69                 camel_imapx_conn_manager_get_connection
70                                                 (CamelIMAPXConnManager *con_man,
71                                                  const gchar *folder_name,
72                                                  GCancellable *cancellable,
73                                                  GError **error);
74 void            camel_imapx_conn_manager_close_connections
75                                                 (CamelIMAPXConnManager *con_man);
76 GList *         camel_imapx_conn_manager_get_connections
77                                                 (CamelIMAPXConnManager *con_man);
78 void            camel_imapx_conn_manager_update_con_info
79                                                 (CamelIMAPXConnManager *con_man,
80                                                  CamelIMAPXServer *server,
81                                                  const gchar *folder_name);
82
83 #endif /* _CAMEL_IMAPX_SERVER_H */