~ubuntu-branches/debian/sid/openchange/sid

« back to all changes in this revision

Viewing changes to mapiproxy/libmapistore/backends/mapistore_fsocpf.h

  • Committer: Package Import Robot
  • Author(s): Jelmer Vernooij
  • Date: 2012-04-12 20:07:57 UTC
  • mfrom: (11 sid)
  • mto: This revision was merged to the branch mainline in revision 12.
  • Revision ID: package-import@ubuntu.com-20120412200757-k933d9trljmxj1l4
Tags: 1:1.0-4
* openchangeserver: Add dependency on openchangeproxy.
* Rebuild against newer version of Samba 4.
* Use dpkg-buildflags.
* Migrate to Git, update Vcs-Git header.
* Switch to debhelper 9.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*
2
 
   OpenChange Storage Abstraction Layer library
3
 
   MAPIStore FSOCPF backend
4
 
 
5
 
   OpenChange Project
6
 
 
7
 
   Copyright (C) Julien Kerihuel 2010
8
 
 
9
 
   This program is free software; you can redistribute it and/or modify
10
 
   it under the terms of the GNU General Public License as published by
11
 
   the Free Software Foundation; either version 3 of the License, or
12
 
   (at your option) any later version.
13
 
   
14
 
   This program is distributed in the hope that it will be useful,
15
 
   but WITHOUT ANY WARRANTY; without even the implied warranty of
16
 
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
 
   GNU General Public License for more details.
18
 
   
19
 
   You should have received a copy of the GNU General Public License
20
 
   along with this program.  If not, see <http://www.gnu.org/licenses/>.
21
 
 */
22
 
 
23
 
#ifndef __MAPISTORE_FSOCPF_H
24
 
#define __MAPISTORE_FSOCPF_H
25
 
 
26
 
#define __STDC_FORMAT_MACROS    1
27
 
#include <inttypes.h>
28
 
 
29
 
#include "libocpf/ocpf.h"
30
 
#include "mapiproxy/libmapistore/mapistore_errors.h"
31
 
#include "mapiproxy/libmapistore/mapistore_defs.h"
32
 
#include "mapiproxy/libmapistore/mapistore_common.h"
33
 
#include "mapiproxy/libmapistore/mapistore_backend.h"
34
 
#include <dlinklist.h>
35
 
#include <dirent.h>
36
 
 
37
 
struct fsocpf_folder {
38
 
        DIR                             *dir;
39
 
        char                            *uri;
40
 
};
41
 
 
42
 
struct fsocpf_folder_list {
43
 
        struct fsocpf_folder            *folder;
44
 
        struct fsocpf_folder_list       *next;
45
 
        struct fsocpf_folder_list       *prev;
46
 
};
47
 
 
48
 
struct fsocpf_message {
49
 
        char                            *uri;
50
 
        char                            *folder_uri;
51
 
        uint32_t                        ocpf_context_id;
52
 
        char                            *path;
53
 
};
54
 
 
55
 
struct fsocpf_message_list {
56
 
        struct fsocpf_message           *message;
57
 
        struct fsocpf_message_list      *prev;
58
 
        struct fsocpf_message_list      *next;
59
 
};
60
 
 
61
 
struct fsocpf_context {
62
 
        void                                    *private_data;
63
 
        struct mapistore_backend_context        *mstoredb_ctx;
64
 
        char                                    *login_user;
65
 
        char                                    *username;
66
 
        char                                    *uri;
67
 
        struct fsocpf_folder_list               *folders;
68
 
        struct fsocpf_message_list              *messages;
69
 
        // char                                 *root_uri;
70
 
        DIR                                     *dir;
71
 
};
72
 
 
73
 
 
74
 
struct fsocpf_dflt_folders {
75
 
        enum MAPISTORE_DFLT_FOLDERS     index;
76
 
        const char                      *name;
77
 
};
78
 
 
79
 
const struct fsocpf_dflt_folders dflt_folders[] = {
80
 
        { MDB_ROOT_FOLDER,              "Root" },
81
 
        { MDB_DEFERRED_ACTIONS,         "Deferred Actions" },
82
 
        { MDB_SPOOLER_QUEUE,            "Spooler Queue" },
83
 
        { MDB_TODO_SEARCH,              "TODO Search" },
84
 
        { MDB_IPM_SUBTREE,              "IPM Subtree" },
85
 
        { MDB_INBOX,                    "Inbox" },
86
 
        { MDB_OUTBOX,                   "Outbox" },
87
 
        { MDB_SENT_ITEMS,               "Sent Items" },
88
 
        { MDB_DELETED_ITEMS,            "Deleted Items" },
89
 
        { MDB_COMMON_VIEWS,             "Common Views" },
90
 
        { MDB_SCHEDULE,                 "Schedule" },
91
 
        { MDB_SEARCH,                   "Search" },
92
 
        { MDB_VIEWS,                    "Views" },
93
 
        { MDB_SHORTCUTS,                "Shortcuts" },
94
 
        { MDB_REMINDERS,                "Reminders" },
95
 
        { MDB_CALENDAR,                 "Calendar" },
96
 
        { MDB_CONTACTS,                 "Contacts" },
97
 
        { MDB_JOURNAL,                  "Journal" },
98
 
        { MDB_NOTES,                    "Notes" },
99
 
        { MDB_TASKS,                    "Tasks" },
100
 
        { MDB_DRAFTS,                   "Drafts" },
101
 
        { MDB_TRACKED_MAIL,             "Tracked Mail" },
102
 
        { MDB_SYNC_ISSUES,              "Synchronization Issues" },
103
 
        { MDB_CONFLICTS,                "Conflicts" },
104
 
        { MDB_LOCAL_FAILURES,           "Local Failures" },
105
 
        { MDB_SERVER_FAILURES,          "Server Failures" },
106
 
        { MDB_JUNK_EMAIL,               "Junk Email" },
107
 
        { MDB_RSS_FEEDS,                "RSS Feeds" },
108
 
        { MDB_CONVERSATION_ACT,         "Conversation Actions" },
109
 
        { MDB_CUSTOM,                   NULL }
110
 
};
111
 
 
112
 
__BEGIN_DECLS
113
 
 
114
 
enum MAPISTORE_ERROR    mapistore_init_backend(void);
115
 
 
116
 
__END_DECLS
117
 
 
118
 
#endif /* ! __MAPISTORE_FSOCPF_H */