1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
3 * Copyright (C) 2002 Ximian Inc.
5 * Authors: Parthasarathi Susarla <sparthasrathi@novell.com>
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.
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.
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.
23 #ifndef _CAMEL_GW_STORE_SUMMARY_H
24 #define _CAMEL_GW_STORE_SUMMARY_H
26 #include <camel/camel-object.h>
27 #include <camel/camel-store-summary.h>
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 ())
35 typedef struct _CamelGroupwiseStoreSummary CamelGroupwiseStoreSummary;
36 typedef struct _CamelGroupwiseStoreSummaryClass CamelGroupwiseStoreSummaryClass;
38 typedef struct _CamelGroupwiseStoreInfo CamelGroupwiseStoreInfo;
41 CAMEL_GW_STORE_INFO_FULL_NAME = CAMEL_STORE_INFO_LAST,
42 CAMEL_GW_STORE_INFO_LAST,
45 struct _CamelGroupwiseStoreInfo {
50 typedef struct _CamelGroupwiseStoreNamespace CamelGroupwiseStoreNamespace;
52 struct _CamelGroupwiseStoreNamespace {
53 char *path; /* display path */
54 char *full_name; /* real name */
55 char sep; /* directory separator */
58 struct _CamelGroupwiseStoreSummary {
59 CamelStoreSummary summary;
61 struct _CamelGroupwiseStoreSummaryPrivate *priv;
64 guint32 version; /* version of base part of file */
66 CamelGroupwiseStoreNamespace *namespace; /* eventually to be a list */
69 struct _CamelGroupwiseStoreSummaryClass {
70 CamelStoreSummaryClass summary_class;
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) ;
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) ;
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) ;
86 #define camel_groupwise_store_info_full_name(s, i) (camel_store_info_string((CamelStoreSummary *)s, (const CamelStoreInfo *)i, CAMEL_STORE_INFO_LAST))
90 #endif /* ! _CAMEL_IMAP_STORE_SUMMARY_H */