00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef ICALCOMPONENT_H
00026 #define ICALCOMPONENT_H
00027
00028 #include "icalproperty.h"
00029 #include "icalvalue.h"
00030 #include "icalenums.h"
00031 #include "pvl.h"
00032
00033 typedef struct icalcomponent_impl icalcomponent;
00034
00035 #ifndef ICALTIMEZONE_DEFINED
00036 #define ICALTIMEZONE_DEFINED
00037
00040 typedef struct _icaltimezone icaltimezone;
00041 #endif
00042
00043
00044
00045
00046 typedef struct icalcompiter
00047 {
00048 icalcomponent_kind kind;
00049 pvl_elem iter;
00050
00051 } icalcompiter;
00052
00053 icalcomponent* icalcomponent_new(icalcomponent_kind kind);
00054 icalcomponent* icalcomponent_new_clone(icalcomponent* component);
00055 icalcomponent* icalcomponent_new_from_string(char* str);
00056 icalcomponent* icalcomponent_vanew(icalcomponent_kind kind, ...);
00057 void icalcomponent_free(icalcomponent* component);
00058
00059 char* icalcomponent_as_ical_string(icalcomponent* component);
00060
00061 int icalcomponent_is_valid(icalcomponent* component);
00062
00063 icalcomponent_kind icalcomponent_isa(const icalcomponent* component);
00064
00065 int icalcomponent_isa_component (void* component);
00066
00067
00068
00069
00070
00071 void icalcomponent_add_property(icalcomponent* component,
00072 icalproperty* property);
00073
00074 void icalcomponent_remove_property(icalcomponent* component,
00075 icalproperty* property);
00076
00077 int icalcomponent_count_properties(icalcomponent* component,
00078 icalproperty_kind kind);
00079
00080
00081 icalproperty* icalcomponent_get_current_property(icalcomponent* component);
00082
00083 icalproperty* icalcomponent_get_first_property(icalcomponent* component,
00084 icalproperty_kind kind);
00085 icalproperty* icalcomponent_get_next_property(icalcomponent* component,
00086 icalproperty_kind kind);
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097 icalcomponent* icalcomponent_get_inner(icalcomponent* comp);
00098
00099
00100 void icalcomponent_add_component(icalcomponent* parent,
00101 icalcomponent* child);
00102
00103 void icalcomponent_remove_component(icalcomponent* parent,
00104 icalcomponent* child);
00105
00106 int icalcomponent_count_components(icalcomponent* component,
00107 icalcomponent_kind kind);
00108
00113 void icalcomponent_merge_component(icalcomponent* comp,
00114 icalcomponent* comp_to_merge);
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124 icalcomponent* icalcomponent_get_current_component (icalcomponent* component);
00125
00126 icalcomponent* icalcomponent_get_first_component(icalcomponent* component,
00127 icalcomponent_kind kind);
00128 icalcomponent* icalcomponent_get_next_component(icalcomponent* component,
00129 icalcomponent_kind kind);
00130
00131
00132 icalcompiter icalcomponent_begin_component(icalcomponent* component,
00133 icalcomponent_kind kind);
00134 icalcompiter icalcomponent_end_component(icalcomponent* component,
00135 icalcomponent_kind kind);
00136 icalcomponent* icalcompiter_next(icalcompiter* i);
00137 icalcomponent* icalcompiter_prior(icalcompiter* i);
00138 icalcomponent* icalcompiter_deref(icalcompiter* i);
00139
00140
00141
00142
00143
00144
00145
00146 int icalcomponent_check_restrictions(icalcomponent* comp);
00147
00149 int icalcomponent_count_errors(icalcomponent* component);
00150
00152 void icalcomponent_strip_errors(icalcomponent* component);
00153
00155 void icalcomponent_convert_errors(icalcomponent* component);
00156
00157
00158 icalcomponent* icalcomponent_get_parent(icalcomponent* component);
00159 void icalcomponent_set_parent(icalcomponent* component,
00160 icalcomponent* parent);
00161
00162
00163
00164 int icalcomponent_kind_is_valid(const icalcomponent_kind kind);
00165
00166 icalcomponent_kind icalcomponent_string_to_kind(const char* string);
00167
00168 const char* icalcomponent_kind_to_string(icalcomponent_kind kind);
00169
00170
00171
00172
00173
00174
00175
00176
00179 icalcomponent* icalcomponent_get_first_real_component(icalcomponent *c);
00180
00183 struct icaltime_span icalcomponent_get_span(icalcomponent* comp);
00184
00185
00186
00187 void icalcomponent_set_dtstart(icalcomponent* comp, struct icaltimetype v);
00188 struct icaltimetype icalcomponent_get_dtstart(icalcomponent* comp);
00189
00190
00191
00192
00193
00194
00195
00196
00197
00198
00199
00200 struct icaltimetype icalcomponent_get_dtend(icalcomponent* comp);
00201 void icalcomponent_set_dtend(icalcomponent* comp, struct icaltimetype v);
00202
00203 struct icaltimetype icalcomponent_get_due(icalcomponent* comp);
00204 void icalcomponent_set_due(icalcomponent* comp, struct icaltimetype v);
00205
00206 void icalcomponent_set_duration(icalcomponent* comp,
00207 struct icaldurationtype v);
00208 struct icaldurationtype icalcomponent_get_duration(icalcomponent* comp);
00209
00210 void icalcomponent_set_method(icalcomponent* comp, icalproperty_method method);
00211 icalproperty_method icalcomponent_get_method(icalcomponent* comp);
00212
00213 struct icaltimetype icalcomponent_get_dtstamp(icalcomponent* comp);
00214 void icalcomponent_set_dtstamp(icalcomponent* comp, struct icaltimetype v);
00215
00216 void icalcomponent_set_summary(icalcomponent* comp, const char* v);
00217 const char* icalcomponent_get_summary(icalcomponent* comp);
00218
00219 void icalcomponent_set_comment(icalcomponent* comp, const char* v);
00220 const char* icalcomponent_get_comment(icalcomponent* comp);
00221
00222 void icalcomponent_set_uid(icalcomponent* comp, const char* v);
00223 const char* icalcomponent_get_uid(icalcomponent* comp);
00224
00225 void icalcomponent_set_relcalid(icalcomponent* comp, const char* v);
00226 const char* icalcomponent_get_relcalid(icalcomponent* comp);
00227
00228 void icalcomponent_set_recurrenceid(icalcomponent* comp,
00229 struct icaltimetype v);
00230 struct icaltimetype icalcomponent_get_recurrenceid(icalcomponent* comp);
00231
00232 void icalcomponent_set_description(icalcomponent* comp, const char* v);
00233 const char* icalcomponent_get_description(icalcomponent* comp);
00234
00235 void icalcomponent_set_location(icalcomponent* comp, const char* v);
00236 const char* icalcomponent_get_location(icalcomponent* comp);
00237
00238 void icalcomponent_set_sequence(icalcomponent* comp, int v);
00239 int icalcomponent_get_sequence(icalcomponent* comp);
00240
00241 void icalcomponent_set_status(icalcomponent* comp, enum icalproperty_status v);
00242 enum icalproperty_status icalcomponent_get_status(icalcomponent* comp);
00243
00244
00247 void icalcomponent_foreach_tzid(icalcomponent* comp,
00248 void (*callback)(icalparameter *param, void *data),
00249 void *callback_data);
00250
00253 icaltimezone* icalcomponent_get_timezone(icalcomponent* comp,
00254 const char *tzid);
00255
00256 int icalproperty_recurrence_is_excluded(icalcomponent *comp,
00257 struct icaltimetype *dtstart,
00258 struct icaltimetype *recurtime);
00259
00260 void icalcomponent_foreach_recurrence(icalcomponent* comp,
00261 struct icaltimetype start,
00262 struct icaltimetype end,
00263 void (*callback)(icalcomponent *comp,
00264 struct icaltime_span *span,
00265 void *data),
00266 void *callback_data);
00267
00268
00269
00270
00271 icalcomponent* icalcomponent_new_vcalendar();
00272 icalcomponent* icalcomponent_new_vevent();
00273 icalcomponent* icalcomponent_new_vtodo();
00274 icalcomponent* icalcomponent_new_vjournal();
00275 icalcomponent* icalcomponent_new_valarm();
00276 icalcomponent* icalcomponent_new_vfreebusy();
00277 icalcomponent* icalcomponent_new_vtimezone();
00278 icalcomponent* icalcomponent_new_xstandard();
00279 icalcomponent* icalcomponent_new_xdaylight();
00280 icalcomponent* icalcomponent_new_vagenda();
00281 icalcomponent* icalcomponent_new_vquery();
00282
00283 #endif