X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fobjects%2FCalDAV%2FCalDAV.h;h=2ccd4ea9a4af8455a3f2ca9ff6323f881a23f9d4;hb=f3908f3b7bf98079d82fde9d2180c337f565d8c6;hp=31e5c3b7df163a0016d7b381b4b541bd0620c1d4;hpb=731991ccc529af88d8b90bedfbec2e3541bc46e1;p=xestiacalendar%2F.git diff --git a/source/objects/CalDAV/CalDAV.h b/source/objects/CalDAV/CalDAV.h index 31e5c3b..2ccd4ea 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,20 @@ 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; + int Timeout = 60; }; @@ -55,6 +59,7 @@ struct CalDAVStatus{ string Username; string Prefix; bool UseSSL; + int Timeout; }; @@ -65,13 +70,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(); };