ContactStorage Class Reference

Harmattan Contact storage plugin. More...

`#include <ContactsStorage.h>`

Inheritance diagram for ContactStorage:

## Public Member Functions

| ContactStorage (const QString &aPluginName)
| Constructor.
virtual | ~ContactStorage ()
| Destructor.
virtual bool | init (const QMap< QString, QString > &aProperties)
| Initializes the plugin.
virtual bool | uninit ()
| Uninitializes the plugin.
virtual bool | getAllItems (QList< Buteo::StorageItem * > &aItems)
| Returns all known items.
virtual bool | getAllItemIds (QList< QString > &aItems)
| Returns id's of all known items.
virtual bool | getNewItems (QList< Buteo::StorageItem * > &aNewItems, const QDateTime &aTime)
| Returns all new items since aTime.
virtual bool | getNewItemIds (QList< QString > &aNewItemIds, const QDateTime &aTime)
| Returns id's of all new items since aTime.
virtual bool | getModifiedItems (QList< Buteo::StorageItem * > &aModifiedItems, const QDateTime &aTime)
| Returns all modified items since aTime.
virtual bool | getModifiedItemIds (QList< QString > &aModifiedItemIds, const QDateTime &aTime)
| Returns id's of all modified items since aTime.
virtual bool | getDeletedItemIds (QList< QString > &aDeletedItemIds, const QDateTime &aTime)
| Returns id's of all deleted items since aTime.
virtual Buteo::StorageItem * | newItem ()
| Generates a new item.
virtual Buteo::StorageItem * | getItem (const QString &aItemId)
| Returns an item based on id.
virtual QList< Buteo::StorageItem * > | getItems (const QStringList &aItemIdList)
| Returns items based on ids.
virtual OperationStatus | addItem (Buteo::StorageItem &aItem)
| Adds an item to the storage.
virtual QList< OperationStatus > | addItems (const QList< Buteo::StorageItem * > &aItems)
| Adds items to the storage.
virtual OperationStatus | modifyItem (Buteo::StorageItem &aItem)
| Modifies an item in the storage.
virtual QList< OperationStatus > | modifyItems (const QList< Buteo::StorageItem * > &aItems)
| Modifies item in the storage.
virtual OperationStatus | deleteItem (const QString &aItemId)
| Deletes an item from the storage.
virtual QList< OperationStatus > | deleteItems (const QList< QString > &aItemIds)
| Deletes an item from the storage.

## Detailed Description

Harmattan Contact storage plugin.

## Member Function Documentation

## addItem()

virtual OperationStatus ContactStorage::addItem | ( | Buteo::StorageItem & | aItem | ) |

virtual

Adds an item to the storage.

Upon successful addition, item is updated with its assigned ID.

Parameters

  aItem | Item to add

Returns
  Operation status code

## addItems()

virtual QList< OperationStatus > ContactStorage::addItems | ( | const QList< Buteo::StorageItem * > & | aItems | ) |

virtual

Adds items to the storage.

Upon successful addition, items are updated with its assigned ID.

Parameters

  aItems | Items to add

Returns
  Operation status codes

## deleteItem()

virtual OperationStatus ContactStorage::deleteItem | ( | const QString & | aItemId | ) |

virtual

Deletes an item from the storage.

Parameters

  aItemId | Id of the item to be deleted

Returns
  Operation status code

## deleteItems()

virtual QList< OperationStatus > ContactStorage::deleteItems | ( | const QList< QString > & | aItemIds | ) |

virtual

Deletes an item from the storage.

Parameters

  aItemIds | Id's of the item to be deleted

Returns
  Operation status codes

## getAllItemIds()

virtual bool ContactStorage::getAllItemIds | ( | QList< QString > & | aItems | ) |

virtual

Returns id's of all known items.

Parameters

  aItems | Array where to place item id's

Returns
  True on success, otherwise false

## getAllItems()

virtual bool ContactStorage::getAllItems | ( | QList< Buteo::StorageItem * > & | aItems | ) |

virtual

Returns all known items.

Parameters

  aItems | Array where to place items

Returns
  True on success, otherwise false

## getDeletedItemIds()

virtual bool ContactStorage::getDeletedItemIds | ( | QList< QString > & | aDeletedItemIds,
|  | const QDateTime & | aTime )

virtual

Returns id's of all deleted items since aTime.

Parameters

  aDeletedItemIds | Array where to place item id's
  aTime | Timestamp

Returns
  True on success, otherwise false

## getItem()

virtual Buteo::StorageItem * ContactStorage::getItem | ( | const QString & | aItemId | ) |

virtual

Returns an item based on id.

Parameters

  aItemId | Id of the item to return

Returns
  On success pointer to the item, otherwise NULL

## getItems()

virtual QList< Buteo::StorageItem * > ContactStorage::getItems | ( | const QStringList & | aItemIdList | ) |

virtual

Returns items based on ids.

Parameters

  aItemIdList | Ids of the items

Returns
  List of items

## getModifiedItemIds()

virtual bool ContactStorage::getModifiedItemIds | ( | QList< QString > & | aModifiedItemIds,
|  | const QDateTime & | aTime )

virtual

Returns id's of all modified items since aTime.

Parameters

  aModifiedItemIds | Array where to place item id's
  aTime | Timestamp

Returns
  True on success, otherwise false

## getModifiedItems()

virtual bool ContactStorage::getModifiedItems | ( | QList< Buteo::StorageItem * > & | aModifiedItems,
|  | const QDateTime & | aTime )

virtual

Returns all modified items since aTime.

Parameters

  aModifiedItems | Array where to place items
  aTime | Timestamp

Returns
  True on success, otherwise false

## getNewItemIds()

virtual bool ContactStorage::getNewItemIds | ( | QList< QString > & | aNewItemIds,
|  | const QDateTime & | aTime )

virtual

Returns id's of all new items since aTime.

Parameters

  aNewItemIds | Array where to place item id's
  aTime | Timestamp

Returns
  True on success, otherwise false

## getNewItems()

virtual bool ContactStorage::getNewItems | ( | QList< Buteo::StorageItem * > & | aNewItems,
|  | const QDateTime & | aTime )

virtual

Returns all new items since aTime.

Parameters

  aNewItems | Array where to place items
  aTime | Timestamp

Returns
  True on success, otherwise false

## init()

virtual bool ContactStorage::init | ( | const QMap< QString, QString > & | aProperties | ) |

virtual

Initializes the plugin.

Parameters

  aProperties | Properties that should be set for this plugin

Returns
  True on success, otherwise false

## modifyItem()

virtual OperationStatus ContactStorage::modifyItem | ( | Buteo::StorageItem & | aItem | ) |

virtual

Modifies an item in the storage.

Parameters

  aItem | Item to modify

Returns
  Operation status code

## modifyItems()

virtual QList< OperationStatus > ContactStorage::modifyItems | ( | const QList< Buteo::StorageItem * > & | aItems | ) |

virtual

Modifies item in the storage.

Parameters

  aItems | Items to add

Returns
  Operation status codes

## newItem()

virtual Buteo::StorageItem * ContactStorage::newItem | ( |  | ) |

virtual

Generates a new item.

Returned item is temporary. Therefore returned item ALWAYS has its id set as empty ID (""). ID will be assigned only after addItem() has been called for the item.

Returns
  On success pointer to the item generated, otherwise NULL

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

- ContactsStorage.h