X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Ftests%2Fclasses%2FFakeConnectionObject.h;h=9a214a79768524fc5e5822999976db80ff8709d8;hb=3a02a0ffe62a3813b75e061252434de658929b1d;hp=a9eba6d52862791dbf94c0a62e56766a57382cb7;hpb=e86dce6341aec3d350835e18c3791a644a313030;p=xestiaab%2F.git diff --git a/source/tests/classes/FakeConnectionObject.h b/source/tests/classes/FakeConnectionObject.h index a9eba6d..9a214a7 100644 --- a/source/tests/classes/FakeConnectionObject.h +++ b/source/tests/classes/FakeConnectionObject.h @@ -16,15 +16,19 @@ // You should have received a copy of the GNU General Public License along // with Xestia Address Book. If not, see +#ifndef __CONNOBJECT_FAKECONNECTIONOBJECT_H__ +#define __CONNOBJECT_FAKECONNECTIONOBJECT_H__ + #include "../../connobject/ConnectionObject.h" class FakeConnectionObject : public ConnectionObject { public: - - // Functions for fake connection object. using ConnectionObject::ConnectionObject; + + // Functions for fake connection object. + std::string GetServerAddress(); unsigned int GetServerPort(); std::string GetServerUser(); @@ -36,20 +40,21 @@ class FakeConnectionObject : public ConnectionObject { // Functions from the ConnectionObject interface. - COConnectResult Connect(); + COConnectResult Connect(bool DoAuthentication); std::string GetDefaultPrefix(); COServerResponse AddContact(std::string Location, std::string Data); COServerResponse EditContact(std::string Location, std::string Data); - COServerResponse DeleteContact(std::string Location, std::string EntityTag); + COServerResponse DeleteContact(std::string Location); COServerResponse GetServerEntityTagValue(std::string Location); COServerResponse GetContact(std::string Location); COContactList GetContactList(std::string SyncToken); - + + bool IsTaskCompleted(); void SetupData(std::string Method, std::string Location, std::string Data); bool CanDoProcessing(); bool CanDoSSL(); - bool SSLVerify(); + COSSLVerified SSLVerify(); bool AbleToLogin(); bool HasValidResponse(); bool IsSelfSigned(); @@ -61,9 +66,10 @@ class FakeConnectionObject : public ConnectionObject { bool ResultAuthPassed = false; bool ResultCanProcess = false; bool ResultSSLStatus = false; - bool ResultSSLVerified = false; + COSSLVerified ResultSSLVerified = COSSL_NORESULT; bool ResultValidResponse = false; bool ResultSelfSigned = false; + bool ResultTaskCompleted = false; CORequestResult TestRequestResult; COContactList TestContactList; std::string TestEntityTag; @@ -74,4 +80,6 @@ class FakeConnectionObject : public ConnectionObject { protected: private: -}; \ No newline at end of file +}; + +#endif \ No newline at end of file