1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*-
3 * camel-disco-diary.h: class for logging disconnected operation
5 * Authors: Dan Winship <danw@ximian.com>
7 * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com)
9 * This program is free software; you can redistribute it and/or
10 * modify it under the terms of version 2 of the GNU Lesser General Public
11 * License as published by the Free Software Foundation.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU Lesser General Public License for more details.
18 * You should have received a copy of the GNU Lesser General Public License
19 * along with this program; if not, write to the Free Software
20 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
24 #if !defined (__CAMEL_H_INSIDE__) && !defined (CAMEL_COMPILATION)
25 #error "Only <camel/camel.h> can be included directly."
28 #ifndef CAMEL_DISABLE_DEPRECATED
30 #ifndef CAMEL_DISCO_DIARY_H
31 #define CAMEL_DISCO_DIARY_H
36 #include <camel/camel-disco-store.h>
38 /* Standard GObject macros */
39 #define CAMEL_TYPE_DISCO_DIARY \
40 (camel_disco_diary_get_type ())
41 #define CAMEL_DISCO_DIARY(obj) \
42 (G_TYPE_CHECK_INSTANCE_CAST \
43 ((obj), CAMEL_TYPE_DISCO_DIARY, CamelDiscoDiary))
44 #define CAMEL_DISCO_DIARY_CLASS(cls) \
45 (G_TYPE_CHECK_CLASS_CAST \
46 ((cls), CAMEL_TYPE_DISCO_DIARY, CamelDiscoDiaryClass))
47 #define CAMEL_IS_DISCO_DIARY(obj) \
48 (G_TYPE_CHECK_INSTANCE_TYPE \
49 ((obj), CAMEL_TYPE_DISCO_DIARY))
50 #define CAMEL_IS_DISCO_DIARY_CLASS(cls) \
51 (G_TYPE_CHECK_CLASS_TYPE \
52 ((cls), CAMEL_TYPE_DISCO_DIARY))
53 #define CAMEL_DISCO_DIARY_GET_CLASS(obj) \
54 (G_TYPE_INSTANCE_GET_CLASS \
55 ((obj), CAMEL_TYPE_DISCO_DIARY, CamelDiscoDiaryClass))
59 typedef struct _CamelDiscoDiary CamelDiscoDiary;
60 typedef struct _CamelDiscoDiaryClass CamelDiscoDiaryClass;
63 CAMEL_DISCO_DIARY_END = 0,
65 CAMEL_DISCO_DIARY_FOLDER_EXPUNGE,
66 CAMEL_DISCO_DIARY_FOLDER_APPEND,
67 CAMEL_DISCO_DIARY_FOLDER_TRANSFER
68 } CamelDiscoDiaryAction;
70 struct _CamelDiscoDiary {
73 CamelDiscoStore *store;
75 GHashTable *folders, *uidmap;
78 struct _CamelDiscoDiaryClass {
79 CamelObjectClass parent_class;
82 GType camel_disco_diary_get_type (void);
84 camel_disco_diary_new (CamelDiscoStore *store,
85 const gchar *filename,
87 gboolean camel_disco_diary_empty (CamelDiscoDiary *diary);
88 void camel_disco_diary_log (CamelDiscoDiary *diary,
89 CamelDiscoDiaryAction action,
91 void camel_disco_diary_replay (CamelDiscoDiary *diary,
92 GCancellable *cancellable,
95 /* Temporary->Permanent UID map stuff */
96 void camel_disco_diary_uidmap_add (CamelDiscoDiary *diary,
98 const gchar *new_uid);
99 const gchar * camel_disco_diary_uidmap_lookup (CamelDiscoDiary *diary,
104 #endif /* CAMEL_DISCO_DIARY_H */
106 #endif /* CAMEL_DISABLE_DEPRECATED */