Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Documentation (en-GB).fodt: Updated documentation with new screenshots
[xestiaab/.git] / source / actmgr / frmActivityMgr.h
1 // frmActivityMgr.h - Activity Manager header file.
2 //
3 // (c) 2012-2015 Xestia Software Development.
4 //
5 // This file is part of Xestia Address Book.
6 //
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.
10 //
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.
15 //
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 #ifndef __frmActivityMgr__
20 #define __frmActivityMgr__
22 /**
23 @file
24 Subclass of frmActivityMgrADT, which is generated by wxFormBuilder.
25 */
27 #include <map>
28 #include <wx/timer.h>
29 #if defined(__APPLE__)
30 #import <Foundation/Foundation.h>
31 #import <SecurityInterface/SFCertificateTrustPanel.h>
32 #include "../frmMain.h"
33 #endif
35 #include "../AppXestiaAddrBk.h"
36 #include "../common/timers.h"
37 #include "../common/etag.h"
38 #include "../common/dirs.h"
39 #include "../common/preferences.h"
40 #include "../common/sslcertstructs.h"
41 #include "../connobject/ConnectionObject.h"
42 #include "../carddav2/carddav2.h"
43         
44 #if defined(__WIN32__)
45 #include "../common/win32ssl.h"
46 #endif
48 //// end generated include
50 DECLARE_EVENT_TYPE(ACTMGR_RESUMEPROC, wxID_ANY)
51 DECLARE_EVENT_TYPE(ACTMGR_TOGGLECONN, wxID_ANY)
52 DECLARE_EVENT_TYPE(ACTMGR_STARTTIMER, wxID_ANY)
53 DECLARE_EVENT_TYPE(ACTMGR_STOPTIMER, wxID_ANY)
54 DECLARE_EVENT_TYPE(ACTMGR_STARTPROCESSTIMER, wxID_ANY)
55 DECLARE_EVENT_TYPE(ACTMGR_STOPPROCESSTIMER, wxID_ANY)
56 DECLARE_EVENT_TYPE(ACTMGR_UPDATESTATUSLABEL, wxID_ANY)
57 DECLARE_EVENT_TYPE(ACTMGR_STARTANIMATIONTIMER, wxID_ANY)
59 struct vCardDownloadDataFileClass{
60         unsigned int DataType = 0;
61         wxString FileData;
62 };
64 struct ActivityMgrLabelUpdate{
65         long ItemIndex;
66         wxString ItemLabel;
67         wxString ItemDes;
68 };
70 #if defined(__APPLE__)
71 struct SSLInvalidTrustNotifObj{
72         SecTrustRef SecurityTrustObject;
73         int *ResultValue;
74         bool *PausePtr;
75         wxString AccountName;
76 };
77 #endif
79 struct ActivityMgrAccountSettings{
80         wxString Address;
81         int Port;
82         wxString Username;
83         wxString Password;
84         bool SSL;
85         wxString Prefix;
86         wxString Dir;
87 };
89 /** Implementing frmActivityMgrADT */
90 class frmActivityMgr : public frmActivityMgrADT
91 {
92         private:
93                 wxActTimer AnimationTimer;
94                 wxActProcessTimer ActProcessTimer;
95                 wxActListProcTimer ActListProcTimer;
96                 wxBitmap SleepBitmap;
97                 int ActivityTaskID = 0;
98                 int ActivityProgressBarTotal = 0;
99                 int ActivityProgressBarDone = 0;
100                 bool BlankBool = FALSE;
101                 std::map<int,int> ActivityList;
102                 std::map<int,int> ActivityListType;
103                 std::map<int,long> ActivityListIndex;
104                 std::map<int,wxString> ActivityListData;
105                 std::map<int,wxString> ActivityListURL;
106                 std::map<int,bool> ActivityListEditMode;
107                 std::map<int,wxString> ActivityListTaskDetail;
108                 std::map<int,wxString> ActivityListAccount;
109                 std::map<int,wxString> ActivityListFilename;
110                 std::map<int,wxString> ActivityListFullFilename;
111                 std::map<int,ConnectionObject*> ActivityListConnObject;
112                 std::map<int,ActivityMgrAccountSettings> ActivityListAccSettings;
113                 std::map<int,wxString> ActivityListETag;
114                 std::map<int,wxString> ActivityListETagOriginal;
115                 std::map<int,wxDateTime> ActivityListFinDate;
116                 std::map<int,wxArrayString> ActivityListLog;
117                 bool WindowOpen = FALSE;
118                 bool TasksActive = FALSE;
119                 bool ApplicationSleepMode = FALSE;
120                 bool ProcessTasksData = FALSE;
121                 //int ConflictResult = 0;
122                 wxETagProcessTimer *ETagTmrPtr;
123                 void *frmMainPtr;
124 #if defined(__APPLE__)
125                 int DisplayTrustPanel(SecTrustRef SecurityTrustObject, wxString AccountNameFriendly);
126 #endif
127                 //frmMain *frmMainPtr;
128         protected:
129                 // Handlers for frmActivityMgrADT events.
130                 void CloseWindow( wxCommandEvent& event );
131                 void CloseWindow( wxCloseEvent& event );
132                 void StopTask( wxCommandEvent& event );
133                 void StopAllTasks( wxCommandEvent& event );
134                 void RetryTask( wxCommandEvent& event );
135                 void StartTimer( wxCommandEvent& event );
136                 void StopTimer( wxCommandEvent& event );
137                 void StartProcessTimer( wxCommandEvent& event );
138                 void StopProcessTimer( wxCommandEvent& event );
139                 void StartAnimationTimer(wxCommandEvent& event);
140                 void FlushAllTasks();
141                 void RemoveTask();
142                 void ProcessTasksThread();
143                 void ToggleConnectionStatus( wxCommandEvent& event );
144                 void SleepMode( wxCommandEvent &event );
145                 void WriteServerCertificate(wxString AccountName, SSLCertCollection SSLCertInc);
146                 void WriteServerCertificate(wxString AccountName, SSLCertCollectionString SSLCertInc);
147                 void UpdateStatusLabel( wxCommandEvent& event );
148         public:
149                 /** Constructor */
150                 frmActivityMgr( wxWindow* parent );
151                 int AddTask(int TaskType, wxString TaskDetail, wxString TaskAccount, 
152                         wxString TaskURL, wxString TaskFilename, wxString TaskFullFilename,
153                         wxString TaskData);
154                 void ProcessTasks();
155                 void OpenWindow();
156                 void SetupPointers(wxETagProcessTimer *ETagTmrPtrInc, void *frmMainPtrInc);
157                 void ResumeProcessing(wxCommandEvent &event);
158                 void PauseAllTimers();
159                 void ResumeAllTimers();
160                 int GetTaskStatus(int intTaskID);
161                 DECLARE_EVENT_TABLE()
163         //// end generated class members
164         
165 };
167 #endif // __frmActivityMgr__
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