Diffstat (limited to 'libical/src/libicalss/icaldirset.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | libical/src/libicalss/icaldirset.h | 82 |
1 files changed, 82 insertions, 0 deletions
diff --git a/libical/src/libicalss/icaldirset.h b/libical/src/libicalss/icaldirset.h new file mode 100644 index 0000000..7d205ec --- a/dev/null +++ b/libical/src/libicalss/icaldirset.h | |||
@@ -0,0 +1,82 @@ | |||
1 | /* -*- Mode: C -*- */ | ||
2 | /*====================================================================== | ||
3 | FILE: icaldirset.h | ||
4 | CREATOR: eric 28 November 1999 | ||
5 | |||
6 | |||
7 | $Id$ | ||
8 | $Locker$ | ||
9 | |||
10 | (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org | ||
11 | |||
12 | This program is free software; you can redistribute it and/or modify | ||
13 | it under the terms of either: | ||
14 | |||
15 | The LGPL as published by the Free Software Foundation, version | ||
16 | 2.1, available at: http://www.fsf.org/copyleft/lesser.html | ||
17 | |||
18 | Or: | ||
19 | |||
20 | The Mozilla Public License Version 1.0. You may obtain a copy of | ||
21 | the License at http://www.mozilla.org/MPL/ | ||
22 | |||
23 | The Original Code is eric. The Initial Developer of the Original | ||
24 | Code is Eric Busboom | ||
25 | |||
26 | |||
27 | ======================================================================*/ | ||
28 | |||
29 | #ifndef ICALDIRSET_H | ||
30 | #define ICALDIRSET_H | ||
31 | |||
32 | #include "ical.h" | ||
33 | |||
34 | /* icaldirset Routines for storing, fetching, and searching for ical | ||
35 | * objects in a database */ | ||
36 | |||
37 | typedef void icaldirset; | ||
38 | |||
39 | |||
40 | icaldirset* icaldirset_new(const char* path); | ||
41 | |||
42 | void icaldirset_free(icaldirset* store); | ||
43 | |||
44 | const char* icaldirset_path(icaldirset* store); | ||
45 | |||
46 | /* Mark the cluster as changed, so it will be written to disk when it | ||
47 | is freed. Commit writes to disk immediately*/ | ||
48 | void icaldirset_mark(icaldirset* store); | ||
49 | icalerrorenum icaldirset_commit(icaldirset* store); | ||
50 | |||
51 | icalerrorenum icaldirset_add_component(icaldirset* store, icalcomponent* comp); | ||
52 | icalerrorenum icaldirset_remove_component(icaldirset* store, icalcomponent* comp); | ||
53 | |||
54 | int icaldirset_count_components(icaldirset* store, | ||
55 | icalcomponent_kind kind); | ||
56 | |||
57 | /* Restrict the component returned by icaldirset_first, _next to those | ||
58 | that pass the gauge. _clear removes the gauge. */ | ||
59 | icalerrorenum icaldirset_select(icaldirset* store, icalcomponent* gauge); | ||
60 | void icaldirset_clear(icaldirset* store); | ||
61 | |||
62 | /* Get a component by uid */ | ||
63 | icalcomponent* icaldirset_fetch(icaldirset* store, const char* uid); | ||
64 | int icaldirset_has_uid(icaldirset* store, const char* uid); | ||
65 | icalcomponent* icaldirset_fetch_match(icaldirset* set, icalcomponent *c); | ||
66 | |||
67 | /* Modify components according to the MODIFY method of CAP. Works on | ||
68 | the currently selected components. */ | ||
69 | icalerrorenum icaldirset_modify(icaldirset* store, icalcomponent *oldc, | ||
70 | icalcomponent *newc); | ||
71 | |||
72 | /* Iterate through the components. If a guage has been defined, these | ||
73 | will skip over components that do not pass the gauge */ | ||
74 | |||
75 | icalcomponent* icaldirset_get_current_component(icaldirset* store); | ||
76 | icalcomponent* icaldirset_get_first_component(icaldirset* store); | ||
77 | icalcomponent* icaldirset_get_next_component(icaldirset* store); | ||
78 | |||
79 | #endif /* !ICALDIRSET_H */ | ||
80 | |||
81 | |||
82 | |||