0da0b169fe13ea67cfdf75d164e1e112192980c4
[platform/upstream/evolution-data-server.git] / camel / providers / imapx / camel-imapx-store.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* camel-imap-store.h : class for an imap store */
3
4 /*
5  * Authors: Michael Zucchi <notzed@ximian.com>
6  *
7  * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
8  *
9  * This library is free software; you can redistribute it and/or modify it
10  * under the terms of the GNU Lesser General Public License as published by
11  * the Free Software Foundation.
12  *
13  * This library is distributed in the hope that it will be useful, but
14  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
15  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
16  * for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this library; if not, see <http://www.gnu.org/licenses/>.
20  */
21
22 #ifndef CAMEL_IMAPX_STORE_H
23 #define CAMEL_IMAPX_STORE_H
24
25 #include <camel/camel.h>
26
27 #include "camel-imapx-server.h"
28
29 /* Standard GObject macros */
30 #define CAMEL_TYPE_IMAPX_STORE \
31         (camel_imapx_store_get_type ())
32 #define CAMEL_IMAPX_STORE(obj) \
33         (G_TYPE_CHECK_INSTANCE_CAST \
34         ((obj), CAMEL_TYPE_IMAPX_STORE, CamelIMAPXStore))
35 #define CAMEL_IMAPX_STORE_CLASS(cls) \
36         (G_TYPE_CHECK_CLASS_CAST \
37         ((cls), CAMEL_TYPE_IMAPX_STORE, CamelIMAPXStoreClass))
38 #define CAMEL_IS_IMAPX_STORE(obj) \
39         (G_TYPE_CHECK_INSTANCE_TYPE \
40         ((obj), CAMEL_TYPE_IMAPX_STORE))
41 #define CAMEL_IS_IMAPX_STORE_CLASS(cls) \
42         (G_TYPE_CHECK_CLASS_TYPE \
43         ((cls), CAMEL_TYPE_IMAPX_STORE))
44 #define CAMEL_IMAPX_STORE_GET_CLASS(obj) \
45         (G_TYPE_INSTANCE_GET_CLASS \
46         ((obj), CAMEL_TYPE_IMAPX_STORE, CamelIMAPXStoreClass))
47
48 G_BEGIN_DECLS
49
50 typedef struct _CamelIMAPXStore CamelIMAPXStore;
51 typedef struct _CamelIMAPXStoreClass CamelIMAPXStoreClass;
52 typedef struct _CamelIMAPXStorePrivate CamelIMAPXStorePrivate;
53
54 struct _CamelIMAPXStore {
55         CamelOfflineStore parent;
56         CamelIMAPXStorePrivate *priv;
57
58         CamelStoreSummary *summary; /* in-memory list of folders */
59 };
60
61 struct _CamelIMAPXStoreClass {
62         CamelOfflineStoreClass parent_class;
63 };
64
65 GType           camel_imapx_store_get_type      (void);
66 CamelIMAPXServer *
67                 camel_imapx_store_ref_server    (CamelIMAPXStore *store,
68                                                  const gchar *folder_name,
69                                                  gboolean for_expensive_job,
70                                                  GCancellable *cancellable,
71                                                  GError **error);
72 void            camel_imapx_store_set_connecting_server
73                                                 (CamelIMAPXStore *store,
74                                                  CamelIMAPXServer *server);
75 void            camel_imapx_store_folder_op_done
76                                                 (CamelIMAPXStore *store,
77                                                  CamelIMAPXServer *server,
78                                                  const gchar *folder_name);
79 CamelFolderQuotaInfo *
80                 camel_imapx_store_dup_quota_info
81                                                 (CamelIMAPXStore *store,
82                                                  const gchar *quota_root_name);
83 void            camel_imapx_store_set_quota_info
84                                                 (CamelIMAPXStore *store,
85                                                  const gchar *quota_root_name,
86                                                  const CamelFolderQuotaInfo *info);
87
88 G_END_DECLS
89
90 #endif /* CAMEL_IMAPX_STORE_H */
91