1 // FakeConnectionObject.cpp - FakeConnectionObject class
3 // (c) 2012-2015 Xestia Software Development.
5 // This file is part of Xestia Address Book.
7 // Xestia Address Book is free software: you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by the
9 // Free Software Foundation, version 3 of the license.
11 // Xestia Address Book is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License along
17 // with Xestia Address Book. If not, see <http://www.gnu.org/licenses/>
19 #include "FakeConnectionObject.h"
21 COConnectResult FakeConnectionObject::Connect(){
23 COConnectResult ConnectResult = ResultStatus;
24 AuthPassed = ResultAuthPassed;
25 CanProcess = ResultCanProcess;
26 SSLStatus = ResultSSLStatus;
27 SSLVerified = ResultSSLVerified;
28 ValidResponse = ResultValidResponse;
29 SSLSelfSigned = ResultSelfSigned;
30 ServerPrefix = ResultServerPrefix;
34 std::string FakeConnectionObject::GetDefaultPrefix(){
38 COServerResponse FakeConnectionObject::AddContact(std::string Location, std::string Data){
40 COServerResponse AddContactResult;
42 AddContactResult.RequestResult = TestRequestResult;
43 AddContactResult.EntityTag = TestEntityTag;
44 AddContactResult.ResultCode = TestResultCode;
45 AddContactResult.ResultMessage = TestResultMessage;
47 return AddContactResult;
51 std::string FakeConnectionObject::GetServerAddress(){
55 unsigned int FakeConnectionObject::GetServerPort(){
59 std::string FakeConnectionObject::GetServerUser(){
63 std::string FakeConnectionObject::GetServerPass(){
67 std::string FakeConnectionObject::GetServerPrefix(){
71 std::string FakeConnectionObject::GetServerAccount(){
75 bool FakeConnectionObject::GetServerSSL(){
79 bool FakeConnectionObject::GetTestMode(){
83 bool FakeConnectionObject::CanDoProcessing(){
87 bool FakeConnectionObject::CanDoSSL(){
91 bool FakeConnectionObject::SSLVerify(){
95 bool FakeConnectionObject::AbleToLogin(){
99 bool FakeConnectionObject::HasValidResponse(){
100 return ValidResponse;
103 bool FakeConnectionObject::IsSelfSigned(){
104 return SSLSelfSigned;