Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / camel / providers / groupwise / camel-groupwise-store.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /* camel-groupwise-store.h : class for an groupwise store */
3
4 /* 
5  * Authors: Sivaiah Nallagatla <snallagatla@novell.com>
6  *
7  * Copyright (C) 2004 Novell, Inc.
8  *
9  * This program 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
16  * GNU Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
21  * USA
22  */
23
24
25 #ifndef CAMEL_GROUPWISE_STORE_H
26 #define CAMEL_GROUPWISE_STORE_H 1
27
28 #include <camel/camel-store.h>
29 #include <camel/camel-offline-store.h>
30 #include "camel-groupwise-store-summary.h"
31
32 #include <e-gw-connection.h>
33 #include <e-gw-container.h>
34
35 #define CAMEL_GROUPWISE_STORE_TYPE     (camel_groupwise_store_get_type ())
36 #define CAMEL_GROUPWISE_STORE(obj)     (CAMEL_CHECK_CAST((obj), CAMEL_GROUPWISE_STORE_TYPE, CamelGroupwiseStore))
37 #define CAMEL_GROUPWISE_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_GROUPWISE_STORE_TYPE, CamelGroupwiseStoreClass))
38 #define CAMEL_IS_GROUPWISE_STORE(o)    (CAMEL_CHECK_TYPE((o), CAMEL_GROUPWISE_STORE_TYPE))
39
40 #define GW_PARAM_FILTER_INBOX           (1 << 0)
41
42 G_BEGIN_DECLS
43
44 typedef struct _CamelGroupwiseStore CamelGroupwiseStore;
45 typedef struct _CamelGroupwiseStoreClass CamelGroupwiseStoreClass;
46 typedef struct _CamelGroupwiseStorePrivate CamelGroupwiseStorePrivate;
47
48 struct _CamelGroupwiseStore {
49         CamelOfflineStore parent_object;
50
51         struct _CamelGroupwiseStoreSummary *summary;
52
53         char *root_container;
54         CamelGroupwiseStorePrivate *priv;
55         CamelFolder *current_folder;
56         
57         /* the parameters field is not to be included not. probably for 2.6*/
58         /*guint32 parameters;*/
59         time_t refresh_stamp;
60         guint list_loaded;
61 };
62
63
64 struct _CamelGroupwiseStoreClass {
65         CamelOfflineStoreClass parent_class;
66 };
67
68
69 /* Standard Camel function */
70 CamelType camel_groupwise_store_get_type (void);
71 char * groupwise_get_name(CamelService *service, gboolean brief);
72
73 /*IMplemented*/
74 const char *camel_groupwise_store_container_id_lookup (CamelGroupwiseStore *gw_store, const char *folder_name);
75 const char *camel_groupwise_store_folder_lookup (CamelGroupwiseStore *gw_store, const char *container_id);
76 EGwConnection *cnc_lookup (CamelGroupwiseStorePrivate *priv);
77 char *storage_path_lookup (CamelGroupwiseStorePrivate *priv);
78 const char *groupwise_base_url_lookup (CamelGroupwiseStorePrivate *priv);
79 CamelFolderInfo * create_junk_folder (CamelStore *store);
80 gboolean camel_groupwise_store_connected (CamelGroupwiseStore *store, CamelException *ex);
81 void gw_store_reload_folder (CamelGroupwiseStore *store, CamelFolder *folder, guint32 flags, CamelException *ex);
82
83 G_END_DECLS
84
85 #endif /* CAMEL_GROUPWISE_STORE_H */