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 2001 Ximian, Inc.
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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
24 #ifndef CAMEL_DISCO_DIARY_H
25 #define CAMEL_DISCO_DIARY_H 1
27 #include "camel-object.h"
31 #define CAMEL_DISCO_DIARY_TYPE (camel_disco_diary_get_type ())
32 #define CAMEL_DISCO_DIARY(obj) (CAMEL_CHECK_CAST((obj), CAMEL_DISCO_DIARY_TYPE, CamelDiscoDiary))
33 #define CAMEL_DISCO_DIARY_CLASS(k) (CAMEL_CHECK_CLASS_CAST ((k), CAMEL_DISCO_DIARY_TYPE, CamelDiscoDiaryClass))
34 #define CAMEL_IS_DISCO_DIARY(o) (CAMEL_CHECK_TYPE((o), CAMEL_DISCO_DIARY_TYPE))
39 CAMEL_DISCO_DIARY_END = 0,
41 CAMEL_DISCO_DIARY_FOLDER_EXPUNGE,
42 CAMEL_DISCO_DIARY_FOLDER_APPEND,
43 CAMEL_DISCO_DIARY_FOLDER_TRANSFER,
44 } CamelDiscoDiaryAction;
47 CAMEL_DISCO_DIARY_ARG_NONE = 0,
49 CAMEL_DISCO_DIARY_ARG_FOLDER,
50 CAMEL_DISCO_DIARY_ARG_UID,
51 CAMEL_DISCO_DIARY_ARG_UID_LIST
52 } CamelDiscoDiaryArgType;
54 struct _CamelDiscoDiary {
55 CamelObject parent_object;
57 CamelDiscoStore *store;
59 GHashTable *folders, *uidmap;
63 CamelObjectClass parent_class;
65 } CamelDiscoDiaryClass;
69 CamelDiscoDiary *camel_disco_diary_new (CamelDiscoStore *store,
73 gboolean camel_disco_diary_empty (CamelDiscoDiary *diary);
75 void camel_disco_diary_log (CamelDiscoDiary *diary,
76 CamelDiscoDiaryAction action,
78 void camel_disco_diary_replay (CamelDiscoDiary *diary,
81 /* Temporary->Permanent UID map stuff */
82 void camel_disco_diary_uidmap_add (CamelDiscoDiary *diary,
85 const char *camel_disco_diary_uidmap_lookup (CamelDiscoDiary *diary,
88 /* Standard Camel function */
89 CamelType camel_disco_diary_get_type (void);
93 #endif /* CAMEL_DISCO_DIARY_H */