Logo Search packages:      
Sourcecode: libical version File versions

icaldirset.c File Reference

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.

Definition in file icaldirset.c.

#include <libical/ical.h>
#include "icaldirset.h"
#include "icalfileset.h"
#include "icalfilesetimpl.h"
#include "icalcluster.h"
#include "icalgauge.h"
#include <limits.h>
#include <dirent.h>
#include <unistd.h>
#include <sys/utsname.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <time.h>
#include <stdlib.h>
#include <string.h>
#include "icaldirsetimpl.h"

Go to the source code of this file.


icalerrorenum icaldirset_add_component (icalset *set, icalcomponent *comp)
static void icaldirset_add_uid (icalcomponent *comp)
icalsetiter icaldirset_begin_component (icalset *set, icalcomponent_kind kind, icalgauge *gauge)
void icaldirset_clear (icalset *set)
icalerrorenum icaldirset_commit (icalset *set)
int icaldirset_count_components (icalset *store, icalcomponent_kind kind)
icalcomponent * icaldirset_fetch (icalset *set, const char *uid)
icalcomponent * icaldirset_fetch_match (icalset *set, icalcomponent *c)
void icaldirset_free (icalset *s)
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_lock (const char *dir)
void icaldirset_mark (icalset *set)
icalerrorenum icaldirset_modify (icalset *set, icalcomponent *old, icalcomponent *new)
icalset * icaldirset_new (const char *dir)
icalset * icaldirset_new_reader (const char *dir)
icalset * icaldirset_new_writer (const char *dir)
icalerrorenum icaldirset_next_cluster (icaldirset *dset)
int icaldirset_next_uid_number (icaldirset *dset)
const char * icaldirset_path (icalset *set)
icalerrorenum icaldirset_read_directory (icaldirset *dset)
icalerrorenum icaldirset_remove_component (icalset *set, icalcomponent *comp)
icalerrorenum icaldirset_select (icalset *set, icalgauge *gauge)
void icaldirset_unlock (const char *dir)
icalcomponent * icaldirsetiter_to_next (icalset *set, icalsetiter *i)
icalcomponent * icaldirsetiter_to_prior (icalset *set, icalsetiter *i)


icaldirset_options icaldirset_options_default = {O_RDWR|O_CREAT}

Generated by  Doxygen 1.6.0   Back to index