summaryrefslogtreecommitdiffabout
path: root/libical/src/libicalss/icalfileset.h
Unidiff
Diffstat (limited to 'libical/src/libicalss/icalfileset.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libical/src/libicalss/icalfileset.h107
1 files changed, 107 insertions, 0 deletions
diff --git a/libical/src/libicalss/icalfileset.h b/libical/src/libicalss/icalfileset.h
new file mode 100644
index 0000000..51254d2
--- a/dev/null
+++ b/libical/src/libicalss/icalfileset.h
@@ -0,0 +1,107 @@
1/* -*- Mode: C -*- */
2/*======================================================================
3 FILE: icalfileset.h
4 CREATOR: eric 23 December 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 ICALFILESET_H
30#define ICALFILESET_H
31
32#include "icalerror.h"
33#include "ical.h"
34#include "icalset.h"
35#include "icalgauge.h"
36
37extern int icalfileset_safe_saves;
38
39typedef void icalfileset;
40
41
42/* icalfileset
43 icalfilesetfile
44 icalfilesetdir
45*/
46
47
48icalfileset* icalfileset_new(const char* path);
49
50#ifdef _WIN32
51#define mode_t int
52#endif
53
54/* Like _new, but takes open() flags for opening the file */
55icalfileset* icalfileset_new_open(const char* path,
56 int flags, mode_t mode);
57
58void icalfileset_free(icalfileset* cluster);
59
60const char* icalfileset_path(icalfileset* cluster);
61
62/* Mark the cluster as changed, so it will be written to disk when it
63 is freed. Commit writes to disk immediately. */
64void icalfileset_mark(icalfileset* cluster);
65icalerrorenum icalfileset_commit(icalfileset* cluster);
66
67icalerrorenum icalfileset_add_component(icalfileset* cluster,
68 icalcomponent* child);
69
70icalerrorenum icalfileset_remove_component(icalfileset* cluster,
71 icalcomponent* child);
72
73int icalfileset_count_components(icalfileset* cluster,
74 icalcomponent_kind kind);
75
76/* Restrict the component returned by icalfileset_first, _next to those
77 that pass the gauge. _clear removes the gauge */
78icalerrorenum icalfileset_select(icalfileset* store, icalgauge* gauge);
79void icalfileset_clear(icalfileset* store);
80
81/* Get and search for a component by uid */
82icalcomponent* icalfileset_fetch(icalfileset* cluster, const char* uid);
83int icalfileset_has_uid(icalfileset* cluster, const char* uid);
84icalcomponent* icalfileset_fetch_match(icalfileset* set, icalcomponent *c);
85
86
87/* Modify components according to the MODIFY method of CAP. Works on
88 the currently selected components. */
89icalerrorenum icalfileset_modify(icalfileset* store, icalcomponent *oldcomp,
90 icalcomponent *newcomp);
91
92/* Iterate through components. If a guage has been defined, these
93 will skip over components that do not pass the gauge */
94
95icalcomponent* icalfileset_get_current_component (icalfileset* cluster);
96icalcomponent* icalfileset_get_first_component(icalfileset* cluster);
97icalcomponent* icalfileset_get_next_component(icalfileset* cluster);
98/* Return a reference to the internal component. You probably should
99 not be using this. */
100
101icalcomponent* icalfileset_get_component(icalfileset* cluster);
102
103
104#endif /* !ICALFILESET_H */
105
106
107