blueZync

Synchronize Bluetooth phone with Thunderbird

Develpers' detailed documentation for the mozilla-sync plugin for OpenSync. A part of blueZync.

calendar-event.h File Reference


Detailed Description

Functions for mozilla calendar (headers).

#include <glib.h>
#include "mozilla-headers.h"
#include <storage/mozIStorageConnection.h>

Include dependency graph for calendar-event.h:

This graph shows which files directly or indirectly include this file:


Functions

gboolean EventAdd (mozIStorageConnection *pConn, const char *szCalId, const char *szICS, char **pSzNewKey, char **pSzNewHash, char **pSzError, void(*pLogFunction)(int level, bool sensitive, const char *szFile, int iLine, const char *szFunc, const char *szFormat,...))
 Add an event to mozilla calendar.
gboolean EventICS (mozIStorageConnection *pConn, const char *szCalId, const char *szKey, char **pSzICS, char **pSzError, void(*pLogFunction)(int level, bool sensitive, const char *szFile, int iLine, const char *szFunc, const char *szFormat,...))
 Get vcalendar representation of mozilla calendar event.
gboolean EventModify (mozIStorageConnection *pConn, const char *szCalId, const char *szKey, const char *szICS, char **pSzNewHash, char **pSzError, void(*pLogFunction)(int level, bool sensitive, const char *szFile, int iLine, const char *szFunc, const char *szFormat,...))
 Modify an event in a mozilla calendar.
GList * PGListEventCapabilities ()
 Get list of field names representing Sunbird Event capabilities.

Function Documentation

gboolean EventAdd ( mozIStorageConnection *  pConn,
const char *  szCalId,
const char *  szICS,
char **  pSzNewKey,
char **  pSzNewHash,
char **  pSzError,
void(*)(int level, bool sensitive, const char *szFile, int iLine, const char *szFunc, const char *szFormat,...)  pLogFunction 
)

Add an event to mozilla calendar.

Parameters:
pConn (IN) Open connection to mozilla storage
szCalId (IN) Identifier of mozilla calendar
szICS (IN) String in vcalendar format
pSzNewKey (OUT) The generated uuid of the event
pSzNewHash (OUT) The hash value (modified time) of the event
pSzError (OUT) Pointer to string, into which we shall write an error message if we return false
pLogFunction (OUT)Function used to log information text
Returns:
TRUE on success; FALSE on error

References EventModify(), GFREE, globalUuidgen, LOG, MOZ_ERROR_CHECK_FALSE, and SQL_ERROR_CHECK_FALSE.

Referenced by MozillaCalendar::AddEvent().

Here is the call graph for this function:

gboolean EventICS ( mozIStorageConnection *  pConn,
const char *  szCalId,
const char *  szKey,
char **  pSzICS,
char **  pSzError,
void(*)(int level, bool sensitive, const char *szFile, int iLine, const char *szFunc, const char *szFormat,...)  pLogFunction 
)

Get vcalendar representation of mozilla calendar event.

Todo:
szCalId is not really needed, as szKey is unique over calendars
Parameters:
pConn (IN) Open connection to mozilla storage
szCalId (IN) Identifier of mozilla calendar
szKey (IN) The uuid of the event to change
pSzICS (OUT) Produced string in VCALENDAR format
pSzError (OUT) Pointer to string, into which we shall write an error message if we return false
pLogFunction (OUT)Function used to log information text
Returns:
TRUE on success; FALSE on error

References CAL_ADD_TIME_PROPERTY, GFREE, globalIcsService, LOG, MAX_MOZVCARD_ARRAY, MOZ_ERROR_CHECK_FALSE, SQL_ERROR_CHECK_FALSE, and _TMozVcardPair::szMozilla.

Referenced by MozillaCalendar::CurrentICS().

gboolean EventModify ( mozIStorageConnection *  pConn,
const char *  szCalId,
const char *  szKey,
const char *  szICS,
char **  pSzNewHash,
char **  pSzError,
void(*)(int level, bool sensitive, const char *szFile, int iLine, const char *szFunc, const char *szFormat,...)  pLogFunction 
)

Modify an event in a mozilla calendar.

Parameters:
pConn (IN) Open connection to mozilla storage
szCalId (IN) Identifier of mozilla calendar
szKey (IN) The uuid of the event to change
szICS (IN) String in vcalendar format
pSzNewHash (OUT) The hash value (modified time) of the event
pSzError (OUT) Pointer to string, into which we shall write an error message if we return false
pLogFunction (OUT)Function used to log information text
Returns:
TRUE on success; FALSE on error

References CAL_MODIFY_TIME_PROPERTY, GFREE, globalIcsService, LOG, LOG_SENSITIVE, MAX_MOZVCARD_ARRAY, MOZ_ERROR_CHECK_FALSE, SQL_ERROR_CHECK_FALSE, SQL_ERROR_CHECK_NOROWSOK_FALSE, _TMozVcardPair::szMozilla, and _TMozVcardPair::szVcard.

Referenced by EventAdd(), and MozillaCalendar::ModifyEvent().

GList* PGListEventCapabilities (  ) 

Get list of field names representing Sunbird Event capabilities.

References apSzCapabilities.

Referenced by mozilla_sync_initialize().