OpenAB
1.0.1
|
Class representing PIM item. More...
#include <PIMItem.hpp>
Public Types | |
typedef std::string | ID |
typedef std::string | Revision |
typedef std::vector < OpenAB::PIMItem::ID > | IDs |
typedef std::vector < OpenAB::PIMItem::Revision > | Revisions |
Public Member Functions | |
PIMItem (PIMItemType t) | |
Constructor. More... | |
virtual | ~PIMItem () |
Destructor, virtual by default. More... | |
virtual bool | parse (const std::string &raw)=0 |
Parses item from string. Format of string to be parsed from depends on type of item. More... | |
virtual SmartPtr< PIMItemIndex > | getIndex ()=0 |
Returns index for given item. More... | |
virtual std::string | getRawData () const =0 |
Returns raw data of item. Format of raw data depends on type of item. More... | |
virtual ID | getId () const |
Returns Source/Storage specific id of item. Can be empty, as not all Sources/Storages provides id of items. More... | |
virtual void | setId (const ID &id, bool replace=false) |
Sets id of item. More... | |
virtual Revision | getRevision () const |
Returns Source/Storage specific revision of item. Can be empty, as not all Sources/Storages provides revision of items. More... | |
virtual void | setRevision (const Revision &rev) |
Sets revision of item. More... | |
PIMItemType | getType () const |
Returns type of item. More... | |
Protected Attributes | |
PIMItemType | type |
ID | id |
Revision | revision |
Class representing PIM item.
typedef std::string OpenAB::PIMItem::ID |
typedef std::vector<OpenAB::PIMItem::ID> OpenAB::PIMItem::IDs |
typedef std::string OpenAB::PIMItem::Revision |
typedef std::vector<OpenAB::PIMItem::Revision> OpenAB::PIMItem::Revisions |
|
inline |
Constructor.
[in] | t | type of item |
|
inlinevirtual |
Destructor, virtual by default.
|
inlinevirtual |
Returns Source/Storage specific id of item. Can be empty, as not all Sources/Storages provides id of items.
|
pure virtual |
Returns index for given item.
Implemented in OpenAB::PIMCalendarItem, and OpenAB::PIMContactItem.
|
pure virtual |
Returns raw data of item. Format of raw data depends on type of item.
Implemented in OpenAB::PIMCalendarItem, and OpenAB::PIMContactItem.
|
inlinevirtual |
Returns Source/Storage specific revision of item. Can be empty, as not all Sources/Storages provides revision of items.
|
inline |
Returns type of item.
|
pure virtual |
Parses item from string. Format of string to be parsed from depends on type of item.
[in] | raw | raw data to be parsed. |
Implemented in OpenAB::PIMCalendarItem, and OpenAB::PIMContactItem.
|
inlinevirtual |
Sets id of item.
[in] | id | to be assigned |
[in] | replace | should id in raw metadata be replaced with provided id. |
Reimplemented in OpenAB::PIMContactItem.
|
inlinevirtual |
Sets revision of item.
[in] | revision | revision to be set |
|
protected |
|
protected |
|
protected |