Libical API Documentation 3.0

icalfileset.h
1/*======================================================================
2 FILE: icalfileset.h
3 CREATOR: eric 23 December 1999
4
5 (C) COPYRIGHT 2000, Eric Busboom <eric@civicknowledge.com>
6
7 This library is free software; you can redistribute it and/or modify
8 it under the terms of either:
9
10 The LGPL as published by the Free Software Foundation, version
11 2.1, available at: https://www.gnu.org/licenses/lgpl-2.1.html
12
13 Or:
14
15 The Mozilla Public License Version 2.0. You may obtain a copy of
16 the License at https://www.mozilla.org/MPL/
17
18 The Original Code is eric. The Initial Developer of the Original
19 Code is Eric Busboom
20======================================================================*/
21
22#ifndef ICALFILESET_H
23#define ICALFILESET_H
24
25#include "libical_icalss_export.h"
26#include "icalcluster.h"
27#include "icalset.h"
28
29 typedef struct icalfileset_impl icalfileset;
30
31LIBICAL_ICALSS_EXPORT icalset *icalfileset_new(const char *path);
32
33LIBICAL_ICALSS_EXPORT icalset *icalfileset_new_reader(const char *path);
34
35LIBICAL_ICALSS_EXPORT icalset *icalfileset_new_writer(const char *path);
36
37LIBICAL_ICALSS_EXPORT icalset *icalfileset_init(icalset *set, const char *dsn, void *options);
38
39LIBICAL_ICALSS_EXPORT icalcluster *icalfileset_produce_icalcluster(const char *path);
40
41LIBICAL_ICALSS_EXPORT void icalfileset_free(icalset *cluster);
42
43LIBICAL_ICALSS_EXPORT const char *icalfileset_path(icalset *cluster);
44
45/* Mark the cluster as changed, so it will be written to disk when it
46 is freed. Commit writes to disk immediately. */
47LIBICAL_ICALSS_EXPORT void icalfileset_mark(icalset *set);
48
49LIBICAL_ICALSS_EXPORT icalerrorenum icalfileset_commit(icalset *set);
50
51LIBICAL_ICALSS_EXPORT icalerrorenum icalfileset_add_component(icalset *set, icalcomponent *child);
52
53LIBICAL_ICALSS_EXPORT icalerrorenum icalfileset_remove_component(icalset *set,
54 icalcomponent *child);
55
56LIBICAL_ICALSS_EXPORT int icalfileset_count_components(icalset *set, icalcomponent_kind kind);
57
62LIBICAL_ICALSS_EXPORT icalerrorenum icalfileset_select(icalset *set, icalgauge *gauge);
63
65LIBICAL_ICALSS_EXPORT void icalfileset_clear(icalset *set);
66
68LIBICAL_ICALSS_EXPORT icalcomponent *icalfileset_fetch(icalset *set,
69 icalcomponent_kind kind, const char *uid);
70
71LIBICAL_ICALSS_EXPORT int icalfileset_has_uid(icalset *set, const char *uid);
72
73LIBICAL_ICALSS_EXPORT icalcomponent *icalfileset_fetch_match(icalset *set, icalcomponent *c);
74
80LIBICAL_ICALSS_EXPORT icalerrorenum icalfileset_modify(icalset *set,
81 icalcomponent *oldcomp,
82 icalcomponent *newcomp);
83
84/* Iterates through components. If a gauge has been defined, these
85 will skip over components that do not pass the gauge */
86
87LIBICAL_ICALSS_EXPORT icalcomponent *icalfileset_get_current_component(icalset *cluster);
88
89LIBICAL_ICALSS_EXPORT icalcomponent *icalfileset_get_first_component(icalset *cluster);
90
91LIBICAL_ICALSS_EXPORT icalcomponent *icalfileset_get_next_component(icalset *cluster);
92
93/* External iterator for thread safety */
94LIBICAL_ICALSS_EXPORT icalsetiter icalfileset_begin_component(icalset *set,
95 icalcomponent_kind kind,
96 icalgauge *gauge, const char *tzid);
97
98LIBICAL_ICALSS_EXPORT icalcomponent *icalfilesetiter_to_next(icalset *set, icalsetiter *iter);
99
100LIBICAL_ICALSS_EXPORT icalcomponent *icalfileset_form_a_matched_recurrence_component(icalsetiter *
101 itr);
102
106LIBICAL_ICALSS_EXPORT icalcomponent *icalfileset_get_component(icalset *cluster);
107
114 typedef struct icalfileset_options
115{
116 int flags;
117 int mode;
118 int safe_saves;
119 icalcluster *cluster;
120} icalfileset_options;
121
122 extern icalfileset_options icalfileset_options_default;
123
124#endif /* !ICALFILESET_H */
icalerrorenum
icalerrorenum
Represents the different types of errors that can be triggered in libical.
Definition: icalerror.h:76
icalset.h
icalcluster_impl
Definition: icalclusterimpl.h:28
icalcomponent_impl
Definition: icalcomponent.c:36
icalfileset_impl
Definition: icalfilesetimpl.h:28
icalfileset_impl::path
char * path
Definition: icalfilesetimpl.h:30
icalfileset_impl::gauge
icalgauge * gauge
Definition: icalfilesetimpl.h:34
icalfileset_impl::options
icalfileset_options options
Definition: icalfilesetimpl.h:31
icalfileset_impl::cluster
icalcomponent * cluster
Definition: icalfilesetimpl.h:33
icalfileset_options
Options for opening an icalfileset.
Definition: icalfileset.h:115
icalfileset_options::mode
int mode
Definition: icalfileset.h:117
icalfileset_options::cluster
icalcluster * cluster
Definition: icalfileset.h:119
icalfileset_options::flags
int flags
Definition: icalfileset.h:116
icalfileset_options::safe_saves
int safe_saves
Definition: icalfileset.h:118
icalgauge_impl
Definition: icalgaugeimpl.h:55
icalset_impl
Definition: icalset.h:61
icalsetiter
Definition: icalset.h:52