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

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

Go to the source code of this file.

Data Structures

struct  icalset
struct  icalsetiter

Enumerations

enum  icalset_kind { ICAL_FILE_SET , ICAL_DIR_SET , ICAL_BDB_SET }

Functions

icalerrorenum icalset_add_component (icalset *set, icalcomponent *comp)
icalsetiter icalset_begin_component (icalset *set, icalcomponent_kind kind, icalgauge *gauge, const char *tzid)
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 *c)
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 *oldc, icalcomponent *newc)
icalset * icalset_new (icalset_kind kind, const char *dsn, void *options)
icalset * icalset_new_dir (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)
bool icalset_register_class (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 *i)
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

Detailed Description

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

Author
eric 28 November 1999

Derived classes (actually delegatees) include:

icalfileset Store components in a single file icaldirset Store components in multiple files in a directory icalbdbset Store components in a Berkeley DB File icalheapset Store components on the heap icalmysqlset Store components in a mysql database.

Definition in file icalset.h.

Enumeration Type Documentation

◆ icalset_kind

The kinds of supported sets.

Enumerator
ICAL_FILE_SET 

file based

ICAL_DIR_SET 

directory based

ICAL_BDB_SET 

Berkely database based

Definition at line 37 of file icalset.h.

Function Documentation

◆ icalset_add_component()

icalerrorenum icalset_add_component ( icalset * set,
icalcomponent * comp )

Definition at line 353 of file icalset.c.

◆ icalset_begin_component()

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

Definition at line 415 of file icalset.c.

◆ icalset_commit()

icalerrorenum icalset_commit ( icalset * set)

Writes changes to disk immediately.

Definition at line 348 of file icalset.c.

◆ icalset_count_components()

int icalset_count_components ( icalset * set,
icalcomponent_kind kind )

Definition at line 363 of file icalset.c.

◆ icalset_fetch()

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

Gets a component by uid.

Definition at line 378 of file icalset.c.

◆ icalset_fetch_match()

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

Definition at line 383 of file icalset.c.

◆ icalset_free()

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.

◆ icalset_get_current_component()

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.

◆ icalset_get_first_component()

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.

◆ icalset_get_next_component()

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.

◆ icalset_has_uid()

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

Definition at line 388 of file icalset.c.

◆ icalset_mark()

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.

◆ icalset_modify()

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_new()

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.

◆ icalset_new_dir()

icalset * icalset_new_dir ( const char * path)

Definition at line 308 of file icalset.c.

◆ icalset_new_file()

icalset * icalset_new_file ( const char * path)

Definition at line 293 of file icalset.c.

◆ icalset_new_file_reader()

icalset * icalset_new_file_reader ( const char * path)

Definition at line 303 of file icalset.c.

◆ icalset_new_file_writer()

icalset * icalset_new_file_writer ( const char * path)

Definition at line 298 of file icalset.c.

◆ icalset_path()

const char * icalset_path ( icalset * set)

Definition at line 338 of file icalset.c.

◆ icalset_register_class()

bool icalset_register_class ( icalset * set)

Registers a new derived class.

Parameters
seta pointer to a valid icalset to register.
Returns
true if the registration succeeded; false otherwise.

◆ icalset_remove_component()

icalerrorenum icalset_remove_component ( icalset * set,
icalcomponent * comp )

Definition at line 358 of file icalset.c.

◆ icalset_select()

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.

◆ icalsetiter_deref()

icalcomponent * icalsetiter_deref ( icalsetiter * i)

Definition at line 453 of file icalset.c.

◆ icalsetiter_next()

icalcomponent * icalsetiter_next ( icalsetiter * i)

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

Definition at line 421 of file icalset.c.

◆ icalsetiter_prior()

icalcomponent * icalsetiter_prior ( icalsetiter * i)

Definition at line 437 of file icalset.c.

◆ icalsetiter_to_next()

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.

◆ icalsetiter_to_prior()

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

Definition at line 465 of file icalset.c.

Variable Documentation

◆ icalsetiter_null

icalsetiter icalsetiter_null
extern

External Iterator with gauge - for thread safety

Definition at line 413 of file icalset.c.