Libical API Documentation 4.0 UNRELEASED Go to the stable 3.0 documentation
Loading...
Searching...
No Matches
icaldirset.h File Reference

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

Functions

icalerrorenum icaldirset_add_component (icalset *set, icalcomponent *comp)
icalsetiter icaldirset_begin_component (icalset *set, icalcomponent_kind kind, icalgauge *gauge, const char *tzid)
void icaldirset_clear (icalset *set)
icalerrorenum icaldirset_commit (icalset *set)
int icaldirset_count_components (icalset *store, icalcomponent_kind kind)
icalcomponent * icaldirset_fetch (icalset *set, icalcomponent_kind kind, const char *uid)
icalcomponent * icaldirset_fetch_match (icalset *set, const icalcomponent *c)
void icaldirset_free (icalset *set)
icalcomponent * icaldirset_get_current_component (icalset *set)
icalcomponent * icaldirset_get_first_component (icalset *set)
icalcomponent * icaldirset_get_next_component (icalset *set)
int icaldirset_has_uid (icalset *set, const char *uid)
icalset * icaldirset_init (icalset *set, const char *dir, void *options_in)
void icaldirset_mark (icalset *set)
icalerrorenum icaldirset_modify (icalset *set, icalcomponent *oldcomp, icalcomponent *newcomp)
icalset * icaldirset_new (const char *dir)
icalset * icaldirset_new_reader (const char *dir)
icalset * icaldirset_new_writer (const char *dir)
const char * icaldirset_path (icalset *set)
icalerrorenum icaldirset_remove_component (icalset *set, icalcomponent *comp)
icalerrorenum icaldirset_select (icalset *set, icalgauge *gauge)
icalcomponent * icaldirsetiter_to_next (icalset *set, icalsetiter *i)
icalcomponent * icaldirsetiter_to_prior (icalset *set, icalsetiter *i)

Detailed Description

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 store 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 components for a match. If a gauge has been set with icaldirset_select, icaldirset_first and icaldirset_next will only return components 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.

Definition in file icaldirset.h.

Typedef Documentation

◆ icaldirset

typedef struct icaldirset_impl icaldirset

Definition at line 46 of file icaldirset.h.

Function Documentation

◆ icaldirset_add_component()

icalerrorenum icaldirset_add_component ( icalset * set,
icalcomponent * comp )

Adds a component to the current cluster.

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

Parameters
setis a pointer to a valid icalset
compis a pointer to the icalcomponent to add
Returns
ICAL_NO_ERROR it comp was successfully added; if not, an error occurred.

Definition at line 293 of file icaldirset.c.

◆ icaldirset_begin_component()

icalsetiter icaldirset_begin_component ( icalset * set,
icalcomponent_kind kind,
icalgauge * gauge,
const char * tzid )

Definition at line 642 of file icaldirset.c.

◆ icaldirset_clear()

void icaldirset_clear ( icalset * set)

Definition at line 513 of file icaldirset.c.

◆ icaldirset_commit()

icalerrorenum icaldirset_commit ( icalset * set)

Definition at line 57 of file icaldirset.c.

◆ icaldirset_count_components()

int icaldirset_count_components ( icalset * store,
icalcomponent_kind kind )

Definition at line 422 of file icaldirset.c.

◆ icaldirset_fetch()

icalcomponent * icaldirset_fetch ( icalset * set,
icalcomponent_kind kind,
const char * uid )

Definition at line 443 of file icaldirset.c.

◆ icaldirset_fetch_match()

icalcomponent * icaldirset_fetch_match ( icalset * set,
const icalcomponent * c )

Definition at line 433 of file icaldirset.c.

◆ icaldirset_free()

void icaldirset_free ( icalset * set)

Definition at line 204 of file icaldirset.c.

◆ icaldirset_get_current_component()

icalcomponent * icaldirset_get_current_component ( icalset * set)

Definition at line 521 of file icaldirset.c.

◆ icaldirset_get_first_component()

icalcomponent * icaldirset_get_first_component ( icalset * set)

Definition at line 534 of file icaldirset.c.

◆ icaldirset_get_next_component()

icalcomponent * icaldirset_get_next_component ( icalset * set)

Definition at line 583 of file icaldirset.c.

◆ icaldirset_has_uid()

int icaldirset_has_uid ( icalset * set,
const char * uid )

Definition at line 474 of file icaldirset.c.

◆ icaldirset_init()

icalset * icaldirset_init ( icalset * set,
const char * dir,
void * options_in )

Definition at line 147 of file icaldirset.c.

◆ icaldirset_mark()

void icaldirset_mark ( icalset * set)

Definition at line 50 of file icaldirset.c.

◆ icaldirset_modify()

icalerrorenum icaldirset_modify ( icalset * set,
icalcomponent * oldcomp,
icalcomponent * newcomp )

Definition at line 502 of file icaldirset.c.

◆ icaldirset_new()

icalset * icaldirset_new ( const char * dir)

Definition at line 181 of file icaldirset.c.

◆ icaldirset_new_reader()

icalset * icaldirset_new_reader ( const char * dir)

Definition at line 186 of file icaldirset.c.

◆ icaldirset_new_writer()

icalset * icaldirset_new_writer ( const char * dir)

Definition at line 195 of file icaldirset.c.

◆ icaldirset_path()

const char * icaldirset_path ( icalset * set)

Definition at line 43 of file icaldirset.c.

◆ 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.

Parameters
setis a pointer to a valid icalset
compis a pointer to the icalcomponent to remove
Returns
ICAL_NO_ERROR it comp was successfully removed; if not, an error occurred.

Definition at line 371 of file icaldirset.c.

◆ icaldirset_select()

icalerrorenum icaldirset_select ( icalset * set,
icalgauge * gauge )

Definition at line 489 of file icaldirset.c.

◆ icaldirsetiter_to_next()

icalcomponent * icaldirsetiter_to_next ( icalset * set,
icalsetiter * i )

Definition at line 662 of file icaldirset.c.

◆ icaldirsetiter_to_prior()

icalcomponent * icaldirsetiter_to_prior ( icalset * set,
icalsetiter * i )

Definition at line 670 of file icaldirset.c.