summaryrefslogtreecommitdiff
path: root/camel/providers/mapi/camel-mapi-store.h
blob: 9003d26deb5d149a095b5947f27a47543b3ce93b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/* 
 * Author: 
 *     Johnny Jacob <jjohnny@novell.com>
 *
 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
 *
 * This program is free software; you can redistribute it and/or 
 * modify it under the terms of version 2 of the GNU Lesser General Public 
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
 * USA
 */

#ifndef __CAMEL_MAPI_STORE_H__
#define __CAMEL_MAPI_STORE_H__

#include <camel/camel-store.h>
#include <camel/camel-offline-store.h>
#include <camel-mapi-store-summary.h>
#include <camel/camel-net-utils.h>
#include <camel/camel-i18n.h>

#include <exchange-mapi-folder.h>

#define CAMEL_MAPI_STORE_TYPE     (camel_mapi_store_get_type ())
#define CAMEL_MAPI_STORE(obj)     (CAMEL_CHECK_CAST((obj), CAMEL_MAPI_STORE_TYPE, CamelMapiStore))
#define CAMEL_MAPI_STORE_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_MAPI_STORE_TYPE, CamelMapiStoreClass))
#define CAMEL_IS_MAPI_STORE(o)    (CAMEL_CHECK_TYPE((o), CAMEL_MAPI_STORE_TYPE))

/* TODO : Move this to libcamel. Task when merging */
#define CAMEL_FOLDER_FLAGS_LAST (1<<13)

#define CAMEL_MAPI_FOLDER_PUBLIC (CAMEL_FOLDER_FLAGS_LAST << 1)
#define CAMEL_MAPI_FOLDER_PERSONAL (CAMEL_FOLDER_FLAGS_LAST << 2)
#define CAMEL_MAPI_FOLDER_FORIEGN (CAMEL_FOLDER_FLAGS_LAST << 3)

/**
 * definition of CamelMAPIStore
 */
typedef struct _CamelMapiStore CamelMapiStore;
typedef struct _CamelMapiStoreClass CamelMapiStoreClass;
typedef struct _CamelMapiStorePrivate CamelMapiStorePrivate;

struct _CamelMapiStore{
	CamelOfflineStore parent_object;	

	struct _CamelMapiStoreSummary *summary;
	CamelMapiStorePrivate *priv;
/* 	char			*base_url; */
/* 	CamelURL		*camel_url; */
/* 	CamelFolderInfo		*fi; */
/* 	GHashTable		*folders; */
/* 	GMutex			*folders_lock; */
/* 	GMutex			*connect_lock; */
};




struct _CamelMapiStoreClass {
	CamelOfflineStoreClass		parent_class;
};


/**
 * PROTOTYPES
 */

#ifndef __BEGIN_DECLS
#ifdef __cplusplus
#define __BEGIN_DECLS		extern "C" {
#define __END_DECLS		}
#else
#define __BEGIN_DECLS
#define __END_DECLS
#endif
#endif

__BEGIN_DECLS
/* Standard Camel function */
CamelType camel_mapi_store_get_type(void);
gboolean camel_mapi_store_connected(CamelMapiStore *, CamelException *);

const gchar* camel_mapi_store_folder_id_lookup (CamelMapiStore *mapi_store, const char *folder_name);
const gchar* camel_mapi_store_folder_lookup (CamelMapiStore *mapi_store, const char *folder_id);
const gchar* camel_mapi_store_get_profile_name (CamelMapiStore *mapi_store);

__END_DECLS

#endif /* __CAMEL_OPENCHANGE_STORE_H__ */