1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* camel-mbox-store.h : class for an mbox store
3  *
4  * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
5  *
6  * This library is free software: you can redistribute it and/or modify it
7  * under the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation.
9  *
10  * This library is distributed in the hope that it will be useful, but
11  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
12  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
13  * for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public License
16  * along with this library. If not, see <http://www.gnu.org/licenses/>.
17  *
18  */
19 
20 #ifndef CAMEL_LOCAL_STORE_H
21 #define CAMEL_LOCAL_STORE_H
22 
23 #include <camel/camel.h>
24 
25 /* Standard GObject macros */
26 #define CAMEL_TYPE_LOCAL_STORE \
27 	(camel_local_store_get_type ())
28 #define CAMEL_LOCAL_STORE(obj) \
29 	(G_TYPE_CHECK_INSTANCE_CAST \
30 	((obj), CAMEL_TYPE_LOCAL_STORE, CamelLocalStore))
31 #define CAMEL_LOCAL_STORE_CLASS(cls) \
32 	(G_TYPE_CHECK_CLASS_CAST \
33 	((cls), CAMEL_TYPE_LOCAL_STORE, CamelLocalStoreClass))
34 #define CAMEL_IS_LOCAL_STORE(obj) \
35 	(G_TYPE_CHECK_INSTANCE_TYPE \
36 	((obj), CAMEL_TYPE_LOCAL_STORE))
37 #define CAMEL_IS_LOCAL_STORE_CLASS(cls) \
38 	(G_TYPE_CHECK_CLASS_TYPE \
39 	((cls), CAMEL_TYPE_LOCAL_STORE))
40 #define CAMEL_LOCAL_STORE_GET_CLASS(obj) \
41 	(G_TYPE_INSTANCE_GET_CLASS \
42 	((obj), CAMEL_TYPE_LOCAL_STORE, CamelLocalStoreClass))
43 
44 G_BEGIN_DECLS
45 
46 typedef struct _CamelLocalStore CamelLocalStore;
47 typedef struct _CamelLocalStoreClass CamelLocalStoreClass;
48 typedef struct _CamelLocalStorePrivate CamelLocalStorePrivate;
49 
50 struct _CamelLocalStore {
51 	CamelStore parent;
52 	CamelLocalStorePrivate *priv;
53 
54 	gboolean is_main_store;
55 };
56 
57 struct _CamelLocalStoreClass {
58 	CamelStoreClass parent_class;
59 
60 	gchar *		(*get_full_path)	(CamelLocalStore *ls,
61 						 const gchar *full_name);
62 	gchar *		(*get_meta_path)	(CamelLocalStore *ls,
63 						 const gchar *full_name,
64 						 const gchar *ext);
65 
66 	/* Padding for future expansion */
67 	gpointer reserved[20];
68 };
69 
70 GType		camel_local_store_get_type	(void);
71 gboolean	camel_local_store_is_main_store	(CamelLocalStore *store);
72 gchar *		camel_local_store_get_full_path	(CamelLocalStore *store,
73 						 const gchar *full_name);
74 gchar *		camel_local_store_get_meta_path	(CamelLocalStore *store,
75 						 const gchar *full_name,
76 						 const gchar *ext);
77 guint32		camel_local_store_get_folder_type_by_full_name
78 						(CamelLocalStore *store,
79 						 const gchar *full_name);
80 gboolean	camel_local_store_get_need_summary_check
81 						(CamelLocalStore *store);
82 void		camel_local_store_set_need_summary_check
83 						(CamelLocalStore *store,
84 						 gboolean need_summary_check);
85 
86 G_END_DECLS
87 
88 #endif /* CAMEL_LOCAL_STORE_H */
89 
90