Fix FSF address (Tobias Mueller, #470445)
[platform/upstream/evolution-data-server.git] / camel / providers / groupwise / camel-groupwise-journal.h
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3  *  Authors: Jeffrey Stedfast <fejj@novell.com>
4  *
5  *  Copyright 2004 Novell, Inc. (www.novell.com)
6  *
7  *  This program is free software; you can redistribute it and/or modify
8  *  it under the terms of the GNU Lesser General Public License as published by
9  *  the Free Software Foundation; either version 2 of the License, or
10  *  (at your option) any later version.
11  *
12  *  This program is distributed in the hope that it will be useful,
13  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *  GNU Lesser General Public License for more details.
16  *
17  *  You should have received a copy of the GNU Lesser General Public License
18  *  along with this program; if not, write to the Free Software
19  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20  *
21  */
22
23
24 #ifndef __CAMEL_GROUPWISE_JOURNAL_H__
25 #define __CAMEL_GROUPWISE_JOURNAL_H__
26
27 #include <stdarg.h>
28
29 #include <glib.h>
30
31 #include <camel/camel-offline-journal.h>
32 #include <camel/camel-mime-message.h>
33
34 #define CAMEL_TYPE_GROUPWISE_JOURNAL            (camel_groupwise_journal_get_type ())
35 #define CAMEL_GROUPWISE_JOURNAL(obj)            (CAMEL_CHECK_CAST ((obj), CAMEL_TYPE_GROUPWISE_JOURNAL, CamelGroupwiseJournal))
36 #define CAMEL_GROUPWISE_JOURNAL_CLASS(klass)    (CAMEL_CHECK_CLASS_CAST ((klass), CAMEL_TYPE_GROUPWISE_JOURNAL, CamelGroupwiseJournalClass))
37 #define CAMEL_IS_GROUPWISE_JOURNAL(obj)         (CAMEL_CHECK_TYPE ((obj), CAMEL_TYPE_GROUPWISE_JOURNAL))
38 #define CAMEL_IS_GROUPWISE_JOURNAL_CLASS(klass) (CAMEL_CHECK_CLASS_TYPE ((klass), CAMEL_TYPE_GROUPWISE_JOURNAL))
39 #define CAMEL_GROUPWISE_JOURNAL_GET_CLASS(obj)  (CAMEL_CHECK_GET_CLASS ((obj), CAMEL_TYPE_GROUPWISE_JOURNAL, CamelGroupwiseJournalClass))
40
41 G_BEGIN_DECLS
42
43 typedef struct _CamelGroupwiseJournal CamelGroupwiseJournal;
44 typedef struct _CamelGroupwiseJournalClass CamelGroupwiseJournalClass;
45 typedef struct _CamelGroupwiseJournalEntry CamelGroupwiseJournalEntry;
46
47 struct _CamelGroupwiseFolder;
48
49 enum {
50         CAMEL_GROUPWISE_JOURNAL_ENTRY_APPEND,
51         CAMEL_GROUPWISE_JOURNAL_ENTRY_TRANSFER
52 };
53
54 struct _CamelGroupwiseJournalEntry {
55         EDListNode node;
56         
57         int type;
58
59         char *uid;
60         char *original_uid;
61         char *source_container;
62 };
63
64 struct _CamelGroupwiseJournal {
65         CamelOfflineJournal parent_object;
66         
67 };
68
69 struct _CamelGroupwiseJournalClass {
70         CamelOfflineJournalClass parent_class;
71         
72 };
73
74
75 CamelType camel_groupwise_journal_get_type (void);
76
77 CamelOfflineJournal *camel_groupwise_journal_new (struct _CamelGroupwiseFolder *folder, const char *filename);
78
79 /* interfaces for adding a journal entry */
80 void camel_groupwise_journal_append (CamelGroupwiseJournal *journal, CamelMimeMessage *message, const CamelMessageInfo *mi,
81                                      char **appended_uid, CamelException *ex);
82 void camel_groupwise_journal_transfer (CamelGroupwiseJournal *journal, CamelGroupwiseFolder *source_folder, CamelMimeMessage *message, 
83                                        const CamelMessageInfo *mi, const char *orginal_uid, char **transferred_uid, CamelException *ex);
84
85 G_END_DECLS
86
87 #endif /* __CAMEL_GROUPWISE_JOURNAL_H__ */