1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* camel-imap-store.h : class for an imap store */
5 * Authors: Michael Zucchi <notzed@ximian.com>
7 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
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.
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.
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.
24 #ifndef CAMEL_IMAPX_STORE_H
25 #define CAMEL_IMAPX_STORE_H
27 #include <camel/camel.h>
29 #include "camel-imapx-server.h"
30 #include "camel-imapx-store-summary.h"
31 #include "camel-imapx-conn-manager.h"
33 /* Standard GObject macros */
34 #define CAMEL_TYPE_IMAPX_STORE \
35 (camel_imapx_store_get_type ())
36 #define CAMEL_IMAPX_STORE(obj) \
37 (G_TYPE_CHECK_INSTANCE_CAST \
38 ((obj), CAMEL_TYPE_IMAPX_STORE, CamelIMAPXStore))
39 #define CAMEL_IMAPX_STORE_CLASS(cls) \
40 (G_TYPE_CHECK_CLASS_CAST \
41 ((cls), CAMEL_TYPE_IMAPX_STORE, CamelIMAPXStoreClass))
42 #define CAMEL_IS_IMAPX_STORE(obj) \
43 (G_TYPE_CHECK_INSTANCE_TYPE \
44 ((obj), CAMEL_TYPE_IMAPX_STORE))
45 #define CAMEL_IS_IMAPX_STORE_CLASS(cls) \
46 (G_TYPE_CHECK_CLASS_TYPE \
47 ((cls), CAMEL_TYPE_IMAPX_STORE))
48 #define CAMEL_IMAPX_GET_CLASS(obj) \
49 (G_TYPE_INSTANCE_GET_CLASS \
50 ((obj), CAMEL_TYPE_IMAPX_STORE, CamelIMAPXStoreClass))
54 typedef struct _CamelIMAPXStore CamelIMAPXStore;
55 typedef struct _CamelIMAPXStoreClass CamelIMAPXStoreClass;
56 typedef struct _CamelIMAPXStorePrivate CamelIMAPXStorePrivate;
58 struct _CamelIMAPXStore {
59 CamelOfflineStore parent;
60 CamelIMAPXStorePrivate *priv;
62 CamelIMAPXConnManager *con_man;
63 CamelIMAPXServer *authenticating_server;
65 CamelIMAPXStoreSummary *summary; /* in-memory list of folders */
70 /* Used for syncronizing get_folder_info. Check for re-use of any other lock. At the
71 * moment, could not find anything suitable for this */
72 GMutex *get_finfo_lock;
73 time_t last_refresh_time;
75 /* hash table of UIDs to ignore as recent when updating folder */
76 GHashTable *ignore_recent;
78 /* if we had a login error, what to show to user */
81 GPtrArray *pending_list;
84 struct _CamelIMAPXStoreClass {
85 CamelOfflineStoreClass parent_class;
88 GType camel_imapx_store_get_type (void);
90 camel_imapx_store_get_server (CamelIMAPXStore *store,
91 const gchar *folder_name,
92 GCancellable *cancellable,
94 void camel_imapx_store_op_done (CamelIMAPXStore *istore,
95 CamelIMAPXServer *server,
96 const gchar *folder_name);
100 #endif /* CAMEL_IMAPX_STORE_H */