X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fobjects%2FCalDAV%2FCalDAV.h;h=cbae3d8c8ab25381e6d1da2b5965677cf443776d;hb=b6dd64930e7e2624c33b9a90bd9bed8c7f6d2391;hp=31e5c3b7df163a0016d7b381b4b541bd0620c1d4;hpb=731991ccc529af88d8b90bedfbec2e3541bc46e1;p=xestiacalendar%2F.git diff --git a/source/objects/CalDAV/CalDAV.h b/source/objects/CalDAV/CalDAV.h index 31e5c3b..cbae3d8 100644 --- a/source/objects/CalDAV/CalDAV.h +++ b/source/objects/CalDAV/CalDAV.h @@ -21,6 +21,7 @@ #include #include +#include using namespace std; @@ -29,17 +30,19 @@ using namespace std; enum CalDAVQueryResult { CALDAVQUERYRESULT_UNITTESTFAIL = -1, - CALDAVQUERYRESULT_OK + CALDAVQUERYRESULT_OK, + CALDAVQUERYRESULT_NOTRUN, + CALDAVQUERYRESULT_SERVERERROR }; struct CalDAVConnectionData{ - string Hostname; - int Port; - string Username; - string Password; - string Prefix; - bool UseSSL; + string Hostname = ""; + int Port = 8008; + string Username = ""; + string Password = ""; + string Prefix = ""; + bool UseSSL = true; }; @@ -65,13 +68,24 @@ struct CalDAVStatus{ struct CalDAVServerResult{ + CalDAVQueryResult Result = CALDAVQUERYRESULT_NOTRUN; + CURLcode Code = CURLE_OK; + long HTTPCode = 0; - }; class CalDAV{ + private: + CalDAVConnectionData ConnectionData; + CURL *ConnectionHandle = nullptr; + public: + void SetupConnectionData(CalDAVConnectionData *ConnData); + CalDAVStatus GetConnectionData(); + CalDAVServerResult Connect(); + CalDAV(); + ~CalDAV(); };