--- /dev/null
+// ConnectionObject.h - ConnectionObject interface
+//
+// (c) 2012-2015 Xestia Software Development.
+//
+// This file is part of Xestia Address Book.
+//
+// Xestia Address Book is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by the
+// Free Software Foundation, version 3 of the license.
+//
+// Xestia Address Book is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// 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/>
+
+#include "ConnectionObject.h"
+
+using namespace std;
+
+ConnectionObject::ConnectionObject(string ServerAddress, int ServerPort, string ServerUser, string ServerPass, bool ServerSSL) :
+ ServerAddress(ServerAddress), ServerPort(ServerPort), ServerUser(ServerUser), ServerPass(ServerPass), ServerSSL(ServerSSL){
+
+ TestMode = true;
+
+}
+
+ConnectionObject::ConnectionObject(string ServerAddress, int ServerPort, string ServerUser, string ServerPass, bool ServerSSL, string ServerPrefix, string ServerAccount) :
+ ServerAddress(ServerAddress), ServerPort(ServerPort), ServerUser(ServerUser), ServerPass(ServerPass), ServerSSL(ServerSSL), ServerPrefix(ServerPrefix), ServerAccount(ServerAccount){
+
+ TestMode = false;
+
+}
--- /dev/null
+// ConnectionObject.h - ConnectionObject interface header file.
+//
+// (c) 2012-2015 Xestia Software Development.
+//
+// This file is part of Xestia Address Book.
+//
+// Xestia Address Book is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by the
+// Free Software Foundation, version 3 of the license.
+//
+// Xestia Address Book is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// 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/>
+
+#include <string>
+
+class ConnectionObject{
+
+ public:
+ ConnectionObject(std::string ServerAddress, int ServerPort, std::string ServerUser, std::string ServerPass, bool ServerSSL);
+ ConnectionObject(std::string ServerAddress, int ServerPort, std::string ServerUser, std::string ServerPass, bool ServerSSL, std::string ServerPrefix, std::string ServerAccount);
+
+ // Virtual functions to be setup by the inheriting classes.
+
+ virtual void SetupConnectionObject() {};
+ virtual ~ConnectionObject() {};
+
+ protected:
+ std::string ServerAddress = "";
+ unsigned int ServerPort = 8080;
+ std::string ServerUser = "";
+ std::string ServerPass = "";
+ std::string ServerPrefix = "";
+ std::string ServerAccount = "";
+ bool ServerSSL = true;
+ std::string ErrorMessage = "";
+ std::string ErrorBufferMessage = "";
+ bool TestMode = false;
+ private:
+
+};
\ No newline at end of file
--- /dev/null
+// FakeConnectionObject.cpp - FakeConnectionObject class
+//
+// (c) 2012-2015 Xestia Software Development.
+//
+// This file is part of Xestia Address Book.
+//
+// Xestia Address Book is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by the
+// Free Software Foundation, version 3 of the license.
+//
+// Xestia Address Book is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// 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/>
+
+#include "FakeConnectionObject.h"
+
+std::string FakeConnectionObject::GetServerAddress(){
+ return ServerAddress;
+}
+
+unsigned int FakeConnectionObject::GetServerPort(){
+ return ServerPort;
+}
+
+std::string FakeConnectionObject::GetServerUser(){
+ return ServerUser;
+}
+
+std::string FakeConnectionObject::GetServerPass(){
+ return ServerPass;
+}
+
+std::string FakeConnectionObject::GetServerPrefix(){
+ return ServerPrefix;
+}
+
+std::string FakeConnectionObject::GetServerAccount(){
+ return ServerAccount;
+}
+
+bool FakeConnectionObject::GetServerSSL(){
+ return ServerSSL;
+}
+
+bool FakeConnectionObject::GetTestMode(){
+ return TestMode;
+}
\ No newline at end of file
--- /dev/null
+// FakeConnectionObject.h - FakeConnectionObject class
+//
+// (c) 2012-2015 Xestia Software Development.
+//
+// This file is part of Xestia Address Book.
+//
+// Xestia Address Book is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by the
+// Free Software Foundation, version 3 of the license.
+//
+// Xestia Address Book is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// 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/>
+
+#include "../../connobject/ConnectionObject.h"
+
+class FakeConnectionObject : public ConnectionObject {
+
+ public:
+
+ // Functions for fake connection object.
+
+ using ConnectionObject::ConnectionObject;
+ std::string GetServerAddress();
+ unsigned int GetServerPort();
+ std::string GetServerUser();
+ std::string GetServerPass();
+ std::string GetServerPrefix();
+ std::string GetServerAccount();
+ bool GetServerSSL();
+ bool GetTestMode();
+
+ // Variables to set for fake connection object.
+
+ std::string ServerPrefixInput = "";
+
+ protected:
+ private:
+
+};
\ No newline at end of file