OpenAB  1.0.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
OpenAB::PIMContactItem Class Reference

Class representing PIM contact item. More...

#include <PIMContactItem.hpp>

Inheritance diagram for OpenAB::PIMContactItem:
Collaboration diagram for OpenAB::PIMContactItem:

Public Member Functions

 PIMContactItem ()
 Constructor. More...
 
virtual ~PIMContactItem ()
 Destructor, virtual by default. More...
 
bool parse (const std::string &vCard)
 Parses PIMContacItem from vCard string. More...
 
SmartPtr< PIMItemIndexgetIndex ()
 Returns index for given item. More...
 
std::string getRawData () const
 Returns vCard string of item. More...
 
void setId (const PIMItem::ID &id, bool replace=false)
 Sets id of item. More...
 
- Public Member Functions inherited from OpenAB::PIMItem
 PIMItem (PIMItemType t)
 Constructor. More...
 
virtual ~PIMItem ()
 Destructor, virtual by default. 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 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...
 

Additional Inherited Members

- Public Types inherited from OpenAB::PIMItem
typedef std::string ID
 
typedef std::string Revision
 
typedef std::vector
< OpenAB::PIMItem::ID
IDs
 
typedef std::vector
< OpenAB::PIMItem::Revision
Revisions
 
- Protected Attributes inherited from OpenAB::PIMItem
PIMItemType type
 
ID id
 
Revision revision
 

Detailed Description

Class representing PIM contact item.

Constructor & Destructor Documentation

OpenAB::PIMContactItem::PIMContactItem ( )

Constructor.

OpenAB::PIMContactItem::~PIMContactItem ( )
virtual

Destructor, virtual by default.

Member Function Documentation

SmartPtr< PIMItemIndex > OpenAB::PIMContactItem::getIndex ( )
virtual

Returns index for given item.

Returns
index for given item.

Implements OpenAB::PIMItem.

std::string OpenAB::PIMContactItem::getRawData ( ) const
virtual

Returns vCard string of item.

Returns
vCard of item

Implements OpenAB::PIMItem.

bool OpenAB::PIMContactItem::parse ( const std::string &  vCard)
virtual

Parses PIMContacItem from vCard string.

Note
during parsing new non-standard vCard fields can be added to support matching and comparison of items (currently fields 'n_family', 'n_given', 'n_middle', 'n_prefix', 'n_suffix' are generated from N vCard field).
Parameters
[in]vCardvCard string to be parsed.
Returns
true if item was parsed successfully, false otherwise.

Implements OpenAB::PIMItem.

void OpenAB::PIMContactItem::setId ( const PIMItem::ID id,
bool  replace = false 
)
virtual

Sets id of item.

Parameters
[in]idto be assigned
[in]replaceshould UID in vCard be replaced with given id

Reimplemented from OpenAB::PIMItem.


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