From 93e56b6b6222c68d1fba49974b564f362a08d1bd Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sun, 15 May 2016 12:49:22 +0100 Subject: [PATCH] Win32 Support: Added initial Windows support for frmMain --- source/frmMain.cpp | 16 ++++++++++++++++ source/frmMain.h | 6 ++++++ 2 files changed, 22 insertions(+) diff --git a/source/frmMain.cpp b/source/frmMain.cpp index 59c3770..9685929 100644 --- a/source/frmMain.cpp +++ b/source/frmMain.cpp @@ -2662,6 +2662,22 @@ void frmMain::ResumeAllTimers(){ #if defined(__APPLE__) +#elif defined(__WIN32__) + +void frmMain::UpdateSSLAccountStatus(int AccountID, int SSLStatus, CERT_CONTEXT CertificateContext){ + + // Delete existing data. + + AccountCertificateData.erase(AccountID); + AccountSSLResult.erase(AccountID); + + // Insert new data. + + AccountCertificateData.insert(std::make_pair(AccountID, CertificateContext)); + AccountSSLResult.insert(std::make_pair(AccountID, SSLStatus)); + +} + #else void frmMain::UpdateSSLAccountStatus(int AccountID, int SSLStatus, SSLCertCollection SSLCertInc){ diff --git a/source/frmMain.h b/source/frmMain.h index e3844af..1c9cddc 100644 --- a/source/frmMain.h +++ b/source/frmMain.h @@ -40,6 +40,8 @@ Subclass of frmMainADT, which is generated by wxFormBuilder. #if defined(__APPLE__) #import #import +#elif defined(__WIN32__) +#include "common/win32ssl.h" #endif #include "common/timers.h" @@ -127,6 +129,8 @@ class frmMain : public frmMainADT std::map AccountAccDirList; #if defined(__APPLE__) std::map AccountTrustData; +#elif defined(__WIN32__) + std::map AccountCertificateData; #else std::map AccountSSLData; #endif @@ -274,6 +278,8 @@ class frmMain : public frmMainADT XABViewMode GetViewMode(); #if defined(__APPLE__) void UpdateSSLAccountStatus(int AccountID, int SSLStatus, SecTrustRef SecurityTrustObject); +#elif defined(__WIN32__) + void UpdateSSLAccountStatus(int AccountID, int SSLStatus, CERT_CONTEXT CertificateContext); #else void UpdateSSLAccountStatus(int AccountID, int SSLStatus, SSLCertCollection SSLCertInc); #endif -- 2.39.5