aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/pas/pas-book.h
diff options
context:
space:
mode:
authorNat Friedman <nat@src.gnome.org>2000-01-25 13:28:18 +0800
committerNat Friedman <nat@src.gnome.org>2000-01-25 13:28:18 +0800
commitfd4379ff20fe9c9e3b4f4028095b9659687002ff (patch)
tree78af76526262d746417a1e2007fd712f8d4ce584 /addressbook/backend/pas/pas-book.h
parenta315f0321395423c3c52adb4bb3063c433948dd5 (diff)
downloadgsoc2013-evolution-fd4379ff20fe9c9e3b4f4028095b9659687002ff.tar
gsoc2013-evolution-fd4379ff20fe9c9e3b4f4028095b9659687002ff.tar.gz
gsoc2013-evolution-fd4379ff20fe9c9e3b4f4028095b9659687002ff.tar.bz2
gsoc2013-evolution-fd4379ff20fe9c9e3b4f4028095b9659687002ff.tar.lz
gsoc2013-evolution-fd4379ff20fe9c9e3b4f4028095b9659687002ff.tar.xz
gsoc2013-evolution-fd4379ff20fe9c9e3b4f4028095b9659687002ff.tar.zst
gsoc2013-evolution-fd4379ff20fe9c9e3b4f4028095b9659687002ff.zip
More work.
svn path=/trunk/; revision=1626
Diffstat (limited to 'addressbook/backend/pas/pas-book.h')
-rw-r--r--addressbook/backend/pas/pas-book.h84
1 files changed, 84 insertions, 0 deletions
diff --git a/addressbook/backend/pas/pas-book.h b/addressbook/backend/pas/pas-book.h
new file mode 100644
index 0000000000..e929916ceb
--- /dev/null
+++ b/addressbook/backend/pas/pas-book.h
@@ -0,0 +1,84 @@
+/*
+ * A wrapper object which exports the Evolution_Book CORBA interface
+ * and which maintains a request queue.
+ *
+ * Author:
+ * Nat Friedman (nat@helixcode.com)
+ *
+ * Copyright 2000, Helix Code, Inc.
+ */
+
+#ifndef __PAS_BOOK_H__
+#define __PAS_BOOK_H__
+
+#include <bonobo/gnome-object.h>
+#include <libgnome/gnome-defs.h>
+#include <addressbook.h>
+
+typedef struct _PASBook PASBook;
+typedef struct _PASBookPrivate PASBookPrivate;
+
+#include <pas-backend.h>
+
+typedef enum {
+ CreateCard,
+ RemoveCard,
+ ModifyCard,
+ CheckConnection
+} PASOperation;
+
+typedef struct {
+ PASOperation op;
+ char *id;
+ char *vcard;
+} PASRequest;
+
+struct _PASBook {
+ GnomeObject parent_object;
+ PASBookPrivate *priv;
+};
+
+typedef struct {
+ GnomeObjectClass parent_class;
+
+ /* Signals */
+ void (*requests_queued) (void);
+} PASBookClass;
+
+typedef char * (*PASBookGetVCardFn) (PASBook *book, const char *id);
+
+PASBook *pas_book_new (PASBackend *backend,
+ Evolution_BookListener listener,
+ PASBookGetVCardFn get_vcard);
+PASBackend *pas_book_get_backend (PASBook *book);
+Evolution_BookListener pas_book_get_listener (PASBook *book);
+int pas_book_check_pending (PASBook *book);
+PASRequest *pas_book_pop_request (PASBook *book);
+
+void pas_book_respond_open (PASBook *book,
+ Evolution_BookListener_CallStatus status);
+void pas_book_respond_create (PASBook *book,
+ Evolution_BookListener_CallStatus status);
+void pas_book_respond_remove (PASBook *book,
+ Evolution_BookListener_CallStatus status);
+void pas_book_respond_modify (PASBook *book,
+ Evolution_BookListener_CallStatus status);
+void pas_book_report_connection (PASBook *book,
+ gboolean connected);
+
+void pas_book_notify_change (PASBook *book,
+ const char *id);
+void pas_book_notify_remove (PASBook *book,
+ const char *id);
+void pas_book_notify_add (PASBook *book,
+ const char *id);
+
+GtkType pas_book_get_type (void);
+
+#define PAS_BOOK_TYPE (pas_book_get_type ())
+#define PAS_BOOK(o) (GTK_CHECK_CAST ((o), PAS_BOOK_TYPE, PASBook))
+#define PAS_BOOK_CLASS(k) (GTK_CHECK_CLASS_CAST((k), PAS_BOOK_FACTORY_TYPE, PASBookClass))
+#define PAS_IS_BOOK(o) (GTK_CHECK_TYPE ((o), PAS_BOOK_TYPE))
+#define PAS_IS_BOOK_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), PAS_BOOK_TYPE))
+
+#endif /* ! __PAS_BOOK_H__ */