aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/pas/pas-backend.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/pas/pas-backend.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/pas/pas-backend.h')
-rw-r--r--addressbook/backend/pas/pas-backend.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/addressbook/backend/pas/pas-backend.h b/addressbook/backend/pas/pas-backend.h
new file mode 100644
index 0000000000..fca4ef7d8d
--- /dev/null
+++ b/addressbook/backend/pas/pas-backend.h
@@ -0,0 +1,69 @@
+/*
+ * An abstract class which defines the API to a given backend.
+ * There will be one PASBackend object for every URI which is loaded.
+ *
+ * Two people will call into the PASBackend API:
+ *
+ * 1. The PASBookFactory, when it has been asked to load a book.
+ * It will create a new PASBackend if one is not already running
+ * for the requested URI. It will call pas_backend_add_client to
+ * add a new client to an existing PASBackend server.
+ *
+ * 2. A PASBook, when a client has requested an operation on the
+ * Evolution_Book interface.
+ *
+ * Author:
+ * Nat Friedman (nat@helixcode.com)
+ *
+ * Copyright 2000, Helix Code, Inc.
+ */
+
+#ifndef __PAS_BACKEND_H__
+#define __PAS_BACKEND_H__
+
+typedef struct _PASBackendPrivate PASBackendPrivate;
+
+typedef struct {
+ GtkObject parent_object;
+ PASBackendPrivate *priv;
+} PASBackend;
+
+typedef struct {
+ GtkObjectClass parent_class;
+} PASBackendClass;
+
+PASBackend *pas_backend_new (void);
+void pas_backend_load_uri (PASBackend *backend,
+ char *uri);
+void pas_backend_add_client (PASBackend *backend,
+ Evolution_BookListener listener);
+void pas_backend_remove_client (PASBackend *backend,
+ Evolution_BookListener listener);
+
+/* Synchronous operations. */
+char *pas_backend_get_vcard (PASBackend *backend,
+ PASBook *book,
+ char *id);
+
+/* Asynchronous operations. */
+void pas_backend_queue_create_card (PASBackend *backend,
+ PASBook *book,
+ char *vcard);
+void pas_backend_queue_remove_card (PASBackend *backend,
+ PASBook *book,
+ char *id);
+void pas_backend_queue_modify_card (PASBackend *backend,
+ PASBook *book,
+ char *id,
+ char *vcard);
+
+GtkType pas_backend_get_type (void);
+
+#define PAS_BACKEND_TYPE (pas_backend_get_type ())
+#define PAS_BACKEND(o) (GTK_CHECK_CAST ((o), PAS_BACKEND_TYPE, PASBackend))
+#define PAS_BACKEND_CLASS(k) (GTK_CHECK_CLASS_CAST((k), PAS_BACKEND_TYPE, PASBackendClass))
+#define PAS_IS_BACKEND(o) (GTK_CHECK_TYPE ((o), PAS_BACKEND_TYPE))
+#define PAS_IS_BACKEND_CLASS(k) (GTK_CHECK_CLASS_TYPE ((k), PAS_BACKEND_TYPE))
+
+#endif /* ! __PAS_BACKEND_H__ */
+