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