Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Remove functions from ConnectionObject interface
[xestiaab/.git] / source / connobject / ConnectionObject.h
index 8e5221f..b8d82d3 100644 (file)
@@ -1,6 +1,6 @@
 // ConnectionObject.h - ConnectionObject interface header file.
 //
-// (c) 2012-2015 Xestia Software Development.
+// (c) 2012-2016 Xestia Software Development.
 //
 // This file is part of Xestia Address Book.
 //
 #include <iostream>
 #include "../common/sslcertstructs.h"
 
+#if defined (__APPLE__)
+#import <Foundation/Foundation.h>
+#import <SecurityInterface/SFCertificateTrustPanel.h>
+#endif
+
 #if defined (__WIN32__)
 #include <Windows.h>
 #include <basetsd.h>
@@ -40,7 +45,8 @@ enum COConnectResult {
        COCONNECT_SSLFAIL,
        COCONNECT_INVALID,
        COCONNECT_TIMEOUT,
-       COCONNECT_AUTHFAIL
+       COCONNECT_AUTHFAIL,
+       COCONNECT_NOCONNECTION,
 };
 
 enum CORequestResult {
@@ -48,6 +54,7 @@ enum CORequestResult {
        COREQUEST_OK,
        COREQUEST_ERROR_NOTCONNECTED,
        COREQUEST_ERROR_SERVER,
+       COREQUEST_NOCONNECTION,
 };
 
 enum COSSLVerified {
@@ -66,16 +73,16 @@ enum COContactStatus {
 };
 
 struct COServerResponse {
-       CORequestResult RequestResult;
-       std::string EntityTag;
-       int SessionCode;
-       int ResultCode;
-       std::string ResultMessage;
+       CORequestResult RequestResult = COREQUEST_NOCONNECTION;
+       std::string EntityTag = "";
+       int SessionCode = 0;
+       int ResultCode = 0;
+       std::string ResultMessage = "";
 };
 
 struct COContactData {
-       std::string Location;
-       std::string Data;
+       std::string Location = "";
+       std::string Data = "";
        COContactStatus Status = COCS_UNKNOWN;
 };
 
@@ -88,13 +95,10 @@ struct COContactList {
 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() = 0;
-               //virtual ~ConnectionObject() {};
                
                virtual bool IsTaskCompleted() = 0;
                
@@ -120,6 +124,9 @@ class ConnectionObject{
                // OS specific functions.
                
 #if defined(__APPLE__)
+    
+               virtual SecTrustRef BuildSSLCollection() = 0;
+    
 #elif defined(__WIN32__)
 
                virtual PCCERT_CONTEXT BuildSSLCollection() = 0;
@@ -159,4 +166,4 @@ class ConnectionObject{
 
 };
 
-#endif
\ 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