$darkmode
Libical API Documentation 4.0 STABLE VERSION Visit the v3.0 documentation
icalset.c File Reference

Icalset is the "base class" for representations of a collection of iCal components. More...

Go to the source code of this file.

Functions

icalerrorenum icalset_add_component (icalset *set, icalcomponent *comp)
 
icalsetiter icalset_begin_component (icalset *set, icalcomponent_kind kind, icalgauge *gauge, const char *tzid)
 
void icalset_clear (icalset *set)
 
icalerrorenum icalset_commit (icalset *set)
 
int icalset_count_components (icalset *set, icalcomponent_kind kind)
 
icalcomponent * icalset_fetch (icalset *set, const char *uid)
 
icalcomponent * icalset_fetch_match (icalset *set, const icalcomponent *comp)
 
void icalset_free (icalset *set)
 
icalcomponent * icalset_get_current_component (icalset *set)
 
icalcomponent * icalset_get_first_component (icalset *set)
 
icalcomponent * icalset_get_next_component (icalset *set)
 
int icalset_has_uid (icalset *set, const char *uid)
 
void icalset_mark (icalset *set)
 
icalerrorenum icalset_modify (icalset *set, icalcomponent *old, icalcomponent *new)
 
icalset * icalset_new (icalset_kind kind, const char *dsn, void *options)
 
icalset * icalset_new_dir (const char *path)
 
icalset * icalset_new_dir_reader (const char *path)
 
icalset * icalset_new_dir_writer (const char *path)
 
icalset * icalset_new_file (const char *path)
 
icalset * icalset_new_file_reader (const char *path)
 
icalset * icalset_new_file_writer (const char *path)
 
const char * icalset_path (icalset *set)
 
icalerrorenum icalset_remove_component (icalset *set, icalcomponent *comp)
 
icalerrorenum icalset_select (icalset *set, icalgauge *gauge)
 
icalcomponent * icalsetiter_deref (icalsetiter *i)
 
icalcomponent * icalsetiter_next (icalsetiter *itr)
 
icalcomponent * icalsetiter_prior (icalsetiter *i)
 
icalcomponent * icalsetiter_to_next (icalset *set, icalsetiter *i)
 
icalcomponent * icalsetiter_to_prior (icalset *set, icalsetiter *i)
 

Variables

icalsetiter icalsetiter_null = {{ICAL_NO_COMPONENT, 0}, 0, 0, 0, 0}
 

Detailed Description

Icalset is the "base class" for representations of a collection of iCal components.

Definition in file icalset.c.

Function Documentation

icalerrorenum icalset_commit ( icalset *  set)

Writes changes to disk immediately.

Definition at line 348 of file icalset.c.

icalcomponent* icalset_fetch ( icalset *  set,
const char *  uid 
)

Gets a component by uid.

Definition at line 378 of file icalset.c.

void icalset_free ( icalset *  set)

Frees the memory associated with this icalset automatically calls the implementation specific free routine

Definition at line 325 of file icalset.c.

icalcomponent* icalset_get_current_component ( icalset *  set)

Iterates through the components. If a gauge has been defined, these will skip over components that do not pass the gauge. Gets the current component from the specified icalset.

Parameters
setis a pointer to a valid icalset
Returns
a pointer to the current icalcomponent for the set; or NULL if there is none.

Definition at line 398 of file icalset.c.

icalcomponent* icalset_get_first_component ( icalset *  set)

Gets the first component from the specified icalset.

Parameters
setis a pointer to a valid icalset
Returns
a pointer to the first icalcomponent of the set; or NULL if there is none.

Definition at line 403 of file icalset.c.

icalcomponent* icalset_get_next_component ( icalset *  set)

Gets the next component of the specified icalset.

Parameters
setis a pointer to a valid icalset
Returns
a pointer to the next icalcomponent of the set; or NULL if there is none.

Definition at line 408 of file icalset.c.

void icalset_mark ( icalset *  set)

Marks the cluster as changed, so it will be written to disk when it is freed.

Definition at line 343 of file icalset.c.

icalerrorenum icalset_modify ( icalset *  set,
icalcomponent *  oldc,
icalcomponent *  newc 
)

Modifies components according to the MODIFY method of CAP. Works on the currently selected components.

Definition at line 393 of file icalset.c.

icalset* icalset_new ( icalset_kind  kind,
const char *  dsn,
void *  options 
)

Generic icalset constructor.

Parameters
kindthe type of icalset to create
dsnthe data Source Name - usually a pathname or DB handle
optionsany implementation specific options
Returns
a valid icalset reference or NULL if error.

This creates any of the icalset types available.

unimplemented

call the implementation specific initializer

Definition at line 193 of file icalset.c.

icalerrorenum icalset_select ( icalset *  set,
icalgauge *  gauge 
)

Restricts the component returned by icalset_first, _next to those that pass the gauge.

Definition at line 368 of file icalset.c.

icalcomponent* icalsetiter_next ( icalsetiter i)

Default _next, _prior, _deref for subclasses that use single cluster

Definition at line 421 of file icalset.c.

icalcomponent* icalsetiter_to_next ( icalset *  set,
icalsetiter i 
)

for subclasses that use multiple clusters that require specialized cluster traversal

Definition at line 460 of file icalset.c.

Variable Documentation

icalsetiter icalsetiter_null = {{ICAL_NO_COMPONENT, 0}, 0, 0, 0, 0}

External Iterator with gauge - for thread safety

Definition at line 413 of file icalset.c.