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