EvolutionMemoSource Class Reference

#include <EvolutionMemoSource.h>

Inheritance diagram for EvolutionMemoSource:

Inheritance graph
[legend]
Collaboration diagram for EvolutionMemoSource:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 EvolutionMemoSource (const EvolutionSyncSourceParams &params)
virtual SyncItem * createItem (const string &uid)
virtual InsertItemResult insertItem (const string &luid, const SyncItem &item)
virtual const char * getMimeType () const
virtual const char * getMimeVersion () const
virtual const char * getSupportedTypes () const


Detailed Description

Implements access to Evolution memo lists (stored as calendars), exporting/importing the memos in plain UTF-8 text. Only the DESCRIPTION part of a memo is synchronized.

Definition at line 32 of file EvolutionMemoSource.h.


Constructor & Destructor Documentation

EvolutionMemoSource::EvolutionMemoSource ( const EvolutionSyncSourceParams params  )  [inline]

Definition at line 35 of file EvolutionMemoSource.h.


Member Function Documentation

SyncItem * EvolutionMemoSource::createItem ( const string &  uid  )  [virtual]

Extract information for the item identified by UID and store it in a new SyncItem. The caller must free that item. May throw exceptions.

Parameters:
uid identifies the item

Reimplemented from EvolutionCalendarSource.

Definition at line 31 of file EvolutionMemoSource.cpp.

References EvolutionCalendarSource::logItem(), and EvolutionCalendarSource::retrieveItem().

virtual const char* EvolutionMemoSource::getMimeType (  )  const [inline, virtual]

Returns the preferred mime type of the items handled by the sync source. Example: "text/x-vcard"

Reimplemented from EvolutionCalendarSource.

Definition at line 43 of file EvolutionMemoSource.h.

virtual const char* EvolutionMemoSource::getMimeVersion (  )  const [inline, virtual]

Returns the version of the mime type used by client. Example: "2.1"

Reimplemented from EvolutionCalendarSource.

Definition at line 44 of file EvolutionMemoSource.h.

virtual const char* EvolutionMemoSource::getSupportedTypes (  )  const [inline, virtual]

A string representing the source types (with versions) supported by the SyncSource. The string must be formatted as a sequence of "type:version" separated by commas ','. For example: "text/x-vcard:2.1,text/vcard:3.0". The version can be left empty, for example: "text/x-s4j-sifc:". Supported types will be sent as part of the DevInf.

Reimplemented from EvolutionCalendarSource.

Definition at line 45 of file EvolutionMemoSource.h.

EvolutionCalendarSource::InsertItemResult EvolutionMemoSource::insertItem ( const string &  uid,
const SyncItem &  item 
) [virtual]

Create or modify an item.

The sync source should be flexible: if the UID is non-empty, it shall modify the item referenced by the UID. If the UID is empty, the normal operation is to add it. But if the item already exists (e.g., a calendar event which was imported by the user manually), then the existing item should be updated also in the second case.

Passing a UID of an item which does not exist is an error. This error should be reported instead of covering it up by (re)creating the item.

Errors are signalled by throwing an exception. Returning empty strings in the result is an error which triggers an "item could not be stored" error.

Parameters:
uid identifies the item to be modified, empty for creating
item contains the new content of the item and its MIME type
Returns:
the result of inserting the item

Reimplemented from EvolutionCalendarSource.

Definition at line 113 of file EvolutionMemoSource.cpp.

References EvolutionCalendarSource::getItemID(), EvolutionCalendarSource::getItemModTime(), EvolutionCalendarSource::ItemID::getLUID(), EvolutionCalendarSource::logItem(), EvolutionCalendarSource::m_calendar, eptr< T, base, R >::set(), EvolutionSyncSource::throwError(), and runtests::type.


The documentation for this class was generated from the following files:

Generated on Sat Oct 18 17:17:04 2008 for SyncEvolution and Funambol by  doxygen 1.5.7.1