summaryrefslogtreecommitdiffabout
path: root/libical/src/libicalss/icaldirset.h
Side-by-side diff
Diffstat (limited to 'libical/src/libicalss/icaldirset.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libical/src/libicalss/icaldirset.h54
1 files changed, 35 insertions, 19 deletions
diff --git a/libical/src/libicalss/icaldirset.h b/libical/src/libicalss/icaldirset.h
index 7d205ec..a2d577d 100644
--- a/libical/src/libicalss/icaldirset.h
+++ b/libical/src/libicalss/icaldirset.h
@@ -32,2 +32,5 @@
#include "ical.h"
+#include "icalset.h"
+#include "icalcluster.h"
+#include "icalgauge.h"
@@ -36,10 +39,14 @@
-typedef void icaldirset;
+typedef struct icaldirset_impl icaldirset;
+icalset* icaldirset_new(const char* path);
-icaldirset* icaldirset_new(const char* path);
+icalset* icaldirset_new_reader(const char* path);
+icalset* icaldirset_new_writer(const char* path);
-void icaldirset_free(icaldirset* store);
-const char* icaldirset_path(icaldirset* store);
+icalset* icaldirset_init(icalset* set, const char *dsn, void *options);
+void icaldirset_free(icalset* set);
+
+const char* icaldirset_path(icalset* set);
@@ -47,9 +54,9 @@ const char* icaldirset_path(icaldirset* store);
is freed. Commit writes to disk immediately*/
-void icaldirset_mark(icaldirset* store);
-icalerrorenum icaldirset_commit(icaldirset* store);
+void icaldirset_mark(icalset* set);
+icalerrorenum icaldirset_commit(icalset* set);
-icalerrorenum icaldirset_add_component(icaldirset* store, icalcomponent* comp);
-icalerrorenum icaldirset_remove_component(icaldirset* store, icalcomponent* comp);
+icalerrorenum icaldirset_add_component(icalset* store, icalcomponent* comp);
+icalerrorenum icaldirset_remove_component(icalset* store, icalcomponent* comp);
-int icaldirset_count_components(icaldirset* store,
+int icaldirset_count_components(icalset* store,
icalcomponent_kind kind);
@@ -58,9 +65,9 @@ int icaldirset_count_components(icaldirset* store,
that pass the gauge. _clear removes the gauge. */
-icalerrorenum icaldirset_select(icaldirset* store, icalcomponent* gauge);
-void icaldirset_clear(icaldirset* store);
+icalerrorenum icaldirset_select(icalset* store, icalgauge* gauge);
+void icaldirset_clear(icalset* store);
/* Get a component by uid */
-icalcomponent* icaldirset_fetch(icaldirset* store, const char* uid);
-int icaldirset_has_uid(icaldirset* store, const char* uid);
-icalcomponent* icaldirset_fetch_match(icaldirset* set, icalcomponent *c);
+icalcomponent* icaldirset_fetch(icalset* store, const char* uid);
+int icaldirset_has_uid(icalset* store, const char* uid);
+icalcomponent* icaldirset_fetch_match(icalset* set, icalcomponent *c);
@@ -68,11 +75,20 @@ icalcomponent* icaldirset_fetch_match(icaldirset* set, icalcomponent *c);
the currently selected components. */
-icalerrorenum icaldirset_modify(icaldirset* store, icalcomponent *oldc,
+icalerrorenum icaldirset_modify(icalset* store, icalcomponent *oldc,
icalcomponent *newc);
-/* Iterate through the components. If a guage has been defined, these
+/* Iterate through the components. If a gauge has been defined, these
will skip over components that do not pass the gauge */
-icalcomponent* icaldirset_get_current_component(icaldirset* store);
-icalcomponent* icaldirset_get_first_component(icaldirset* store);
-icalcomponent* icaldirset_get_next_component(icaldirset* store);
+icalcomponent* icaldirset_get_current_component(icalset* store);
+icalcomponent* icaldirset_get_first_component(icalset* store);
+icalcomponent* icaldirset_get_next_component(icalset* store);
+
+/* External iterator for thread safety */
+icalsetiter icaldirset_begin_component(icalset* set, icalcomponent_kind kind, icalgauge* gauge);
+icalcomponent* icaldirsetiter_to_next(icalset* set, icalsetiter* i);
+icalcomponent* icaldirsetiter_to_prior(icalset* set, icalsetiter* i);
+
+typedef struct icaldirset_options {
+ int flags; /**< flags corresponding to the open() system call O_RDWR, etc. */
+} icaldirset_options;