X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fconnobject%2FConnectionObject.h;h=ab479e34eb81e0a070653dd5808f7d9d1afb4ea1;hb=3a02a0ffe62a3813b75e061252434de658929b1d;hp=9ffbe4d04545b454fb07ca51060223077d3ce33b;hpb=674d18f3054c0530a53c9586f9c2effa4dc5dfcb;p=xestiaab%2F.git diff --git a/source/connobject/ConnectionObject.h b/source/connobject/ConnectionObject.h index 9ffbe4d..ab479e3 100644 --- a/source/connobject/ConnectionObject.h +++ b/source/connobject/ConnectionObject.h @@ -21,10 +21,13 @@ #include #include +#include +#include "../common/sslcertstructs.h" enum COConnectResult { COCONNECT_UNITTESTFAIL = -1, COCONNECT_OK, + COCONNECT_SSLFAIL, COCONNECT_INVALID, COCONNECT_TIMEOUT, COCONNECT_AUTHFAIL @@ -34,7 +37,7 @@ enum CORequestResult { COREQUEST_UNITTESTFAIL = -1, COREQUEST_OK, COREQUEST_ERROR_NOTCONNECTED, - COREQUEST_ERROR_SERVER + COREQUEST_ERROR_SERVER, }; enum COSSLVerified { @@ -73,19 +76,20 @@ class ConnectionObject{ // Virtual functions to be setup by the inheriting classes. - virtual void SetupConnectionObject() {}; + virtual void SetupConnectionObject() { }; //virtual ~ConnectionObject() {}; virtual bool IsTaskCompleted() {}; - virtual COConnectResult Connect() {}; + virtual COConnectResult Connect(bool DoAuthentication) {}; + virtual void BypassSSLVerification(bool EnableBypass) {}; - virtual std::string GetDefaultPrefix() {}; + virtual COServerResponse GetDefaultPrefix(std::string *ServerPrefix) {}; virtual COServerResponse AddContact(std::string Location, std::string Data) {}; virtual COServerResponse EditContact(std::string Location, std::string Data) {}; - virtual COServerResponse DeleteContact(std::string Location, std::string EntityTag) {}; + virtual COServerResponse DeleteContact(std::string Location) {}; virtual COServerResponse GetServerEntityTagValue(std::string Location) {}; - virtual COServerResponse GetContact(std::string Location) {}; + virtual COServerResponse GetContact(std::string Location, std::string *PageData) {}; virtual COContactList GetContactList(std::string SyncToken) {}; virtual bool CanDoProcessing() {}; @@ -93,6 +97,17 @@ class ConnectionObject{ virtual COSSLVerified SSLVerify() {}; virtual bool AbleToLogin() {}; virtual bool HasValidResponse() {}; + virtual bool IsSelfSigned() {}; + virtual std::string GetErrorMessage() {}; + + // OS specific functions. + +#if defined(__APPLE__) +#elif defined(__WIN32__) +#else + SSLCertCollectionString BuildSSLCollection() {}; + +#endif protected: // Test Mode. @@ -109,7 +124,6 @@ class ConnectionObject{ std::string ServerAccount = ""; bool ServerSSL = true; std::string ErrorMessage = ""; - std::string ErrorBufferMessage = ""; // Connect results.