OpenAB
1.0.1
|
Documentation for ContactsStorage interface. Provides functionalities specific to Storage of OpenAB::eContact items. More...
#include <ContactsStorage.hpp>
Public Member Functions | |
ContactsStorage () | |
Constructor. More... | |
virtual | ~ContactsStorage () |
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 | addContact (const std::string &vCard, OpenAB::PIMItem::ID &newId, OpenAB::PIMItem::Revision &revision)=0 |
Adds a new contact to the ContactsStorage. More... | |
virtual enum Storage::eAddItem | addContacts (const std::vector< std::string > &vCards, OpenAB::PIMItem::IDs &newIds, OpenAB::PIMItem::Revisions &revisions)=0 |
Adds new contacts to the ContactsStorage. More... | |
virtual enum Storage::eModifyItem | modifyContact (const std::string &vCard, const OpenAB::PIMItem::ID &id, OpenAB::PIMItem::Revision &revision)=0 |
Modifies contact in the ContactsStorage. More... | |
virtual enum Storage::eModifyItem | modifyContacts (const std::vector< std::string > &vCards, const OpenAB::PIMItem::IDs &ids, OpenAB::PIMItem::Revisions &revisions)=0 |
Modifies contacts in the ContactsStorage. More... | |
virtual enum Storage::eRemoveItem | removeContact (const OpenAB::PIMItem::ID &id)=0 |
Removes contact from the ContactsStorage. More... | |
virtual enum Storage::eRemoveItem | removeContacts (const OpenAB::PIMItem::IDs &ids)=0 |
Removes contacts from the ContactsStorage. More... | |
virtual enum Storage::eGetItem | getContact (const OpenAB::PIMItem::ID &id, OpenAB::SmartPtr< OpenAB::PIMContactItem > &item)=0 |
Get the contact from the Storage. More... | |
virtual enum eGetItem | getContacts (const OpenAB::PIMItem::IDs &ids, std::vector< OpenAB::SmartPtr< OpenAB::PIMContactItem > > &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 StorageItemIterator * | newStorageItemIterator ()=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 } |
Documentation for ContactsStorage interface. Provides functionalities specific to Storage of OpenAB::eContact items.
extend interface (locale handling, search queries etc)
define new return codes for contact specific operations.
OpenAB_Storage::ContactsStorage::ContactsStorage | ( | ) |
Constructor.
|
virtual |
Destructor, virtual by default.
|
pure virtual |
Adds a new contact to the ContactsStorage.
[in] | vCard | vCard of contact to should added. |
[out] | newId | The newly added contact ID. |
[out] | revision | The revision of newly added contact - can be empty if revisions are not supported. |
Implemented in CardDAVStorage, and EDSContactsStorage.
|
pure virtual |
Adds new contacts to the ContactsStorage.
[in] | vCards | The vector of contacts' vCards that should be added. |
[out] | newIds | The newly added contacts ID in the same order as provided vCards. |
[out] | revisions | The revisions of newly added contacts (in the same order as provided vCards). Can be empty if revisions are not supported. |
Implemented in CardDAVStorage, and EDSContactsStorage.
|
virtual |
Adds a new item (OpenAB::PIMItem) to the Storage.
[in] | item | PIMItem that should be added (PIMItem type needs to be the same as type of item supported by Storage (Storage::getItemType()). |
[out] | newId | The newly added item ID. |
[out] | revision | The revision of newly added item - can be empty if revisions are not supported. |
Implements OpenAB_Storage::Storage.
|
virtual |
Adds new items (OpenAB::PIMItem) to the Storage.
[in] | items | The vector of items that should be added. (PIMItem type needs to be the same as type of item supported by Storage (Storage::getItemType()). |
[out] | newIds | The newly added items ID in the same order as provided items. |
[out] | revisions | The revisions of newly added items (in the same order as provided items). |
Implements OpenAB_Storage::Storage.
|
pure virtual |
Get the contact from the Storage.
[in] | id | The ID of the contact that must be retrieved. |
[out] | item | The OpenAB::PIMContactItem that was retrieved. |
Implemented in CardDAVStorage, and EDSContactsStorage.
|
pure virtual |
Get the contacts from the Storage.
[in] | id | The IDs of the contacts that must be retrieved. |
[out] | items | The OpenAB::PIMContactItem that was retrieved. |
Implemented in CardDAVStorage, and EDSContactsStorage.
|
virtual |
Get the item from the Storage.
[in] | id | The ID of the item that must be retrieved. |
[out] | item | The item that was retrieved. |
Implements OpenAB_Storage::Storage.
|
virtual |
Get the items from the Storage.
[in] | ids | The IDs of the items that must be retrieved. |
[out] | items | The items that was retrieved. |
find more elegant way to take ownership of pointer.
Implements OpenAB_Storage::Storage.
|
pure virtual |
Modifies contact in the ContactsStorage.
[in] | vCard | vCard of contact that should be modified. |
[in] | id | The ID of the item that should be modified. |
[out] | revision | The updated revision of modified contact. |
Implemented in CardDAVStorage, and EDSContactsStorage.
|
pure virtual |
Modifies contacts in the ContactsStorage.
[in] | vCards | The vector of contact's vCards that should be modified. |
[in] | ids | The vector of ID of the contacts that must be modified (in the same order as provided vCards). |
[out] | revisions | The updated revisions of modified contacts (in the same order as provided vCards). |
Implemented in CardDAVStorage, and EDSContactsStorage.
|
virtual |
Modifies item (OpenAB::PIMItem) in the Storage.
[in] | item | The item that should be modified. (PIMItem type needs to be the same as type of item supported by Storage (Storage::getItemType()). |
[in] | id | The ID of the item that should be modified. |
[out] | revision | The updated revision of modified items. |
Implements OpenAB_Storage::Storage.
|
virtual |
Modifies items (OpenAB::PIMItem) in the Storage.
[in] | items | The vector of items to be modified. (PIMItem type needs to be the same as type of item supported by Storage (Storage::getItemType()). |
[in] | ids | The vector of ID of the items that must be modified (in the same order as provided items). |
[out] | revisions | The updated revisions of modified items (in the same order as provided items). |
Implements OpenAB_Storage::Storage.
|
pure virtual |
Removes contact from the ContactsStorage.
[in] | id | The ID of the contact that must be removed. |
Implemented in CardDAVStorage, and EDSContactsStorage.
|
pure virtual |
Removes contacts from the ContactsStorage.
[in] | ids | The vector of ID of the contacts that must be removed. |
Implemented in CardDAVStorage, and EDSContactsStorage.
|
virtual |
Removes item from the Storage.
[in] | id | The ID of the item that must be removed. |
Implements OpenAB_Storage::Storage.
|
virtual |
Removes items from the Storage.
[in] | ids | The vector of ID of the items that must be removed. |
Implements OpenAB_Storage::Storage.