Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Replace old build system with CMake build system
[xestiaab/.git] / source / tests / classes / FakeConnectionObject.h
index 02924f9..c5b446a 100644 (file)
 // You should have received a copy of the GNU General Public License along
 // with Xestia Address Book. If not, see <http://www.gnu.org/licenses/>
  
+#ifndef __CONNOBJECT_FAKECONNECTIONOBJECT_H__
+#define __CONNOBJECT_FAKECONNECTIONOBJECT_H__
 #include "../../connobject/ConnectionObject.h"
 
 class FakeConnectionObject : public ConnectionObject {
        
        public:
-               
+       
+               //using ConnectionObject::ConnectionObject;
+       
+               FakeConnectionObject(std::string ServerAddress, int ServerPort, std::string ServerUser, std::string ServerPass, bool ServerSSL);
+               FakeConnectionObject(std::string ServerAddress, int ServerPort, std::string ServerUser, std::string ServerPass, bool ServerSSL, std::string ServerPrefix, std::string ServerAccount);
+
+               // Destructor.
+       
+               ~FakeConnectionObject();
+       
                // Functions for fake connection object.
        
-               using ConnectionObject::ConnectionObject;
                std::string GetServerAddress();
                unsigned int GetServerPort();
                std::string GetServerUser();
@@ -34,11 +45,55 @@ class FakeConnectionObject : public ConnectionObject {
                bool GetServerSSL();
                bool GetTestMode();
        
+               // Functions from the ConnectionObject interface.
+       
+        void SetupConnectionObject();
+        void BypassSSLVerification(bool EnableBypass);
+        COServerResponse GetDefaultPrefix(std::string *ServerPrefix);
+        COServerResponse GetContact(std::string Location, std::string *PageData);
+        std::string GetErrorMessage();
+        SSLCertCollectionString BuildSSLCollection();
+               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);
+               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();
+               COSSLVerified SSLVerify();
+               bool AbleToLogin();
+               bool HasValidResponse();
+               bool IsSelfSigned();
+       
                // Variables to set for fake connection object.
        
-               std::string ServerPrefixInput = "";
+               std::string ResultServerPrefix = "";
+               COConnectResult ResultStatus = COCONNECT_UNITTESTFAIL;
+               bool ResultAuthPassed = false;
+               bool ResultCanProcess = false;
+               bool ResultSSLStatus = false;
+               COSSLVerified ResultSSLVerified = COSSL_NORESULT;
+               bool ResultValidResponse = false;
+               bool ResultSelfSigned = false;
+               bool ResultTaskCompleted = false;
+               CORequestResult TestRequestResult;
+               COContactList TestContactList;
+               std::string TestEntityTag = "";
+               int TestSessionCode = 0;
+               int TestResultCode = 0;
+               std::string TestResultMessage = "";
+               bool ResultTestMode = false;
        
        protected:
        private:
        
-};
\ No newline at end of file
+};
+
+#endif
Xestia Software Development
Yn Maystri
© 2006 - 2019 Xestia Software Development
Software

Xestia Address Book
Xestia Calendar
Development

Xestia Gelforn
Everything else

About
News
Privacy Policy