|  |  |  | MIME Directory Library Reference Manual |  | 
|---|
#include <mimedir/mimedir-vcal.h> #define MIMEDIR_VCAL_ERROR enum MIMEDirVCalError; #define MIMEDIR_VCAL_ERROR_UNKNOWN_SCALE_STR MIMEDirVCal; void mimedir_vcal_free_list (GList *list); MIMEDirVCal* mimedir_vcal_new (void); MIMEDirVCal* mimedir_vcal_new_from_profile (MIMEDirProfile *profile, GError **error); gboolean mimedir_vcal_read_from_profile (MIMEDirVCal *vcal, MIMEDirProfile *profile, GError **error); gboolean mimedir_vcal_write_to_channel (MIMEDirVCal *vcal, GIOChannel *channel, GError **error); MIMEDirProfile* mimedir_vcal_write_to_profile (MIMEDirVCal *vcal); gchar* mimedir_vcal_write_to_string (MIMEDirVCal *vcal); GSList* mimedir_vcal_get_component_list (MIMEDirVCal *vcal); GSList* mimedir_vcal_get_event_list (MIMEDirVCal *vcal); GSList* mimedir_vcal_get_todo_list (MIMEDirVCal *vcal); void mimedir_vcal_add_component (MIMEDirVCal *vcal, MIMEDirVComponent *component); void mimedir_vcal_add_component_list (MIMEDirVCal *vcal, GList *list); void mimedir_vcal_free_component_list (GSList *list);
#define MIMEDIR_VCAL_ERROR mimedir_vcal_error_quark ()
Error domain for MIMEDirAttribute operations. Errors in this domain will be from the MIMEDirAttributeError enumeration. See GError for information on error domains.
typedef enum {
	MIMEDIR_VCAL_ERROR_UNKNOWN_SCALE
} MIMEDirVCalError;Error codes returned by MIMEDirVCal operations.
| MIMEDIR_VCAL_ERROR_UNKNOWN_SCALE | The specified time scale is unknown. | 
#define MIMEDIR_VCAL_ERROR_UNKNOWN_SCALE_STR	_("unknown calendar scale %s")Default string representation of the MIMEDIR_VAL_ERROR_UNKNOWN_SCALE error code.
void mimedir_vcal_free_list (GList *list);
Frees a list of vcals as returned by mimedir_vcal_read_file()
or mimedir_vcal_read_channel().
| list: | list of vcals | 
MIMEDirVCal* mimedir_vcal_new (void);
Creates a new (empty) vcal object.
| Returns : | a new vcal object | 
MIMEDirVCal* mimedir_vcal_new_from_profile (MIMEDirProfile *profile, GError **error);
Create a new vcal object and fills it with data retrieved from the
supplied profile object. If an error occurs during the read, error
will be set and NULL will be returned.
| profile: | a profile object | 
| error: | error storage location or NULL | 
| Returns : | the new vcal object or NULL | 
gboolean mimedir_vcal_read_from_profile (MIMEDirVCal *vcal, MIMEDirProfile *profile, GError **error);
Clears the supplied vcal object and re-initializes it with data read
from the supplied profile. If an error occurs during the read, error
will be set and FALSE will be returned. Otherwise, TRUE is returned.
| vcal: | a vcal | 
| profile: | a profile object | 
| error: | error storage location or NULL | 
| Returns : | success indicator | 
gboolean mimedir_vcal_write_to_channel (MIMEDirVCal *vcal, GIOChannel *channel, GError **error);
Saves the iCal object to the supplied I/O channel. If an error occurs
during the write, error will be set and FALSE will be returned.
Otherwise, TRUE is returned.
| vcal: | a MIMEDirVCal object | 
| channel: | I/O channel to save to | 
| error: | error storage location or NULL | 
| Returns : | success indicator | 
MIMEDirProfile* mimedir_vcal_write_to_profile (MIMEDirVCal *vcal);
Saves the iCal object to a newly allocated profile object.
| vcal: | a MIMEDirVCal object | 
| Returns : | a new profile | 
gchar* mimedir_vcal_write_to_string (MIMEDirVCal *vcal);
Saves the iCal object to a newly allocated memory buffer. You should
free the returned buffer with g_free().
| vcal: | a MIMEDirVCal object | 
| Returns : | a newly allocated memory buffer | 
GSList* mimedir_vcal_get_component_list (MIMEDirVCal *vcal);
Returns all components of this vCalendar. Free the returned list
with mimedir_vcal_free_component_list().
| vcal: | a vCalendar object | 
| Returns : | a GSList consisting of component objects | 
GSList* mimedir_vcal_get_event_list (MIMEDirVCal *vcal);
Returns all vEvent components of this vCalendar. Free the returned list
with mimedir_vcal_free_component_list().
| vcal: | a vCalendar object | 
| Returns : | a GSList consisting of MIMEDirVEvent objects | 
GSList* mimedir_vcal_get_todo_list (MIMEDirVCal *vcal);
Returns all vTodo components of this vCalendar. Free the returned list
with mimedir_vcal_free_component_list().
| vcal: | a vCalendar object | 
| Returns : | a GSList consisting of MIMEDirVTodo objects | 
void mimedir_vcal_add_component (MIMEDirVCal *vcal, MIMEDirVComponent *component);
Adds a single component to the component list of vcal.
| vcal: | |
| component: | 
void mimedir_vcal_add_component_list (MIMEDirVCal *vcal, GList *list);
Adds components to the component list of vcal.
| vcal: | |
| list: | a GList of MIMEDirVComponent objects | 
void mimedir_vcal_free_component_list (GSList *list);
Free a component list as returned by one of the get_*_list functions.
| list: | a GSList | 
| <<< iCal Object Reference | MIMEDirVComponent >>> |