67 const std::string& login,
69 const std::string& calendarURL,
70 const std::string& calendarName,
84 const std::string& clientId,
87 const std::string& calendarURL,
88 const std::string& calendarName,
141 std::map<std::string, std::string>& revisions,
142 std::vector<OpenAB::PIMItem::ID>& removed);
166 std::string serverUrl;
167 std::string calendarUrl;
168 std::string calendarName;
170 std::string userLogin;
173 std::string clientId;
177 std::string syncToken;
205 const std::string& calendarURL,
235 enum eFetchEvents fetchEvents(
int fetchsize);
237 static void* downloadThreadFunc(
void* ptr);
238 bool downloadICals(
unsigned int offset,
unsigned int size);
242 std::string calendarURL;
246 unsigned int offsetOfCachedICals;
248 std::list<OpenAB::SmartPtr<OpenAB::PIMCalendarItem> > cachedEvents;
249 std::vector<CalDAVHelper::EventMetadata> eventsMetadata;
254 pthread_t downloadThread;
255 pthread_mutex_t mutex;
256 pthread_cond_t bufferReadyCond;
CalDAVStorage(const std::string &url, const std::string &login, const OpenAB::SecureString &password, const std::string &calendarURL, const std::string &calendarName, OpenAB::PIMItemType type)
Constructor.
Definition: CalDAVStorage.cpp:26
enum eGetItem getTasks(const OpenAB::PIMItem::IDs &ids, std::vector< OpenAB::SmartPtr< OpenAB::PIMCalendarTaskItem > > &items)
Get the contacts from the Storage.
Definition: CalDAVStorage.cpp:461
std::string Revision
Definition: PIMItem.hpp:89
OpenAB_Storage::StorageItemIterator * newStorageItemIterator()
Retrieve an new Iterator to quickly parse the list of items.
Definition: CalDAVStorage.cpp:558
Definition: CalDAVStorage.hpp:202
Definition: CalDAVStorage.hpp:187
HttpSession class. Allows to send Http requests.
Definition: Http.hpp:26
enum eRemoveItem removeObjects(const OpenAB::PIMItem::IDs &ids)
Removes contacts from the ContactsStorage.
Definition: CalDAVStorage.cpp:320
enum eGetItem getTask(const OpenAB::PIMItem::ID &id, OpenAB::SmartPtr< OpenAB::PIMCalendarTaskItem > &item)
Get the contact from the Storage.
Definition: CalDAVStorage.cpp:418
enum eCursorInit cursorInit(CalDAVHelper *calDAVHelper, const std::string &calendarURL, OpenAB::PIMItemType type)
Definition: CalDAVStorage.cpp:648
enum eModifyItem modifyObjects(const std::vector< std::string > &iCals, const OpenAB::PIMItem::IDs &ids, OpenAB::PIMItem::Revisions &revisions)
Modifies contacts in the ContactsStorage.
Definition: CalDAVStorage.cpp:293
HttpAuthorizer interface. This should be used by classes implementing different Http authorization me...
Definition: Http.hpp:334
OpenAB_Storage::StorageItem * operator->()
Retrieve the current StorageItem.
Definition: CalDAVStorage.cpp:814
enum eRemoveItem removeObject(const OpenAB::PIMItem::ID &id)
Removes contact from the ContactsStorage.
Definition: CalDAVStorage.cpp:311
eCancelRet
Definition: Source.hpp:138
eResumeRet
Definition: Source.hpp:123
CalDAVStorageItemIterator()
Constructor.
Definition: CalDAVStorage.cpp:622
enum OpenAB_Source::Source::eSuspendRet suspend()
Suspends Source, if such operation is supported.
Definition: CalDAVStorage.cpp:598
std::vector< CalendarInfo > Calendars
Definition: CalDAVHelper.hpp:265
eModifyItem
Definition: Storage.hpp:164
OpenAB_Storage::StorageItem operator*()
Retrieve the current StorageItem.
Definition: CalDAVStorage.cpp:809
std::vector< OpenAB::PIMItem::Revision > Revisions
Definition: PIMItem.hpp:111
enum eModifyItem modifyObject(const std::string &iCal, const OpenAB::PIMItem::ID &id, OpenAB::PIMItem::Revision &revision)
Modifies contact in the ContactsStorage.
Definition: CalDAVStorage.cpp:282
eAddItem
Definition: Storage.hpp:126
Documentation for ContactsStorage interface. Provides functionalities specific to Storage of OpenAB::...
Definition: CalendarStorage.hpp:28
This object associates OpenAB::PIMItem with its unique ID from OpenAB_Storage::Storage. Additionally it stores status flag used in synchronization process.
Definition: StorageItem.hpp:22
SecureString class, used to store strings like passwords etc. Current implementation encodes string i...
Definition: SecureString.hpp:26
eCursorInit
Definition: CalDAVStorage.hpp:200
enum OpenAB_Storage::Storage::eGetRevisions getRevisions(std::map< std::string, std::string > &revisions)
Gets revision of the items from the Storage.
Definition: CalDAVStorage.cpp:504
enum OpenAB_Source::Source::eCancelRet cancel()
Cancels Source, if such operation is supported. After canceling Source next call to getVCard() should...
Definition: CalDAVStorage.cpp:608
eSuspendRet
Definition: Source.hpp:108
enum OpenAB_Source::Source::eGetItemRet getItem(OpenAB::SmartPtr< OpenAB::PIMItem > &item)
Gets PIM Item from Source. If Source is suspended getItem() should block until Source will be resumed...
Definition: CalDAVStorage.cpp:576
The StorageItemIterator is mainly used to quickly browse the Storage contents.
Definition: StorageItem.hpp:97
enum OpenAB_Storage::Storage::eGetSyncToken getLatestSyncToken(std::string &token)
If storage supports tracking of items changes, it returns latest status identifier of the storage...
Definition: CalDAVStorage.cpp:546
std::vector< OpenAB::PIMItem::ID > IDs
Definition: PIMItem.hpp:110
virtual ~CalDAVStorage()
Definition: CalDAVStorage.cpp:80
Class describing calendar.
Definition: CalDAVHelper.hpp:225
eGetItemRet
Definition: Source.hpp:155
PIMItemType
Definition: PIMItemIndex.hpp:24
eGetItem
Definition: Storage.hpp:226
eGetRevisions
Definition: Storage.hpp:265
OpenAB_Storage::StorageItem * next()
Retrieve the next StorageItem.
Definition: CalDAVStorage.cpp:759
virtual ~CalDAVStorageItemIterator()
Destructor, virtual by default.
Definition: CalDAVStorage.cpp:637
Definition: CalDAVStorage.hpp:54
Definition: CalDAVStorage.hpp:201
int getTotalCount() const
Returns total count of items available from Source, if such information is available.
Definition: CalDAVStorage.cpp:613
enum eGetItem getEvents(const OpenAB::PIMItem::IDs &ids, std::vector< OpenAB::SmartPtr< OpenAB::PIMCalendarEventItem > > &items)
Get the contacts from the Storage.
Definition: CalDAVStorage.cpp:376
eGetSyncToken
Definition: Storage.hpp:251
eInit
Definition: Source.hpp:94
std::string ID
Definition: PIMItem.hpp:64
Documentation for class CalDAVHelper. This class implements CalDAV client using libcurl.
Definition: CalDAVHelper.hpp:21
enum OpenAB_Source::Source::eInit init()
Initializes Source.
Definition: CalDAVStorage.cpp:122
unsigned int getSize() const
Retrieve number of items in interator.
Definition: CalDAVStorage.cpp:819
enum OpenAB_Source::Source::eResumeRet resume()
Resumes Source, if such operation is supported.
Definition: CalDAVStorage.cpp:603
enum OpenAB_Storage::Storage::eGetRevisions getChangedRevisions(const std::string &token, std::map< std::string, std::string > &revisions, std::vector< OpenAB::PIMItem::ID > &removed)
Gets revisions of items changed since Storage was in state identified by token.
Definition: CalDAVStorage.cpp:521
eRemoveItem
Definition: Storage.hpp:201
enum eAddItem addObjects(const std::vector< std::string > &iCals, OpenAB::PIMItem::IDs &newIds, OpenAB::PIMItem::Revisions &revisions)
Adds new contacts to the ContactsStorage.
Definition: CalDAVStorage.cpp:261
enum eGetItem getEvent(const OpenAB::PIMItem::ID &id, OpenAB::SmartPtr< OpenAB::PIMCalendarEventItem > &item)
Get the contact from the Storage.
Definition: CalDAVStorage.cpp:333
enum eAddItem addObject(const std::string &iCal, OpenAB::PIMItem::ID &newId, OpenAB::PIMItem::Revision &revision)
Adds a new contact to the ContactsStorage.
Definition: CalDAVStorage.cpp:250