10 #ifndef CARDDAVHELPER_HPP_
11 #define CARDDAVHELPER_HPP_
75 std::vector<OpenAB::PIMItem::ID>& removed);
87 std::vector<std::string>& vcards);
96 std::vector<std::string>& vcards);
116 const std::string& etag=
"");
126 const std::string& vcard,
135 return contactsMetadata.size();
144 return addressbookSyncToken;
162 return contactsMetadata;
176 std::string serverUrl;
177 std::string serverHostUrl;
178 std::string principalUrl;
179 std::string principalAddressbookSetUrl;
180 std::string principalAddressbookSetHostUrl;
181 std::string principalAddressbookUrl;
188 std::string addressbookCTag;
189 std::string addressbookSyncToken;
192 #endif // CARDDAVHELPER_HPP_
Documentation for class CardDAVHelper.
Definition: CardDAVHelper.hpp:19
HttpSession class. Allows to send Http requests.
Definition: Http.hpp:26
bool findAddressbookSet()
Query address book set.
Definition: CardDAVHelper.cpp:88
bool modifyContact(const std::string &uri, const std::string &vcard, std::string &etag)
Modifies contact.
Definition: CardDAVHelper.cpp:673
unsigned int getTotalCount() const
Returns total count of contacts metadata downlaoded by queryContactsMetadata or queryChangedContactsM...
Definition: CardDAVHelper.hpp:133
HttpAuthorizer interface. This should be used by classes implementing different Http authorization me...
Definition: Http.hpp:334
bool downloadVCards(unsigned int offset, unsigned int size, std::vector< std::string > &vcards)
Download vCards of contacts from metadata.
Definition: CardDAVHelper.cpp:466
bool removeContact(const std::string &uri, const std::string &etag="")
Removes contact.
Definition: CardDAVHelper.cpp:635
bool findAddressbooks()
Query address books.
Definition: CardDAVHelper.cpp:150
bool queryContactsMetadata()
Query contacts metadata (list of IDs and revisions). After calling this function metadata can be obta...
Definition: CardDAVHelper.cpp:259
bool addContact(const std::string &vcard, std::string &uri, std::string &etag)
Uploads contact.
Definition: CardDAVHelper.cpp:557
std::string getSyncToken() const
Returns sync token queried by queryAddressbookMetadata().
Definition: CardDAVHelper.hpp:142
ContactsMetadata getContactsMetadata() const
Returns contacts metadata downlaoded by queryContactsMetadata or queryChangedContactsMetadata.
Definition: CardDAVHelper.hpp:160
bool findPrincipalUrl()
Query principal url.
Definition: CardDAVHelper.cpp:29
CardDAVHelper(const std::string &serverUrl, OpenAB::HttpSession *httpSession, OpenAB::HttpAuthorizer *httpAuthorizer)
Constructor.
Definition: CardDAVHelper.cpp:15
bool queryAddressbookMetadata()
Query address book metadata (current revision and sync token). After calling this function sync token...
Definition: CardDAVHelper.cpp:210
std::vector< ContactMetadata > ContactsMetadata
Definition: CardDAVHelper.hpp:153
Helper class handling DAV responses parsing.
Definition: DAVHelper.hpp:22
bool queryChangedContactsMetadata(const std::string &syncToken, std::vector< OpenAB::PIMItem::ID > &removed)
Query contacts metadta only of contact that were modified since sync token. After calling this functi...
Definition: CardDAVHelper.cpp:310
virtual ~CardDAVHelper()
Destructor, virtual by default.
Definition: CardDAVHelper.cpp:25