summaryrefslogtreecommitdiffstats
path: root/sync/src/sync_collection.h
diff options
context:
space:
mode:
Diffstat (limited to 'sync/src/sync_collection.h')
-rw-r--r--sync/src/sync_collection.h67
1 files changed, 67 insertions, 0 deletions
diff --git a/sync/src/sync_collection.h b/sync/src/sync_collection.h
new file mode 100644
index 0000000..8550baf
--- /dev/null
+++ b/sync/src/sync_collection.h
@@ -0,0 +1,67 @@
+
+#ifndef SYNC_COLLECTION_H
+#define SYNC_COLLECTION_H
+
+#include <glib-object.h>
+#include "sync_group.h"
+
+G_BEGIN_DECLS
+
+#define SYNC_TYPE_COLLECTION sync_collection_get_type()
+
+#define SYNC_COLLECTION(obj) \
+ (G_TYPE_CHECK_INSTANCE_CAST ((obj), \
+ SYNC_TYPE_COLLECTION, SyncCollection))
+
+#define SYNC_COLLECTION_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_CAST ((klass), \
+ SYNC_TYPE_COLLECTION, SyncCollectionClass))
+
+#define SYNC_IS_COLLECTION(obj) \
+ (G_TYPE_CHECK_INSTANCE_TYPE ((obj), \
+ SYNC_TYPE_COLLECTION))
+
+#define SYNC_IS_COLLECTION_CLASS(klass) \
+ (G_TYPE_CHECK_CLASS_TYPE ((klass), \
+ SYNC_TYPE_COLLECTION))
+
+#define SYNC_COLLECTION_GET_CLASS(obj) \
+ (G_TYPE_INSTANCE_GET_CLASS ((obj), \
+ SYNC_TYPE_COLLECTION, SyncCollectionClass))
+
+typedef struct {
+ GObject parent;
+} SyncCollection;
+
+typedef struct {
+ GObjectClass parent_class;
+
+ void (* started) (SyncCollection *collection);
+ void (* progress) (SyncCollection *collection, gdouble progress);
+ void (* conflict) (SyncCollection *collection, SyncGroup *group);
+ void (* finished) (SyncCollection *collection);
+ void (* failed) (SyncCollection *collection);
+} SyncCollectionClass;
+
+GType sync_collection_get_type (void);
+
+SyncCollection* sync_collection_new (void);
+
+void sync_collection_add_group (SyncCollection *collection,
+ SyncGroup *group);
+void sync_collection_set_namespace (SyncCollection *collection,
+ const gchar *namespace);
+GList * sync_collection_get_groups (SyncCollection *collection);
+gboolean sync_collection_start (SyncCollection *collection);
+void sync_collection_resolve_conflict(SyncCollection *collection,
+ SyncGroupConflictRes res);
+void sync_collection_abort (SyncCollection *collection);
+void sync_collection_remove_group (SyncCollection *collection,
+ SyncGroup *group);
+void sync_collection_remove_all (SyncCollection *collection);
+gboolean sync_collection_delete (SyncCollection *collection);
+gboolean sync_collection_save (SyncCollection *collection);
+
+G_END_DECLS
+
+#endif