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