Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
macOS: ODTHelpBrowser now running
[xestiaab/.git] / source / frmMain.h
index 6ae03ea..dcc18bb 100644 (file)
@@ -37,9 +37,17 @@ Subclass of frmMainADT, which is generated by wxFormBuilder.
 #include <wx/mstream.h>
 #include <wx/tooltip.h>
 
+#if defined(__APPLE__)
+#import <Foundation/Foundation.h>
+#import <SecurityInterface/SFCertificateTrustPanel.h>
+#elif defined(__WIN32__)
+#include "common/win32ssl.h"
+#endif
+
 #include "common/timers.h"
 #include "common/events.h"
 #include "common/etag.h"
+#include "common/structs.h"
 #include "bitmaps.h"
 #include "common/sslcertstructs.h"
 #include "widgets/XABContactMenu.h"
@@ -48,7 +56,6 @@ Subclass of frmMainADT, which is generated by wxFormBuilder.
 //// end generated include
 
 DECLARE_EVENT_TYPE(CE_UPDATECONTACTLIST, wxID_ANY)
-DECLARE_EVENT_TYPE(CE_UPDATEACCOUNTLIST, wxID_ANY)
 DECLARE_EVENT_TYPE(SE_UPDATECONTACTNOTIF, wxID_ANY)
 DECLARE_EVENT_TYPE(CE_OPENCONTACT, wxID_ANY)
 DECLARE_EVENT_TYPE(CE_OPENCONTACTLIST, wxID_ANY)
@@ -68,12 +75,17 @@ DECLARE_EVENT_TYPE(WINDOW_EDIT, wxID_ANY);
 DECLARE_EVENT_TYPE(WINDOW_CLOSE, wxID_ANY);
 DECLARE_EVENT_TYPE(CONNSTAT_UPDATE, wxID_ANY);
 DECLARE_EVENT_TYPE(INVALIDSSLCERT, wxID_ANY);
+DECLARE_EVENT_TYPE(INVALIDSSLCERTSTRING, wxID_ANY);
 DECLARE_EVENT_TYPE(GETSELECTEDLIST, wxID_ANY);
 DECLARE_EVENT_TYPE(SYNCACCOUNT, wxID_ANY);
 DECLARE_EVENT_TYPE(IMPORT_RESULTSSHOW, wxID_ANY);
 DECLARE_EVENT_TYPE(RELOADCONTACTLIST, wxID_ANY);
 DECLARE_EVENT_TYPE(REFRESHADDRESSBOOK, wxID_ANY);
 
+#if defined(__APPLE__)
+DECLARE_EVENT_TYPE(INVALIDSSLTRUST, wxID_ANY);
+#endif
+
 struct UCNotif{
        wxString ContactAccount;
        wxString ContactFilename;
@@ -87,11 +99,6 @@ struct SWCloseNotif{
        void *SCHWinPtr;
 };
 
-struct QRNotif{
-       int *QResponse;
-       bool *PausePtr;
-};
-
 struct XABViewMode{
 
        int SortMode;
@@ -116,7 +123,14 @@ class frmMain : public frmMainADT
                std::map<wxString, bool> WindowList;
                std::map<int, wxTimer> AccountRefreshList;
                std::map<int, wxString> AccountAccDirList;
-               std::map<int, SSLCertCollection> AccountSSLData;
+#if defined(__APPLE__)
+               std::map<int, SecTrustRef> AccountTrustData;
+               NSRunningApplication *helpBrowserProcess;
+#elif defined(__WIN32__)
+               std::map<int, PCCERT_CONTEXT> AccountCertificateData;
+#else
+               std::map<int, SSLCertCollectionString> AccountSSLData;
+#endif
                std::map<int, int> AccountSSLResult;
                std::multimap<int, int> AccountGroupList;
                std::multimap<int, wxString> AccountGroupFilename;
@@ -134,7 +148,6 @@ class frmMain : public frmMainADT
                std::map<int,wxMenuItem*> WindowListPointersMenu;
                std::map<int,void*> WindowListPointers;
                std::map<int,int> WindowListType;
-               //std::map<int,int> WindowListType;
                wxMenuItem *mnuContactWindows;
                wxMenuItem *mnuContactEditorWindows;
                wxMenuItem *mnuSearchWindows;
@@ -142,18 +155,15 @@ class frmMain : public frmMainADT
                bool RevealWait = FALSE;
                wxString SessionID;
                wxString OldSessionID;
+               wxColour ContactBackgroundColour;
                wxIcon IconEmp;
-               //wxIcon Emp;
-               //wxComboCtrl* AccControl = new wxGenericComboCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize);
-               //wxComboCtrl* AccControl = new wxComboCtrl(this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxCB_READONLY|wxEXPAND|wxCC_STD_BUTTON);
-               //wxStaticBitmap* AccIcon = new wxStaticBitmap(this, wxID_ANY, IconEmp, wxDefaultPosition, wxSize(16,16), wxALL|wxEXPAND, wxStaticBitmapNameStr);
                XABAccountView* treAccounts = new XABAccountView();
                wxImageList *AccImgList =  new wxImageList(16,16,true);
                wxImageList *ActMgrImgList = new wxImageList(16,16,true);
-               //wxIcon wxIAccInet;
                int AccountID;
                int AccountNetID;
                int AccountGrpID;
+               int AccountUnsupportedID;
                int AccountNoneID;
                bool ReloadAccounts = FALSE;
                bool AscendingMode = FALSE;
@@ -171,6 +181,12 @@ class frmMain : public frmMainADT
                wxBitmap *imgSSLWarning = NULL;
                wxBitmap *imgOnline = NULL;
                wxBitmap *imgOffline = NULL;
+               wxBitmap *imgAddAddressBook = NULL;
+               wxBitmap *imgPreferences = NULL;
+               wxBitmap *imgSearchContacts = NULL;
+               wxBitmap *imgAddContact = NULL;
+               wxBitmap *imgEditContact = NULL;
+               wxBitmap *imgDeleteContact = NULL;
                int ActivityIconStatus = 0;
                int SearchUID = 0;
                int ContactUID = 0;
@@ -178,6 +194,12 @@ class frmMain : public frmMainADT
                int WindowMenuItemID = 0;
                XABContactMenu *ContactMenu = new XABContactMenu(XABCONTACTMENU_MAIN); 
                void ResetContactInfo();
+#if defined(__APPLE__)
+               void DisplayCertificate(SecTrustRef SecurityTrustObject);
+               void DisplayTrustPanel( wxCommandEvent& event );
+               void DisplayHelpBrowser();
+               void TerminateHelpBrowserProcess();
+#endif
        protected:
                // Handlers for frmMainADT events.
                void QuitApp( wxCloseEvent& event );
@@ -187,7 +209,7 @@ class frmMain : public frmMainADT
                void OpenPreferences( wxCommandEvent& event );
                void OpenNewABDialog( wxCommandEvent& event );
                void LoadPreferences( wxActivateEvent& event );
-               void LoadPreferences();
+               void LoadPreferences(bool skipWindowSizeReload);
                void ShowContactInfo( wxListEvent& event );
                void OpenContactInfoList( wxListEvent& event );
                void OpenContactInfoList( wxCommandEvent& event );
@@ -201,7 +223,6 @@ class frmMain : public frmMainADT
                              const std::wstring &name);
                void ConflictResolution( wxCommandEvent& event );
                void UpdateContactList( wxCommandEvent& event );
-               void UpdateAccountList( wxCommandEvent& event );
                void UpdateSearchContactLists( wxCommandEvent& event );
                void OpenFindContactsWindow(wxCommandEvent& event);
                void RevealContact( wxCommandEvent& event );
@@ -232,6 +253,7 @@ class frmMain : public frmMainADT
                void UpdateConnectionStatus( wxCommandEvent& event );
                void SetupSSLStatus( int AccountID );
                void InvalidSSLCertificate( wxCommandEvent& event );
+               void InvalidSSLCertificateString( wxCommandEvent& event );
                void CheckUpdates( wxCommandEvent& event );
                void OpenImportDialog( wxCommandEvent& event );
                void OpenExportDialog( wxCommandEvent& event );
@@ -251,11 +273,18 @@ class frmMain : public frmMainADT
                void ActivityIconStop( wxCommandEvent& event );
                void PauseAllTimers();
                void ResumeAllTimers();
-               void UpdateSSLAccountStatus(int AccountID, int SSLStatus, SSLCertCollection SSLCertInc);
                void GetListControl(wxListCtrl *lstContactsPtr, wxArrayString *ContactsFileIndexPtr);
                void ShowImportResults( wxCommandEvent& event );
                void ReloadContactList( wxCommandEvent& event );
                XABViewMode GetViewMode();
+#if defined(__APPLE__)
+               void UpdateSSLAccountStatus(int AccountID, int SSLStatus, SecTrustRef SecurityTrustObject);
+#elif defined(__WIN32__)
+               void UpdateSSLAccountStatus(int AccountID, int SSLStatus, PCCERT_CONTEXT CertificateContext);
+#else
+               void UpdateSSLAccountStatus(int AccountID, int SSLStatus, SSLCertCollectionString SSLCertInc);
+#endif
+               bool CloseAllWindows();
                DECLARE_EVENT_TABLE()
 
        //// end generated class members
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