aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/ebook/e-book.h
diff options
context:
space:
mode:
authorNat Friedman <nat@src.gnome.org>2000-01-18 11:31:07 +0800
committerNat Friedman <nat@src.gnome.org>2000-01-18 11:31:07 +0800
commit2f1705c6c0d747e708a34b089c4b6ebfc7832022 (patch)
tree1b94d61159ccf0ec4108f98214680850cc5ac350 /addressbook/backend/ebook/e-book.h
parente63f053c3e341251c123c72587e930228b781c67 (diff)
downloadgsoc2013-evolution-2f1705c6c0d747e708a34b089c4b6ebfc7832022.tar
gsoc2013-evolution-2f1705c6c0d747e708a34b089c4b6ebfc7832022.tar.gz
gsoc2013-evolution-2f1705c6c0d747e708a34b089c4b6ebfc7832022.tar.bz2
gsoc2013-evolution-2f1705c6c0d747e708a34b089c4b6ebfc7832022.tar.lz
gsoc2013-evolution-2f1705c6c0d747e708a34b089c4b6ebfc7832022.tar.xz
gsoc2013-evolution-2f1705c6c0d747e708a34b089c4b6ebfc7832022.tar.zst
gsoc2013-evolution-2f1705c6c0d747e708a34b089c4b6ebfc7832022.zip
A precommit so Federico can see.
svn path=/trunk/; revision=1584
Diffstat (limited to 'addressbook/backend/ebook/e-book.h')
-rw-r--r--addressbook/backend/ebook/e-book.h106
1 files changed, 106 insertions, 0 deletions
diff --git a/addressbook/backend/ebook/e-book.h b/addressbook/backend/ebook/e-book.h
new file mode 100644
index 0000000000..892f99fb53
--- /dev/null
+++ b/addressbook/backend/ebook/e-book.h
@@ -0,0 +1,106 @@
+/*
+ * The Evolution addressbook client object.
+ *
+ * Author:
+ * Nat Friedman (nat@helixcode.com)
+ *
+ * Copyright 1999, 2000, Helix Code, Inc.
+ */
+
+#ifndef __E_BOOK_H__
+#define __E_BOOK_H__
+
+#include <libgnome/gnome-defs.h>
+
+#include <e-card.h>
+
+BEGIN_GNOME_DECLS
+
+typedef enum {
+ E_BOOK_STATUS_SUCCESS,
+ E_BOOK_STATUS_UNKNOWN,
+ E_BOOK_STATUS_REPOSITORY_OFFLINE,
+ E_BOOK_STATUS_PERMISSION_DENIED,
+ E_BOOK_STATUS_CARD_NOT_FOUND
+} EBookStatus;
+
+typedef struct _EBookPrivate EBookPrivate;
+
+typedef struct {
+ GtkObject parent;
+ EBookPrivate *priv;
+} EBook;
+
+typedef struct {
+ GtkObjectClass parent;
+
+ /*
+ * Signals.
+ */
+ void (* card_changed) (const char *id);
+ void (* card_removed) (const char *id);
+ void (* card_added) (const char *id);
+ void (* link_status) (gboolean connected);
+} EBookClass;
+
+/* Callbacks for asynchronous functions. */
+typedef void (*EBookCallback) (EBook *book, EBookStatus status, gpointer closure);
+typedef void (*EBookOpenProgressCallback) (EBook *book,
+ const char *status_message,
+ short percent,
+ gpointer closure);
+
+
+/* Creating a new addressbook. */
+EBook *e_book_new (const char *uri,
+ EBookOpenProgressCallback progress_cb,
+ EBookCallback open_response,
+ gpointer closure);
+GtkType e_book_get_type (void);
+
+/* Fetching cards. */
+ECard *e_book_get_card (EBook *book,
+ char *id);
+char *e_book_get_vcard (EBook *book,
+ char *id);
+
+/* Deleting cards. */
+void e_book_remove_card (EBook *book,
+ ECard *card,
+ EBookCallback cb,
+ gpointer closure);
+void e_book_remove_card_by_id (EBook *book,
+ char *id,
+ EBookCallback cb,
+ gpointer closure);
+
+/* Adding cards. */
+void e_book_add_card (EBook *book,
+ ECard *card,
+ EBookCallback cb,
+ gpointer closure);
+void e_book_add_vcard (EBook *book,
+ char *vcard,
+ char *id,
+ EBookCallback cb,
+ gpointer closure);
+
+/* Modifying cards. */
+void e_book_commit_card (EBook *book,
+ ECard *card,
+ EBookCallback cb,
+ gpointer closure);
+void e_book_commit_vcard (EBook *book,
+ char *vcard,
+ EBookCallback cb,
+ gpointer closure);
+
+#define E_BOOK_TYPE (e_book_get_type ())
+#define E_BOOK(o) (GTK_CHECK_CAST ((o), E_BOOK_TYPE, EBook))
+#define E_BOOK_CLASS(k) (GTK_CHECK_CLASS_CAST((k), E_BOOK_TYPE, EBookClass))
+#define E_IS_BOOK(o) (GTK_CHECK_TYPE ((o), E_BOOK_TYPE))
+#define E_IS_BOOK_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), E_BOOK_TYPE))
+
+END_GNOME_DECLS
+
+#endif /* ! __E_BOOK_H__ */