# MIMEDirVEvent

## Name

MIMEDirVEvent -- iCalendar event object

## Synopsis

    #include <mimedir/mimedir-vevent.h>

                        MIMEDirVEvent;

    MIMEDirVEvent*      mimedir_vevent_new                  (void);
    MIMEDirVEvent*      mimedir_vevent_new_from_profile     (MIMEDirProfile *profile,
                                                             GError **error);
    gboolean            mimedir_vevent_read_from_profile    (MIMEDirVEvent *vevent,
                                                             MIMEDirProfile *profile,
                                                             GError **error);
    gboolean            mimedir_vevent_write_to_channel     (MIMEDirVEvent *vevent,
                                                             GIOChannel *channel,
                                                             GError **error);
    MIMEDirProfile*     mimedir_vevent_write_to_profile     (MIMEDirVEvent *vevent);
    gchar*              mimedir_vevent_write_to_string      (MIMEDirVEvent *vevent);

## Description

## Details

### MIMEDirVEvent

    typedef struct {
    	MIMEDirVComponent parent;

    	MIMEDirVEventPriv *priv;
    } MIMEDirVEvent;

### mimedir_vevent_new ()

    MIMEDirVEvent*      mimedir_vevent_new                  (void);

Creates a new (empty) vevent object.

Returns : | a new vevent object

### mimedir_vevent_new_from_profile ()

    MIMEDirVEvent*      mimedir_vevent_new_from_profile     (MIMEDirProfile *profile,
                                                             GError **error);

Create a new vEvent 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 MIMEDirProfile object
`error` : | error storage location or `NULL`
Returns : | the new vEvent object or `NULL`

### mimedir_vevent_read_from_profile ()

    gboolean            mimedir_vevent_read_from_profile    (MIMEDirVEvent *vevent,
                                                             MIMEDirProfile *profile,
                                                             GError **error);

Clears the supplied vEvent 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.

`vevent` : | a vEvent object
`profile` : | a profile object
`error` : | error storage location or `NULL`
Returns : | success indicator

### mimedir_vevent_write_to_channel ()

    gboolean            mimedir_vevent_write_to_channel     (MIMEDirVEvent *vevent,
                                                             GIOChannel *channel,
                                                             GError **error);

Saves the vEvent 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.

`vevent` : | a MIMEDirVEvent object
`channel` : | I/O channel to save to
`error` : | error storage location or `NULL`
Returns : | success indicator

### mimedir_vevent_write_to_profile ()

    MIMEDirProfile*     mimedir_vevent_write_to_profile     (MIMEDirVEvent *vevent);

Saves the vEvent object to a newly allocated profile object.

`vevent` : | a MIMEDirVEvent object
Returns : | a new profile

### mimedir_vevent_write_to_string ()

    gchar*              mimedir_vevent_write_to_string      (MIMEDirVEvent *vevent);

Saves the vevent object to a newly allocated memory buffer. You should free the returned buffer with `g_free()`.

`vevent` : | a MIMEDirVEvent object
Returns : | a newly allocated memory buffer