Libical API Documentation 3.0

Data Structures | Typedefs | Functions
icaldirset.h File Reference

icaldirset manages a database of ical components and offers interfaces for reading, writing and searching for components. More...

Go to the source code of this file.

## Data Structures
struct | icaldirset_options

## Typedefs
typedef struct icaldirset_impl | icaldirset
typedef struct icaldirset_options | icaldirset_options

## Functions
icalerrorenum | icaldirset_add_component (icalset *store, icalcomponent *comp)
icalsetiter | icaldirset_begin_component (icalset *set, icalcomponent_kind kind, icalgauge *gauge, const char *tzid)
void | icaldirset_clear (icalset *store)
icalerrorenum | icaldirset_commit (icalset *set)
int | icaldirset_count_components (icalset *store, icalcomponent_kind kind)
icalcomponent * | icaldirset_fetch (icalset *store, icalcomponent_kind kind, const char *uid)
icalcomponent * | icaldirset_fetch_match (icalset *set, icalcomponent *c)
void | icaldirset_free (icalset *set)
icalcomponent * | icaldirset_get_current_component (icalset *store)
icalcomponent * | icaldirset_get_first_component (icalset *store)
icalcomponent * | icaldirset_get_next_component (icalset *store)
int | icaldirset_has_uid (icalset *store, const char *uid)
icalset * | icaldirset_init (icalset *set, const char *dsn, void *options)
void | icaldirset_mark (icalset *set)
icalerrorenum | icaldirset_modify (icalset *store, icalcomponent *oldc, icalcomponent *newc)
icalset * | icaldirset_new (const char *path)
icalset * | icaldirset_new_reader (const char *path)
icalset * | icaldirset_new_writer (const char *path)
const char * | icaldirset_path (icalset *set)
icalerrorenum | icaldirset_remove_component (icalset *store, icalcomponent *comp)
icalerrorenum | icaldirset_select (icalset *store, icalgauge *gauge)
icalcomponent * | icaldirsetiter_to_next (icalset *set, icalsetiter *i)
icalcomponent * | icaldirsetiter_to_prior (icalset *set, icalsetiter *i)

## Detailed Description

icaldirset manages a database of ical components and offers interfaces for reading, writing and searching for components.

icaldirset groups components in to clusters based on their DTSTAMP time – all components that start in the same month are grouped together in a single file. All files in a sotre are kept in a single directory.

The primary interfaces are icaldirset__get_first_component and icaldirset_get_next_component. These routine iterate through all of the components in the store, subject to the current gauge. A gauge is an icalcomponent that is tested against other componets for a match. If a gauge has been set with icaldirset_select, icaldirset_first and icaldirset_next will only return componentes that match the gauge.

The Store generated UIDs for all objects that are stored if they do not already have a UID. The UID is the name of the cluster (month & year as MMYYYY) plus a unique serial number. The serial number is stored as a property of the cluster.

## Function Documentation

## ◆ icaldirset_add_component()

icalerrorenum icaldirset_add_component | ( | icalset * | store,
|  | icalcomponent * | comp
| ) |  |

This assumes that the top level component is a VCALENDAR, and there is an inner component of type VEVENT, VTODO or VJOURNAL. The inner component must have a DSTAMP property

## ◆ icaldirset_remove_component()

icalerrorenum icaldirset_remove_component | ( | icalset * | set,
|  | icalcomponent * | comp
| ) |  |

Remove a component in the current cluster. HACK. This routine is a "friend" of icalfileset, and breaks its encapsulation. It was either do it this way, or add several layers of interfaces that had no other use.