summaryrefslogtreecommitdiffabout
path: root/libical/src/libicalss/icalset.h
authorzautrix <zautrix>2004-06-26 19:01:18 (UTC)
committer zautrix <zautrix>2004-06-26 19:01:18 (UTC)
commitb9aad1f15dc600e4dbe4c62d3fcced6363188ba3 (patch) (unidiff)
tree2c3d4004fb21c72cba65793859f9bcd8ffd3a49c /libical/src/libicalss/icalset.h
downloadkdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.zip
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.gz
kdepimpi-b9aad1f15dc600e4dbe4c62d3fcced6363188ba3.tar.bz2
Initial revision
Diffstat (limited to 'libical/src/libicalss/icalset.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libical/src/libicalss/icalset.h111
1 files changed, 111 insertions, 0 deletions
diff --git a/libical/src/libicalss/icalset.h b/libical/src/libicalss/icalset.h
new file mode 100644
index 0000000..7b083da
--- a/dev/null
+++ b/libical/src/libicalss/icalset.h
@@ -0,0 +1,111 @@
1/* -*- Mode: C -*- */
2/*======================================================================
3 FILE: icalset.h
4 CREATOR: eric 28 November 1999
5
6
7 Icalset is the "base class" for representations of a collection of
8 iCal components. Derived classes (actually delegatees) include:
9
10 icalfileset Store componetns in a single file
11 icaldirset Store components in multiple files in a directory
12 icalheapset Store components on the heap
13 icalmysqlset Store components in a mysql database.
14
15 $Id$
16 $Locker$
17
18 (C) COPYRIGHT 2000, Eric Busboom, http://www.softwarestudio.org
19
20 This program is free software; you can redistribute it and/or modify
21 it under the terms of either:
22
23 The LGPL as published by the Free Software Foundation, version
24 2.1, available at: http://www.fsf.org/copyleft/lesser.html
25
26 Or:
27
28 The Mozilla Public License Version 1.0. You may obtain a copy of
29 the License at http://www.mozilla.org/MPL/
30
31 The Original Code is eric. The Initial Developer of the Original
32 Code is Eric Busboom
33
34
35======================================================================*/
36
37#ifndef ICALSET_H
38#define ICALSET_H
39
40#include <limits.h> /* For PATH_MAX */
41#include "ical.h"
42#include "icalerror.h"
43
44#ifdef PATH_MAX
45#define ICAL_PATH_MAX PATH_MAX
46#else
47#define ICAL_PATH_MAX 1024
48#endif
49
50
51
52
53typedef void icalset;
54
55typedef enum icalset_kind {
56 ICAL_FILE_SET,
57 ICAL_DIR_SET,
58 ICAL_HEAP_SET,
59 ICAL_MYSQL_SET,
60 ICAL_CAP_SET
61} icalset_kind;
62
63
64/* Create a specific derived type of set */
65icalset* icalset_new_file(const char* path);
66icalset* icalset_new_dir(const char* path);
67icalset* icalset_new_heap(void);
68icalset* icalset_new_mysql(const char* path);
69/*icalset* icalset_new_cap(icalcstp* cstp);*/
70
71void icalset_free(icalset* set);
72
73const char* icalset_path(icalset* set);
74
75/* Mark the cluster as changed, so it will be written to disk when it
76 is freed. Commit writes to disk immediately*/
77void icalset_mark(icalset* set);
78icalerrorenum icalset_commit(icalset* set);
79
80icalerrorenum icalset_add_component(icalset* set, icalcomponent* comp);
81icalerrorenum icalset_remove_component(icalset* set, icalcomponent* comp);
82
83int icalset_count_components(icalset* set,
84 icalcomponent_kind kind);
85
86/* Restrict the component returned by icalset_first, _next to those
87 that pass the gauge. _clear removes the gauge. */
88icalerrorenum icalset_select(icalset* set, icalcomponent* gauge);
89void icalset_clear_select(icalset* set);
90
91/* Get a component by uid */
92icalcomponent* icalset_fetch(icalset* set, const char* uid);
93int icalset_has_uid(icalset* set, const char* uid);
94icalcomponent* icalset_fetch_match(icalset* set, icalcomponent *c);
95
96/* Modify components according to the MODIFY method of CAP. Works on
97 the currently selected components. */
98icalerrorenum icalset_modify(icalset* set, icalcomponent *oldc,
99 icalcomponent *newc);
100
101/* Iterate through the components. If a guage has been defined, these
102 will skip over components that do not pass the gauge */
103
104icalcomponent* icalset_get_current_component(icalset* set);
105icalcomponent* icalset_get_first_component(icalset* set);
106icalcomponent* icalset_get_next_component(icalset* set);
107
108#endif /* !ICALSET_H */
109
110
111