10 #ifndef CALDAVHELPER_HPP_
11 #define CALDAVHELPER_HPP_
100 const std::string& syncToken,
101 std::vector<OpenAB::PIMItem::ID>& removed);
115 unsigned int offset,
unsigned int size,
116 std::vector<std::string>& icals);
126 std::vector<std::string>& uris,
127 std::vector<std::string>& icals);
142 bool addEvent(
const std::string& calendarURL,
143 const std::string& ical,
157 const std::string& etag=
"");
168 const std::string& ical,
177 return eventsMetadata.size();
186 return calendarSyncToken;
209 return eventsMetadata;
230 const std::string& name,
231 const std::vector<CalendarItemTypes>& types);
238 std::string
getUrl()
const;
260 std::string displayName;
262 std::vector<CalendarItemTypes> supportedTypes;
288 std::string serverUrl;
291 std::string serverHostUrl;
293 std::string principalUrl;
294 std::string principalCalendarHomeSetUrl;
295 std::string principalCalendarSetHostUrl;
296 std::string principalCalendarUrl;
307 int getIndexFromUris(
const std::vector<std::string>& uris,
const std::string& uri);
317 bool processCalendarsInfo(
const std::string& davResponse,
325 std::string calendarCTag;
326 std::string calendarSyncToken;
328 std::string userAgent;
331 #endif // CALDAVHELPER_HPP_
bool queryCalendarMetadata(const std::string &calendarURL)
Queries calendar metadata (current revision and sync token). After calling this function sync token c...
Definition: CalDAVHelper.cpp:319
Definition: CalDAVHelper.hpp:219
EventsMetadata getEventsMetadata() const
Returns contacts metadata downlaoded by queryContactsMetadata or queryChangedEventsMetadata.
Definition: CalDAVHelper.hpp:207
std::vector< EventMetadata > EventsMetadata
Definition: CalDAVHelper.hpp:200
HttpSession class. Allows to send Http requests.
Definition: Http.hpp:26
bool queryCalendarInfo(const std::string &calendarURL, CalendarInfo &info)
Queries calendar infromation. In opposite to findCalendars, this function queries detailed informatio...
Definition: CalDAVHelper.cpp:275
std::string getSyncToken() const
Returns sync token queried by queryCalendarMetadata().
Definition: CalDAVHelper.hpp:184
bool queryChangedEventsMetadata(const std::string &calendarURL, const std::string &syncToken, std::vector< OpenAB::PIMItem::ID > &removed)
Queries only metadata of events/tasks that were modified since provided sync token was created...
Definition: CalDAVHelper.cpp:420
HttpAuthorizer interface. This should be used by classes implementing different Http authorization me...
Definition: Http.hpp:334
std::vector< CalendarInfo > Calendars
Definition: CalDAVHelper.hpp:265
Definition: CalDAVHelper.hpp:217
bool findCalendars()
Queries calendars information. Queried information about calendars can be obtained by getCalendars...
Definition: CalDAVHelper.cpp:206
bool findPrincipalUrl()
Queries principal url - url used by given user to send CalDAV requests.
Definition: CalDAVHelper.cpp:41
bool modifyEvent(const std::string &uri, const std::string &ical, std::string &etag)
Modifies event/task.
Definition: CalDAVHelper.cpp:792
Definition: CalDAVHelper.hpp:218
bool removeEvent(const std::string &uri, const std::string &etag="")
Removes event/task.
Definition: CalDAVHelper.cpp:755
bool downloadEvents(const std::string &calendarURL, unsigned int offset, unsigned int size, std::vector< std::string > &icals)
Downloads iCalendar objects from metadata.
Definition: CalDAVHelper.cpp:573
Class describing calendar.
Definition: CalDAVHelper.hpp:225
CalendarItemTypes
Definition: CalDAVHelper.hpp:215
bool addEvent(const std::string &calendarURL, const std::string &ical, std::string &uri, std::string &etag)
Creates new event/task.
Definition: CalDAVHelper.cpp:643
std::string getDisplayName() const
Returns display name of calendar.
Definition: CalDAVHelper.cpp:893
Calendars getCalendars() const
Returns list of available calendars.
Definition: CalDAVHelper.hpp:271
CalendarInfo()
Definition: CalDAVHelper.cpp:870
std::string getUrl() const
Returns URL of calendar.
Definition: CalDAVHelper.cpp:888
bool findCalendarHomeSet()
Queries address book set - url that can be further queried about user calendars details..
Definition: CalDAVHelper.cpp:102
bool supportsType(CalendarItemTypes type) const
Checks if calendar support given type of items.
Definition: CalDAVHelper.cpp:903
std::vector< CalendarItemTypes > getSupportedCalendarTypes() const
Returns list of all supported types.
Definition: CalDAVHelper.cpp:898
~CalendarInfo()
Definition: CalDAVHelper.cpp:875
Documentation for class CalDAVHelper. This class implements CalDAV client using libcurl.
Definition: CalDAVHelper.hpp:21
bool queryEventsMetadata(const std::string &calendarURL)
Queries events/tasks metadata (list of IDs and revisions). After calling this function metadata can b...
Definition: CalDAVHelper.cpp:369
virtual ~CalDAVHelper()
Destructor, virtual by default.
Definition: CalDAVHelper.cpp:37
Helper class handling DAV responses parsing.
Definition: DAVHelper.hpp:22
unsigned int getTotalCount() const
Returns total count of items in metadata downlaoded by queryEventsMetadata or queryChangedEventsMetad...
Definition: CalDAVHelper.hpp:175
CalDAVHelper(const std::string &serverUrl, bool isCalendarUrl, OpenAB::HttpSession *httpSession, OpenAB::HttpAuthorizer *httpAuthorizer)
Constructor.
Definition: CalDAVHelper.cpp:15