OpenAB  1.0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
OpenAB_Storage::CalendarStorage Class Referenceabstract

Documentation for ContactsStorage interface. Provides functionalities specific to Storage of OpenAB::eContact items. More...

#include <CalendarStorage.hpp>

Inheritance diagram for OpenAB_Storage::CalendarStorage:
Collaboration diagram for OpenAB_Storage::CalendarStorage:

Public Member Functions

 CalendarStorage (OpenAB::PIMItemType type)
 Constructor. More...
 
virtual ~CalendarStorage ()
 Destructor, virtual by default. More...
 
enum Storage::eAddItem addItem (const OpenAB::SmartPtr< OpenAB::PIMItem > &item, OpenAB::PIMItem::ID &newId, OpenAB::PIMItem::Revision &revision)
 Adds a new item (OpenAB::PIMItem) to the Storage. More...
 
enum Storage::eAddItem addItems (const std::vector< OpenAB::SmartPtr< OpenAB::PIMItem > > &items, OpenAB::PIMItem::IDs &newIds, OpenAB::PIMItem::Revisions &revisions)
 Adds new items (OpenAB::PIMItem) to the Storage. More...
 
enum Storage::eModifyItem modifyItem (const OpenAB::SmartPtr< OpenAB::PIMItem > &item, const OpenAB::PIMItem::ID &id, OpenAB::PIMItem::Revision &revision)
 Modifies item (OpenAB::PIMItem) in the Storage. More...
 
enum Storage::eModifyItem modifyItems (const std::vector< OpenAB::SmartPtr< OpenAB::PIMItem > > &items, const OpenAB::PIMItem::IDs &ids, OpenAB::PIMItem::Revisions &revisions)
 Modifies items (OpenAB::PIMItem) in the Storage. More...
 
enum Storage::eRemoveItem removeItem (const OpenAB::PIMItem::ID &id)
 Removes item from the Storage. More...
 
enum Storage::eRemoveItem removeItems (const OpenAB::PIMItem::IDs &ids)
 Removes items from the Storage. More...
 
enum Storage::eGetItem getItem (const OpenAB::PIMItem::ID &id, OpenAB::SmartPtr< OpenAB::PIMItem > &item)
 Get the item from the Storage. More...
 
enum Storage::eGetItem getItems (const OpenAB::PIMItem::IDs &id, std::vector< OpenAB::SmartPtr< OpenAB::PIMItem > > &item)
 Get the items from the Storage. More...
 
virtual enum Storage::eAddItem addObject (const std::string &iCal, OpenAB::PIMItem::ID &newId, OpenAB::PIMItem::Revision &revision)=0
 Adds a new contact to the ContactsStorage. More...
 
virtual enum Storage::eAddItem addObjects (const std::vector< std::string > &iCals, OpenAB::PIMItem::IDs &newIds, OpenAB::PIMItem::Revisions &revisions)=0
 Adds new contacts to the ContactsStorage. More...
 
virtual enum Storage::eModifyItem modifyObject (const std::string &iCal, const OpenAB::PIMItem::ID &id, OpenAB::PIMItem::Revision &revision)=0
 Modifies contact in the ContactsStorage. More...
 
virtual enum Storage::eModifyItem modifyObjects (const std::vector< std::string > &iCals, const OpenAB::PIMItem::IDs &ids, OpenAB::PIMItem::Revisions &revisions)=0
 Modifies contacts in the ContactsStorage. More...
 
virtual enum Storage::eRemoveItem removeObject (const OpenAB::PIMItem::ID &id)=0
 Removes contact from the ContactsStorage. More...
 
virtual enum Storage::eRemoveItem removeObjects (const OpenAB::PIMItem::IDs &ids)=0
 Removes contacts from the ContactsStorage. More...
 
virtual enum Storage::eGetItem getEvent (const OpenAB::PIMItem::ID &id, OpenAB::SmartPtr< OpenAB::PIMCalendarEventItem > &item)=0
 Get the contact from the Storage. More...
 
virtual enum eGetItem getEvents (const OpenAB::PIMItem::IDs &ids, std::vector< OpenAB::SmartPtr< OpenAB::PIMCalendarEventItem > > &items)=0
 Get the contacts from the Storage. More...
 
virtual enum Storage::eGetItem getTask (const OpenAB::PIMItem::ID &id, OpenAB::SmartPtr< OpenAB::PIMCalendarTaskItem > &item)=0
 Get the contact from the Storage. More...
 
virtual enum eGetItem getTasks (const OpenAB::PIMItem::IDs &ids, std::vector< OpenAB::SmartPtr< OpenAB::PIMCalendarTaskItem > > &items)=0
 Get the contacts from the Storage. More...
 
- Public Member Functions inherited from OpenAB_Storage::Storage
 Storage (OpenAB::PIMItemType t)
 Constructor. More...
 
virtual ~Storage ()
 Destructor, virtual by default. More...
 
virtual enum eGetItemRet getItem (OpenAB::SmartPtr< OpenAB::PIMItem > &item)=0
 Gets PIM Item from Source. If Source is suspended getItem() should block until Source will be resumed or cancelled. More...
 
virtual
OpenAB_Storage::Storage::eGetSyncToken 
getLatestSyncToken (std::string &token)=0
 If storage supports tracking of items changes, it returns latest status identifier of the storage. More...
 
virtual
OpenAB_Storage::Storage::eGetRevisions 
getRevisions (std::map< std::string, std::string > &revisions)=0
 Gets revision of the items from the Storage. More...
 
virtual
OpenAB_Storage::Storage::eGetRevisions 
getChangedRevisions (const std::string &token, std::map< std::string, std::string > &revisions, std::vector< OpenAB::PIMItem::ID > &removed)=0
 Gets revisions of items changed since Storage was in state identified by token. More...
 
virtual StorageItemIteratornewStorageItemIterator ()=0
 Retrieve an new Iterator to quickly parse the list of items. More...
 
- Public Member Functions inherited from OpenAB_Source::Source
 Source (OpenAB::PIMItemType t)
 Constructor. More...
 
virtual ~Source ()
 Destructor, virtual by default. More...
 
virtual enum eInit init ()=0
 Initializes Source. More...
 
virtual enum eSuspendRet suspend ()=0
 Suspends Source, if such operation is supported. More...
 
virtual enum eResumeRet resume ()=0
 Resumes Source, if such operation is supported. More...
 
virtual enum eCancelRet cancel ()=0
 Cancels Source, if such operation is supported. After canceling Source next call to getVCard() should return eGetItemRetError status. More...
 
virtual int getTotalCount () const =0
 Returns total count of items available from Source, if such information is available. More...
 
OpenAB::PIMItemType getItemType () const
 Returns type of PIM Item supported by Source. More...
 

Additional Inherited Members

- Public Types inherited from OpenAB_Storage::Storage
enum  eAddItem { eAddItemOk, eAddItemFail }
 
enum  eModifyItem { eModifyItemOk, eModifyItemFail }
 
enum  eRemoveItem { eRemoveItemOk, eRemoveItemFail }
 
enum  eGetItem { eGetItemOk, eGetItemFail }
 
enum  eGetSyncToken { eGetSyncTokenOk, eGetSyncTokenFail }
 
enum  eGetRevisions { eGetRevisionsOk, eGetRevisionsFail }
 
- Public Types inherited from OpenAB_Source::Source
enum  eInit { eInitOk, eInitFail }
 
enum  eSuspendRet { eSuspendRetOk, eSuspendRetFail, eSuspendRetNotSupported }
 
enum  eResumeRet { eResumeRetOk, eResumeRetFail, eResumeRetNotSupported }
 
enum  eCancelRet { eCancelRetOk, eCancelRetFail, eCancelRetNotSupported }
 
enum  eGetItemRet { eGetItemRetOk, eGetItemRetEnd, eGetItemRetError }
 

Detailed Description

Documentation for ContactsStorage interface. Provides functionalities specific to Storage of OpenAB::eContact items.

Todo:

extend interface (locale handling, search queries etc)

define new return codes for contact specific operations.

Constructor & Destructor Documentation

OpenAB_Storage::CalendarStorage::CalendarStorage ( OpenAB::PIMItemType  type)

Constructor.

OpenAB_Storage::CalendarStorage::~CalendarStorage ( )
virtual

Destructor, virtual by default.

Member Function Documentation

enum Storage::eAddItem OpenAB_Storage::CalendarStorage::addItem ( const OpenAB::SmartPtr< OpenAB::PIMItem > &  item,
OpenAB::PIMItem::ID newId,
OpenAB::PIMItem::Revision revision 
)
virtual

Adds a new item (OpenAB::PIMItem) to the Storage.

Parameters
[in]itemPIMItem that should be added (PIMItem type needs to be the same as type of item supported by Storage (Storage::getItemType()).
[out]newIdThe newly added item ID.
[out]revisionThe revision of newly added item - can be empty if revisions are not supported.
Returns
the status code

Implements OpenAB_Storage::Storage.

enum Storage::eAddItem OpenAB_Storage::CalendarStorage::addItems ( const std::vector< OpenAB::SmartPtr< OpenAB::PIMItem > > &  items,
OpenAB::PIMItem::IDs newIds,
OpenAB::PIMItem::Revisions revisions 
)
virtual

Adds new items (OpenAB::PIMItem) to the Storage.

Parameters
[in]itemsThe vector of items that should be added. (PIMItem type needs to be the same as type of item supported by Storage (Storage::getItemType()).
[out]newIdsThe newly added items ID in the same order as provided items.
[out]revisionsThe revisions of newly added items (in the same order as provided items).
Returns
the status code

Implements OpenAB_Storage::Storage.

virtual enum Storage::eAddItem OpenAB_Storage::CalendarStorage::addObject ( const std::string &  iCal,
OpenAB::PIMItem::ID newId,
OpenAB::PIMItem::Revision revision 
)
pure virtual

Adds a new contact to the ContactsStorage.

Parameters
[in]vCardvCard of contact to should added.
[out]newIdThe newly added contact ID.
[out]revisionThe revision of newly added contact - can be empty if revisions are not supported.
Returns
the status code

Implemented in CalDAVStorage, and EDSCalendarStorage.

virtual enum Storage::eAddItem OpenAB_Storage::CalendarStorage::addObjects ( const std::vector< std::string > &  iCals,
OpenAB::PIMItem::IDs newIds,
OpenAB::PIMItem::Revisions revisions 
)
pure virtual

Adds new contacts to the ContactsStorage.

Parameters
[in]vCardsThe vector of contacts' vCards that should be added.
[out]newIdsThe newly added contacts ID in the same order as provided vCards.
[out]revisionsThe revisions of newly added contacts (in the same order as provided vCards). Can be empty if revisions are not supported.
Returns
the status code

Implemented in CalDAVStorage, and EDSCalendarStorage.

virtual enum Storage::eGetItem OpenAB_Storage::CalendarStorage::getEvent ( const OpenAB::PIMItem::ID id,
OpenAB::SmartPtr< OpenAB::PIMCalendarEventItem > &  item 
)
pure virtual

Get the contact from the Storage.

Parameters
[in]idThe ID of the contact that must be retrieved.
[out]itemThe OpenAB::PIMContactItem that was retrieved.
Returns
the status code

Implemented in CalDAVStorage, and EDSCalendarStorage.

virtual enum eGetItem OpenAB_Storage::CalendarStorage::getEvents ( const OpenAB::PIMItem::IDs ids,
std::vector< OpenAB::SmartPtr< OpenAB::PIMCalendarEventItem > > &  items 
)
pure virtual

Get the contacts from the Storage.

Parameters
[in]idThe IDs of the contacts that must be retrieved.
[out]itemsThe OpenAB::PIMContactItem that was retrieved.
Returns
the status code

Implemented in CalDAVStorage, and EDSCalendarStorage.

enum Storage::eGetItem OpenAB_Storage::CalendarStorage::getItem ( const OpenAB::PIMItem::ID id,
OpenAB::SmartPtr< OpenAB::PIMItem > &  item 
)
virtual

Get the item from the Storage.

Parameters
[in]idThe ID of the item that must be retrieved.
[out]itemThe item that was retrieved.
Returns
the status code

find more elegant way to take ownership of pointer.

find more elegant way to take ownership of pointer.

Implements OpenAB_Storage::Storage.

enum Storage::eGetItem OpenAB_Storage::CalendarStorage::getItems ( const OpenAB::PIMItem::IDs ids,
std::vector< OpenAB::SmartPtr< OpenAB::PIMItem > > &  items 
)
virtual

Get the items from the Storage.

Parameters
[in]idsThe IDs of the items that must be retrieved.
[out]itemsThe items that was retrieved.
Returns
the status code

find more elegant way to take ownership of pointer.

find more elegant way to take ownership of pointer.

Implements OpenAB_Storage::Storage.

virtual enum Storage::eGetItem OpenAB_Storage::CalendarStorage::getTask ( const OpenAB::PIMItem::ID id,
OpenAB::SmartPtr< OpenAB::PIMCalendarTaskItem > &  item 
)
pure virtual

Get the contact from the Storage.

Parameters
[in]idThe ID of the contact that must be retrieved.
[out]itemThe OpenAB::PIMContactItem that was retrieved.
Returns
the status code

Implemented in CalDAVStorage, and EDSCalendarStorage.

virtual enum eGetItem OpenAB_Storage::CalendarStorage::getTasks ( const OpenAB::PIMItem::IDs ids,
std::vector< OpenAB::SmartPtr< OpenAB::PIMCalendarTaskItem > > &  items 
)
pure virtual

Get the contacts from the Storage.

Parameters
[in]idThe IDs of the contacts that must be retrieved.
[out]itemsThe OpenAB::PIMContactItem that was retrieved.
Returns
the status code

Implemented in CalDAVStorage, and EDSCalendarStorage.

enum Storage::eModifyItem OpenAB_Storage::CalendarStorage::modifyItem ( const OpenAB::SmartPtr< OpenAB::PIMItem > &  item,
const OpenAB::PIMItem::ID id,
OpenAB::PIMItem::Revision revision 
)
virtual

Modifies item (OpenAB::PIMItem) in the Storage.

Parameters
[in]itemThe item that should be modified. (PIMItem type needs to be the same as type of item supported by Storage (Storage::getItemType()).
[in]idThe ID of the item that should be modified.
[out]revisionThe updated revision of modified items.
Returns
the status code

Implements OpenAB_Storage::Storage.

enum Storage::eModifyItem OpenAB_Storage::CalendarStorage::modifyItems ( const std::vector< OpenAB::SmartPtr< OpenAB::PIMItem > > &  items,
const OpenAB::PIMItem::IDs ids,
OpenAB::PIMItem::Revisions revisions 
)
virtual

Modifies items (OpenAB::PIMItem) in the Storage.

Parameters
[in]itemsThe vector of items to be modified. (PIMItem type needs to be the same as type of item supported by Storage (Storage::getItemType()).
[in]idsThe vector of ID of the items that must be modified (in the same order as provided items).
[out]revisionsThe updated revisions of modified items (in the same order as provided items).
Returns
the status code

Implements OpenAB_Storage::Storage.

virtual enum Storage::eModifyItem OpenAB_Storage::CalendarStorage::modifyObject ( const std::string &  iCal,
const OpenAB::PIMItem::ID id,
OpenAB::PIMItem::Revision revision 
)
pure virtual

Modifies contact in the ContactsStorage.

Parameters
[in]vCardvCard of contact that should be modified.
[in]idThe ID of the item that should be modified.
[out]revisionThe updated revision of modified contact.
Returns
the status code

Implemented in CalDAVStorage, and EDSCalendarStorage.

virtual enum Storage::eModifyItem OpenAB_Storage::CalendarStorage::modifyObjects ( const std::vector< std::string > &  iCals,
const OpenAB::PIMItem::IDs ids,
OpenAB::PIMItem::Revisions revisions 
)
pure virtual

Modifies contacts in the ContactsStorage.

Parameters
[in]vCardsThe vector of contact's vCards that should be modified.
[in]idsThe vector of ID of the contacts that must be modified (in the same order as provided vCards).
[out]revisionsThe updated revisions of modified contacts (in the same order as provided vCards).
Returns
the status code

Implemented in CalDAVStorage, and EDSCalendarStorage.

enum Storage::eRemoveItem OpenAB_Storage::CalendarStorage::removeItem ( const OpenAB::PIMItem::ID id)
virtual

Removes item from the Storage.

Parameters
[in]idThe ID of the item that must be removed.
Returns
the status code

Implements OpenAB_Storage::Storage.

enum Storage::eRemoveItem OpenAB_Storage::CalendarStorage::removeItems ( const OpenAB::PIMItem::IDs ids)
virtual

Removes items from the Storage.

Parameters
[in]idsThe vector of ID of the items that must be removed.
Returns
the status code

Implements OpenAB_Storage::Storage.

virtual enum Storage::eRemoveItem OpenAB_Storage::CalendarStorage::removeObject ( const OpenAB::PIMItem::ID id)
pure virtual

Removes contact from the ContactsStorage.

Parameters
[in]idThe ID of the contact that must be removed.
Returns
the status code

Implemented in CalDAVStorage, and EDSCalendarStorage.

virtual enum Storage::eRemoveItem OpenAB_Storage::CalendarStorage::removeObjects ( const OpenAB::PIMItem::IDs ids)
pure virtual

Removes contacts from the ContactsStorage.

Parameters
[in]idsThe vector of ID of the contacts that must be removed.
Returns
the status code

Implemented in CalDAVStorage, and EDSCalendarStorage.


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