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

Documentation for Source plugin interface. More...

#include <Source.hpp>

Inheritance diagram for OpenAB_Source::Source:

Public Types

enum  eInit { eInitOk, eInitFail }
 
enum  eSuspendRet { eSuspendRetOk, eSuspendRetFail, eSuspendRetNotSupported }
 
enum  eResumeRet { eResumeRetOk, eResumeRetFail, eResumeRetNotSupported }
 
enum  eCancelRet { eCancelRetOk, eCancelRetFail, eCancelRetNotSupported }
 
enum  eGetItemRet { eGetItemRetOk, eGetItemRetEnd, eGetItemRetError }
 

Public Member Functions

 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 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 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...
 

Detailed Description

Documentation for Source plugin interface.

Member Enumeration Documentation

Enumerator
eCancelRetOk 

Source successfully cancelled

eCancelRetFail 

Source cancel failed

eCancelRetNotSupported 

Source cancellation not supported

Enumerator
eGetItemRetOk 

VCard received successfully

eGetItemRetEnd 

No more VCards available

eGetItemRetError 

Error occurred or input was cancelled

Enumerator
eInitOk 

Source successfully initialized

eInitFail 

Failure during the Source initialization

Enumerator
eResumeRetOk 

Source successfully resumed

eResumeRetFail 

Source resume failed

eResumeRetNotSupported 

Source resume not supported

Enumerator
eSuspendRetOk 

Source successfully suspended

eSuspendRetFail 

Source suspension failed

eSuspendRetNotSupported 

Source suspension not supported

Constructor & Destructor Documentation

OpenAB_Source::Source::Source ( OpenAB::PIMItemType  t)
inline

Constructor.

Parameters
[in]ttype of provided PIM Item (OpenAB::PIMItem)
virtual OpenAB_Source::Source::~Source ( )
inlinevirtual

Destructor, virtual by default.

Member Function Documentation

virtual enum eCancelRet OpenAB_Source::Source::cancel ( )
pure virtual

Cancels Source, if such operation is supported. After canceling Source next call to getVCard() should return eGetItemRetError status.

Returns
the status code

Implemented in CalDAVStorage, PBAPSource, CardDAVStorage, GoogleSource, FileSource, EDSCalendarStorage, and EDSContactsStorage.

virtual enum eGetItemRet OpenAB_Source::Source::getItem ( OpenAB::SmartPtr< OpenAB::PIMItem > &  item)
pure virtual

Gets PIM Item from Source. If Source is suspended getItem() should block until Source will be resumed or cancelled.

Parameters
[out]itemitem received from Source
Returns
the status code
Note
item is returned as smart pointer, its contents will be deleted automatically when no more references to it will exist, it's not advised to dereference and use direct pointer

Implemented in OpenAB_Storage::Storage, CalDAVStorage, PBAPSource, CardDAVStorage, GoogleSource, FileSource, EDSCalendarStorage, and EDSContactsStorage.

OpenAB::PIMItemType OpenAB_Source::Source::getItemType ( ) const
inline

Returns type of PIM Item supported by Source.

Returns
type of supported PIM Item (OpenAB::PIMItem)
virtual int OpenAB_Source::Source::getTotalCount ( ) const
pure virtual

Returns total count of items available from Source, if such information is available.

Returns
total count of items available or -1 if such information is unavailable

Implemented in CalDAVStorage, PBAPSource, CardDAVStorage, GoogleSource, FileSource, EDSCalendarStorage, and EDSContactsStorage.

virtual enum eInit OpenAB_Source::Source::init ( )
pure virtual

Initializes Source.

Returns
the status code

Implemented in CalDAVStorage, PBAPSource, CardDAVStorage, GoogleSource, FileSource, EDSCalendarStorage, and EDSContactsStorage.

virtual enum eResumeRet OpenAB_Source::Source::resume ( )
pure virtual

Resumes Source, if such operation is supported.

Returns
the status code

Implemented in CalDAVStorage, PBAPSource, CardDAVStorage, GoogleSource, FileSource, EDSCalendarStorage, and EDSContactsStorage.

virtual enum eSuspendRet OpenAB_Source::Source::suspend ( )
pure virtual

Suspends Source, if such operation is supported.

Returns
the status code

Implemented in CalDAVStorage, PBAPSource, CardDAVStorage, GoogleSource, FileSource, EDSCalendarStorage, and EDSContactsStorage.


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