Whitespace cleanups.
[platform/upstream/evolution-data-server.git] / camel / 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
10  * modify it under the terms of version 2 of the GNU Lesser General Public
11  * License as published by the Free Software Foundation.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
16  * General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with this library; if not, write to the
20  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
21  * Boston, MA 02110-1301, USA.
22  */
23
24 #if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
25 #error "Only <camel/camel.h> can be included directly."
26 #endif
27
28 #ifndef CAMEL_IMAPX_STORE_H
29 #define CAMEL_IMAPX_STORE_H
30
31 #include <camel/camel.h>
32
33 #include "camel-imapx-server.h"
34 #include "camel-imapx-store-summary.h"
35 #include "camel-imapx-conn-manager.h"
36
37 /* Standard GObject macros */
38 #define CAMEL_TYPE_IMAPX_STORE \
39         (camel_imapx_store_get_type ())
40 #define CAMEL_IMAPX_STORE(obj) \
41         (G_TYPE_CHECK_INSTANCE_CAST \
42         ((obj), CAMEL_TYPE_IMAPX_STORE, CamelIMAPXStore))
43 #define CAMEL_IMAPX_STORE_CLASS(cls) \
44         (G_TYPE_CHECK_CLASS_CAST \
45         ((cls), CAMEL_TYPE_IMAPX_STORE, CamelIMAPXStoreClass))
46 #define CAMEL_IS_IMAPX_STORE(obj) \
47         (G_TYPE_CHECK_INSTANCE_TYPE \
48         ((obj), CAMEL_TYPE_IMAPX_STORE))
49 #define CAMEL_IS_IMAPX_STORE_CLASS(cls) \
50         (G_TYPE_CHECK_CLASS_TYPE \
51         ((cls), CAMEL_TYPE_IMAPX_STORE))
52 #define CAMEL_IMAPX_GET_CLASS(obj) \
53         (G_TYPE_INSTANCE_GET_CLASS \
54         ((obj), CAMEL_TYPE_IMAPX_STORE, CamelIMAPXStoreClass))
55
56 G_BEGIN_DECLS
57
58 typedef struct _CamelIMAPXStore CamelIMAPXStore;
59 typedef struct _CamelIMAPXStoreClass CamelIMAPXStoreClass;
60 typedef struct _CamelIMAPXStorePrivate CamelIMAPXStorePrivate;
61
62 struct _CamelIMAPXStore {
63         CamelOfflineStore parent;
64         CamelIMAPXStorePrivate *priv;
65
66         CamelIMAPXConnManager *con_man;
67         CamelIMAPXServer *authenticating_server;
68
69         CamelIMAPXStoreSummary *summary; /* in-memory list of folders */
70         gchar dir_sep;
71
72         guint32 rec_options;
73
74         /* Used for syncronizing get_folder_info. Check for re-use of any other lock. At the
75          * moment, could not find anything suitable for this */
76         GMutex *get_finfo_lock;
77         time_t last_refresh_time;
78
79         /* hash table of UIDs to ignore as recent when updating folder */
80         GHashTable *ignore_recent;
81
82         /* if we had a login error, what to show to user */
83         gchar *login_error;
84
85         GPtrArray *pending_list;
86 };
87
88 struct _CamelIMAPXStoreClass {
89         CamelOfflineStoreClass parent_class;
90 };
91
92 GType           camel_imapx_store_get_type      (void);
93 CamelIMAPXServer *
94                 camel_imapx_store_get_server    (CamelIMAPXStore *store,
95                                                 const gchar *folder_name,
96                                                 GCancellable *cancellable,
97                                                 GError **error);
98 void            camel_imapx_store_op_done       (CamelIMAPXStore *istore,
99                                                 CamelIMAPXServer *server,
100                                                 const gchar *folder_name);
101
102 G_END_DECLS
103
104 #endif /* CAMEL_IMAPX_STORE_H */
105