1 /*-*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* camel-imap-conn-manager.h
4 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
6 * Authors: Chenthill Palanisamy <pchenthill@novell.com>
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.
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.
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.
22 #ifndef _CAMEL_IMAPX_CONN_MANAGER_H
23 #define _CAMEL_IMAPX_CONN_MANAGER_H
25 #include "camel-imapx-server.h"
29 /* Standard GObject macros */
30 #define CAMEL_TYPE_IMAPX_CONN_MANAGER \
31 (camel_imapx_conn_manager_get_type ())
32 #define CAMEL_IMAPX_CONN_MANAGER(obj) \
33 (G_TYPE_CHECK_INSTANCE_CAST \
34 ((obj), CAMEL_TYPE_IMAPX_CONN_MANAGER, CamelIMAPXConnManager))
35 #define CAMEL_IMAPX_CONN_MANAGER_CLASS(cls) \
36 (G_TYPE_CHECK_CLASS_CAST \
37 ((cls), CAMEL_TYPE_IMAPX_CONN_MANAGER, CamelIMAPXConnManagerClass))
38 #define CAMEL_IS_IMAPX_CONN_MANAGER(obj) \
39 (G_TYPE_CHECK_INSTANCE_TYPE \
40 ((obj), CAMEL_TYPE_IMAPX_CONN_MANAGER))
41 #define CAMEL_IS_IMAPX_CONN_MANAGER_CLASS(cls) \
42 (G_TYPE_CHECK_CLASS_TYPE \
43 ((cls), CAMEL_TYPE_IMAPX_CONN_MANAGER))
44 #define CAMEL_IMAPX_CONN_MANAGER_GET_CLASS(obj) \
45 (G_TYPE_INSTANCE_GET_CLASS \
46 ((obj), CAMEL_TYPE_IMAPX_CONN_MANAGER, CamelIMAPXConnManagerClass))
48 typedef struct _CamelIMAPXConnManager CamelIMAPXConnManager;
49 typedef struct _CamelIMAPXConnManagerClass CamelIMAPXConnManagerClass;
50 typedef struct _CamelIMAPXConnManagerPrivate CamelIMAPXConnManagerPrivate;
52 struct _CamelIMAPXConnManager {
55 CamelIMAPXConnManagerPrivate *priv;
58 struct _CamelIMAPXConnManagerClass {
59 GObjectClass parent_class;
62 void (*mailbox_created) (CamelIMAPXConnManager *con_man,
63 CamelIMAPXMailbox *mailbox);
64 void (*mailbox_renamed) (CamelIMAPXConnManager *con_man,
65 CamelIMAPXMailbox *mailbox,
66 const gchar *oldname);
67 void (*mailbox_updated) (CamelIMAPXConnManager *con_man,
68 CamelIMAPXMailbox *mailbox);
71 GType camel_imapx_conn_manager_get_type (void);
72 CamelIMAPXConnManager *
73 camel_imapx_conn_manager_new (CamelStore *store);
74 CamelStore * camel_imapx_conn_manager_ref_store
75 (CamelIMAPXConnManager *con_man);
77 camel_imapx_conn_manager_get_connection
78 (CamelIMAPXConnManager *con_man,
79 const gchar *folder_name,
80 gboolean for_expensive_job,
81 GCancellable *cancellable,
83 void camel_imapx_conn_manager_close_connections
84 (CamelIMAPXConnManager *con_man);
85 GList * camel_imapx_conn_manager_get_connections
86 (CamelIMAPXConnManager *con_man);
87 void camel_imapx_conn_manager_update_con_info
88 (CamelIMAPXConnManager *con_man,
89 CamelIMAPXServer *server,
90 const gchar *folder_name);
92 camel_imapx_conn_manager_ref_mailbox
93 (CamelIMAPXConnManager *con_man,
94 const gchar *mailbox_name);
98 #endif /* _CAMEL_IMAPX_SERVER_H */