Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / camel / providers / groupwise / camel-groupwise-store-summary.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  * Copyright (C) 2002 Ximian Inc.
4  *
5  * Authors: Parthasarathi Susarla <sparthasrathi@novell.com>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of version 2 of the GNU Lesser General Public
9  * License as published by the Free Software Foundation.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14  * General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this program; if not, write to the
18  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  */
21
22
23 #ifndef _CAMEL_GW_STORE_SUMMARY_H
24 #define _CAMEL_GW_STORE_SUMMARY_H
25
26 #include <camel/camel-object.h>
27 #include <camel/camel-store-summary.h>
28
29 #define CAMEL_GW_STORE_SUMMARY(obj)         CAMEL_CHECK_CAST (obj, camel_groupwise_store_summary_get_type (), CamelGroupwiseStoreSummary)
30 #define CAMEL_GW_STORE_SUMMARY_CLASS(klass) CAMEL_CHECK_CLASS_CAST (klass, camel_groupwise_store_summary_get_type (), CamelGroupwiseStoreSummaryClass)
31 #define CAMEL_IS_GW_STORE_SUMMARY(obj)      CAMEL_CHECK_TYPE (obj, camel_groupwise_store_summary_get_type ())
32
33 G_BEGIN_DECLS
34
35 typedef struct _CamelGroupwiseStoreSummary      CamelGroupwiseStoreSummary;
36 typedef struct _CamelGroupwiseStoreSummaryClass CamelGroupwiseStoreSummaryClass;
37
38 typedef struct _CamelGroupwiseStoreInfo CamelGroupwiseStoreInfo;
39
40 enum {
41         CAMEL_GW_STORE_INFO_FULL_NAME = CAMEL_STORE_INFO_LAST,
42         CAMEL_GW_STORE_INFO_LAST,
43 };
44
45 struct _CamelGroupwiseStoreInfo {
46         CamelStoreInfo info;
47         char *full_name;
48 };
49
50 typedef struct _CamelGroupwiseStoreNamespace CamelGroupwiseStoreNamespace;
51
52 struct _CamelGroupwiseStoreNamespace {
53         char *path;             /* display path */
54         char *full_name;        /* real name */
55         char sep;               /* directory separator */
56 };
57
58 struct _CamelGroupwiseStoreSummary {
59         CamelStoreSummary summary;
60
61         struct _CamelGroupwiseStoreSummaryPrivate *priv;
62
63         /* header info */
64         guint32 version;        /* version of base part of file */
65         guint32 capabilities;
66         CamelGroupwiseStoreNamespace *namespace; /* eventually to be a list */
67 };
68
69 struct _CamelGroupwiseStoreSummaryClass {
70         CamelStoreSummaryClass summary_class;
71 };
72
73 CamelType                        camel_groupwise_store_summary_get_type      (void);
74 CamelGroupwiseStoreSummary      *camel_groupwise_store_summary_new        (void);
75 CamelGroupwiseStoreInfo *camel_groupwise_store_summary_full_name(CamelGroupwiseStoreSummary *s, const char *full_name) ;
76 CamelGroupwiseStoreInfo *camel_groupwise_store_summary_add_from_full(CamelGroupwiseStoreSummary *s, const char *full, char dir_sep) ;
77
78 char *camel_groupwise_store_summary_full_to_path(CamelGroupwiseStoreSummary *s, const char *full_name, char dir_sep) ;
79 char *camel_groupwise_store_summary_path_to_full(CamelGroupwiseStoreSummary *s, const char *path, char dir_sep) ;
80 char *camel_groupwise_store_summary_full_from_path(CamelGroupwiseStoreSummary *s, const char *path) ;
81
82 CamelGroupwiseStoreNamespace *camel_groupwise_store_summary_namespace_new(CamelGroupwiseStoreSummary *s, const char *full_name, char dir_sep) ;
83 CamelGroupwiseStoreNamespace *camel_groupwise_store_summary_namespace_find_path(CamelGroupwiseStoreSummary *s, const char *path) ;
84 void camel_groupwise_store_summary_namespace_set(CamelGroupwiseStoreSummary *s, CamelGroupwiseStoreNamespace *ns) ;
85
86 #define camel_groupwise_store_info_full_name(s, i) (camel_store_info_string((CamelStoreSummary *)s, (const CamelStoreInfo *)i, CAMEL_STORE_INFO_LAST))
87
88 G_END_DECLS
89
90 #endif /* ! _CAMEL_IMAP_STORE_SUMMARY_H */