Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
d6dc31ae586da94978c229863a4bca5a22df8c91
[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 "../carddav/carddav.h"
37 #include "../common/timers.h"
38 #include "../common/etag.h"
39 #include "../common/dirs.h"
40 #include "../common/preferences.h"
41 #include "../common/sslcertstructs.h"
43 #if defined(__WIN32__)
44 #include "../common/win32ssl.h"
45 #endif
47 //// end generated include
49 DECLARE_EVENT_TYPE(ACTMGR_RESUMEPROC, wxID_ANY)
50 DECLARE_EVENT_TYPE(ACTMGR_TOGGLECONN, wxID_ANY)
51 DECLARE_EVENT_TYPE(ACTMGR_STARTTIMER, wxID_ANY)
52 DECLARE_EVENT_TYPE(ACTMGR_STOPTIMER, wxID_ANY)
53 DECLARE_EVENT_TYPE(ACTMGR_STARTPROCESSTIMER, wxID_ANY)
54 DECLARE_EVENT_TYPE(ACTMGR_STOPPROCESSTIMER, wxID_ANY)
55 DECLARE_EVENT_TYPE(ACTMGR_UPDATESTATUSLABEL, wxID_ANY)
56 DECLARE_EVENT_TYPE(ACTMGR_STARTANIMATIONTIMER, wxID_ANY)
58 struct vCardDownloadDataFileClass{
59         unsigned int DataType = 0;
60         wxString FileData;
61 };
63 struct ActivityMgrLabelUpdate{
64         long ItemIndex;
65         wxString ItemLabel;
66         wxString ItemDes;
67 };
69 #if defined(__APPLE__)
70 struct SSLInvalidTrustNotifObj{
71         SecTrustRef SecurityTrustObject;
72         int *ResultValue;
73         bool *PausePtr;
74         wxString AccountName;
75 };
76 #endif
78 struct ActivityMgrAccountSettings{
79         wxString Address;
80         int Port;
81         wxString Username;
82         wxString Password;
83         bool SSL;
84         wxString Prefix;
85         wxString Dir;
86 };
88 /** Implementing frmActivityMgrADT */
89 class frmActivityMgr : public frmActivityMgrADT
90 {
91         private:
92                 wxActTimer AnimationTimer;
93                 wxActProcessTimer ActProcessTimer;
94                 wxActListProcTimer ActListProcTimer;
95                 wxBitmap SleepBitmap;
96                 int ActivityTaskID = 0;
97                 int ActivityProgressBarTotal = 0;
98                 int ActivityProgressBarDone = 0;
99                 bool BlankBool = FALSE;
100                 std::map<int,int> ActivityList;
101                 std::map<int,int> ActivityListType;
102                 std::map<int,long> ActivityListIndex;
103                 std::map<int,wxString> ActivityListData;
104                 std::map<int,wxString> ActivityListURL;
105                 std::map<int,bool> ActivityListEditMode;
106                 std::map<int,wxString> ActivityListTaskDetail;
107                 std::map<int,wxString> ActivityListAccount;
108                 std::map<int,wxString> ActivityListFilename;
109                 std::map<int,wxString> ActivityListFullFilename;
110                 std::map<int,CardDAV*> ActivityListConn;
111                 std::map<int,ActivityMgrAccountSettings> ActivityListAccSettings;
112                 std::map<int,wxString> ActivityListETag;
113                 std::map<int,wxString> ActivityListETagOriginal;
114                 std::map<int,wxDateTime> ActivityListFinDate;
115                 std::map<int,wxArrayString> ActivityListLog;
116                 bool WindowOpen = FALSE;
117                 bool TasksActive = FALSE;
118                 bool ApplicationSleepMode = FALSE;
119                 bool ProcessTasksData = FALSE;
120                 //int ConflictResult = 0;
121                 wxETagProcessTimer *ETagTmrPtr;
122                 void *frmMainPtr;
123 #if defined(__APPLE__)
124                 int DisplayTrustPanel(SecTrustRef SecurityTrustObject, wxString AccountNameFriendly);
125 #endif
126                 //frmMain *frmMainPtr;
127         protected:
128                 // Handlers for frmActivityMgrADT events.
129                 void CloseWindow( wxCommandEvent& event );
130                 void CloseWindow( wxCloseEvent& event );
131                 void StopTask( wxCommandEvent& event );
132                 void StopAllTasks( wxCommandEvent& event );
133                 void RetryTask( wxCommandEvent& event );
134                 void StartTimer( wxCommandEvent& event );
135                 void StopTimer( wxCommandEvent& event );
136                 void StartProcessTimer( wxCommandEvent& event );
137                 void StopProcessTimer( wxCommandEvent& event );
138                 void StartAnimationTimer(wxCommandEvent& event);
139                 void FlushAllTasks();
140                 void RemoveTask();
141                 void ProcessTasksThread();
142                 void ToggleConnectionStatus( wxCommandEvent& event );
143                 void SleepMode( wxCommandEvent &event );
144                 void WriteServerCertificate(wxString AccountName, SSLCertCollection SSLCertInc);
145                 void UpdateStatusLabel( wxCommandEvent& event );
146         public:
147                 /** Constructor */
148                 frmActivityMgr( wxWindow* parent );
149                 int AddTask(int TaskType, wxString TaskDetail, wxString TaskAccount, 
150                         wxString TaskURL, wxString TaskFilename, wxString TaskFullFilename,
151                         wxString TaskData);
152                 void ProcessTasks();
153                 void OpenWindow();
154                 void SetupPointers(wxETagProcessTimer *ETagTmrPtrInc, void *frmMainPtrInc);
155                 void ResumeProcessing(wxCommandEvent &event);
156                 void PauseAllTimers();
157                 void ResumeAllTimers();
158                 int GetTaskStatus(int intTaskID);
159                 DECLARE_EVENT_TABLE()
161         //// end generated class members
162         
163 };
165 #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