From 8357d7b199e26e4d071b267a314447b22f2ddb3c Mon Sep 17 00:00:00 2001 From: JP Rosevear Date: Thu, 24 Aug 2000 19:31:03 +0000 Subject: Initial revision svn path=/trunk/; revision=5011 --- libical/src/libicalss/icalfileset.h | 90 +++++++++++++++++++++++++++++++++++++ 1 file changed, 90 insertions(+) create mode 100644 libical/src/libicalss/icalfileset.h (limited to 'libical/src/libicalss/icalfileset.h') diff --git a/libical/src/libicalss/icalfileset.h b/libical/src/libicalss/icalfileset.h new file mode 100644 index 0000000000..8ceae632be --- /dev/null +++ b/libical/src/libicalss/icalfileset.h @@ -0,0 +1,90 @@ +/* -*- Mode: C -*- */ +/*====================================================================== + FILE: icalfileset.h + CREATOR: eric 23 December 1999 + + + $Id$ + $Locker$ + + (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org + + This program is free software; you can redistribute it and/or modify + it under the terms of either: + + The LGPL as published by the Free Software Foundation, version + 2.1, available at: http://www.fsf.org/copyleft/lesser.html + + Or: + + The Mozilla Public License Version 1.0. You may obtain a copy of + the License at http://www.mozilla.org/MPL/ + + The Original Code is eric. The Initial Developer of the Original + Code is Eric Busboom + + +======================================================================*/ + +#ifndef ICALFILESET_H +#define ICALFILESET_H + +#include "ical.h" + +typedef void icalfileset; + + +/* icalfileset + icalfilesetfile + icalfilesetdir +*/ + + +icalfileset* icalfileset_new(char* path); +void icalfileset_free(icalfileset* cluster); + +char* icalfileset_path(icalfileset* cluster); + +/* Mark the cluster as changed, so it will be written to disk when it + is freed. Commit writes to disk immediately. */ +void icalfileset_mark(icalfileset* cluster); +icalerrorenum icalfileset_commit(icalfileset* cluster); + +icalerrorenum icalfileset_add_component(icalfileset* cluster, + icalcomponent* child); + +icalerrorenum icalfileset_remove_component(icalfileset* cluster, + icalcomponent* child); + +int icalfileset_count_components(icalfileset* cluster, + icalcomponent_kind kind); + +/* Restrict the component returned by icalfileset_first, _next to those + that pass the gauge. _clear removes the gauge */ +icalerrorenum icalfileset_select(icalfileset* store, icalcomponent* gauge); +void icalfileset_clear(icalfileset* store); + +/* Get and search for a component by uid */ +icalcomponent* icalfileset_fetch(icalfileset* cluster, char* uid); +int icalfileset_has_uid(icalfileset* cluster, char* uid); + + +/* Iterate through components. If a guage has been defined, these + will skip over components that do not pass the gauge */ + +icalcomponent* icalfileset_get_current_component (icalfileset* cluster); +icalcomponent* icalfileset_get_first_component(icalfileset* cluster, + icalcomponent_kind kind); +icalcomponent* icalfileset_get_next_component(icalfileset* cluster, + icalcomponent_kind kind); + +/* Return a reference to the internal component. You probably should + not be using this. */ + +icalcomponent* icalfileset_get_component(icalfileset* cluster); + + +#endif /* !ICALFILESET_H */ + + + -- cgit v1.2.3