Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Updated includes for frmActivityMgr.
[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>
30 #include "../AppXestiaAddrBk.h"
31 #include "../carddav/carddav.h"
32 #include "../common/timers.h"
33 #include "../common/etag.h"
34 #include "../common/dirs.h"
36 //// end generated include
38 DECLARE_EVENT_TYPE(ACTMGR_RESUMEPROC, wxID_ANY)
39 DECLARE_EVENT_TYPE(ACTMGR_TOGGLECONN, wxID_ANY)
40 DECLARE_EVENT_TYPE(ACTMGR_STARTTIMER, wxID_ANY)
41 DECLARE_EVENT_TYPE(ACTMGR_STOPTIMER, wxID_ANY)
42 DECLARE_EVENT_TYPE(ACTMGR_STARTPROCESSTIMER, wxID_ANY)
43 DECLARE_EVENT_TYPE(ACTMGR_STOPPROCESSTIMER, wxID_ANY)
44 DECLARE_EVENT_TYPE(ACTMGR_UPDATESTATUSLABEL, wxID_ANY)
46 struct vCardDownloadDataFileClass{
47         unsigned int DataType = 0;
48         wxString FileData;
49 };
51 struct ActivityMgrLabelUpdate{
52         long ItemIndex;
53         wxString ItemLabel;
54         wxString ItemDes;
55 };
57 /** Implementing frmActivityMgrADT */
58 class frmActivityMgr : public frmActivityMgrADT
59 {
60         private:
61                 wxActTimer AnimationTimer;
62                 wxActProcessTimer ActProcessTimer;
63                 wxActListProcTimer ActListProcTimer;
64                 wxBitmap SleepBitmap;
65                 int ActivityTaskID = 0;
66                 int ActivityProgressBarTotal = 0;
67                 int ActivityProgressBarDone = 0;
68                 bool BlankBool = FALSE;
69                 std::map<int,int> ActivityList;
70                 std::map<int,int> ActivityListType;
71                 std::map<int,long> ActivityListIndex;
72                 std::map<int,wxString> ActivityListData;
73                 std::map<int,wxString> ActivityListTaskDetail;
74                 std::map<int,wxString> ActivityListAccount;
75                 std::map<int,wxString> ActivityListFilename;
76                 std::map<int,wxString> ActivityListFullFilename;
77                 std::map<int,CardDAV*> ActivityListConn;
78                 std::map<int,wxString> ActivityListETag;
79                 std::map<int,wxString> ActivityListETagOriginal;
80                 std::map<int,wxDateTime> ActivityListFinDate;
81                 std::map<int,wxArrayString> ActivityListLog;
82                 bool WindowOpen = FALSE;
83                 bool TasksActive = FALSE;
84                 bool SleepMode = FALSE;
85                 bool ProcessTasksData = FALSE;
86                 //int ConflictResult = 0;
87                 wxETagProcessTimer *ETagTmrPtr;
88                 void *frmMainPtr;
89                 //frmMain *frmMainPtr;
90         protected:
91                 // Handlers for frmActivityMgrADT events.
92                 void CloseWindow( wxCommandEvent& event );
93                 void CloseWindow( wxCloseEvent& event );
94                 void StopTask( wxCommandEvent& event );
95                 void StopAllTasks( wxCommandEvent& event );
96                 void RetryTask( wxCommandEvent& event );
97                 void StartTimer( wxCommandEvent& event );
98                 void StopTimer( wxCommandEvent& event );
99                 void StartProcessTimer( wxCommandEvent& event );
100                 void StopProcessTimer( wxCommandEvent& event );
101                 void FlushAllTasks();
102                 void RemoveTask();
103                 void ProcessTasksThread();
104                 void ToggleConnectionStatus( wxCommandEvent& event );
105                 void WriteServerCertificate(wxString AccountName, SSLCertCollection SSLCertInc);
106                 void UpdateStatusLabel( wxCommandEvent& event );
107         public:
108                 /** Constructor */
109                 frmActivityMgr( wxWindow* parent );
110                 int AddTask(int TaskType, wxString TaskDetail, wxString TaskAccount, 
111                         wxString TaskURL, wxString TaskFilename, wxString TaskFullFilename,
112                         wxString TaskData);
113                 void ProcessTasks();
114                 void OpenWindow();
115                 void SetupPointers(wxETagProcessTimer *ETagTmrPtrInc, void *frmMainPtrInc);
116                 void ResumeProcessing(wxCommandEvent &event);
117                 void PauseAllTimers();
118                 void ResumeAllTimers();
119                 int GetTaskStatus(int intTaskID);
120                 DECLARE_EVENT_TABLE()
122         //// end generated class members
123         
124 };
126 #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