Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Added ActivityListAccSettings to eventually replace ActivityListConn
[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 struct ActivityMgrAccountSettings{
59         wxString Address;
60         int Port;
61         wxString Username;
62         wxString Password;
63         bool SSL;
64         wxString Prefix;
65         wxString Dir;
66 };
68 /** Implementing frmActivityMgrADT */
69 class frmActivityMgr : public frmActivityMgrADT
70 {
71         private:
72                 wxActTimer AnimationTimer;
73                 wxActProcessTimer ActProcessTimer;
74                 wxActListProcTimer ActListProcTimer;
75                 wxBitmap SleepBitmap;
76                 int ActivityTaskID = 0;
77                 int ActivityProgressBarTotal = 0;
78                 int ActivityProgressBarDone = 0;
79                 bool BlankBool = FALSE;
80                 std::map<int,int> ActivityList;
81                 std::map<int,int> ActivityListType;
82                 std::map<int,long> ActivityListIndex;
83                 std::map<int,wxString> ActivityListData;
84                 std::map<int,wxString> ActivityListTaskDetail;
85                 std::map<int,wxString> ActivityListAccount;
86                 std::map<int,wxString> ActivityListFilename;
87                 std::map<int,wxString> ActivityListFullFilename;
88                 std::map<int,CardDAV*> ActivityListConn;
89                 std::map<int,ActivityMgrAccountSettings> ActivityListAccSettings;
90                 std::map<int,wxString> ActivityListETag;
91                 std::map<int,wxString> ActivityListETagOriginal;
92                 std::map<int,wxDateTime> ActivityListFinDate;
93                 std::map<int,wxArrayString> ActivityListLog;
94                 bool WindowOpen = FALSE;
95                 bool TasksActive = FALSE;
96                 bool SleepMode = FALSE;
97                 bool ProcessTasksData = FALSE;
98                 //int ConflictResult = 0;
99                 wxETagProcessTimer *ETagTmrPtr;
100                 void *frmMainPtr;
101                 //frmMain *frmMainPtr;
102         protected:
103                 // Handlers for frmActivityMgrADT events.
104                 void CloseWindow( wxCommandEvent& event );
105                 void CloseWindow( wxCloseEvent& event );
106                 void StopTask( wxCommandEvent& event );
107                 void StopAllTasks( wxCommandEvent& event );
108                 void RetryTask( wxCommandEvent& event );
109                 void StartTimer( wxCommandEvent& event );
110                 void StopTimer( wxCommandEvent& event );
111                 void StartProcessTimer( wxCommandEvent& event );
112                 void StopProcessTimer( wxCommandEvent& event );
113                 void FlushAllTasks();
114                 void RemoveTask();
115                 void ProcessTasksThread();
116                 void ToggleConnectionStatus( wxCommandEvent& event );
117                 void WriteServerCertificate(wxString AccountName, SSLCertCollection SSLCertInc);
118                 void UpdateStatusLabel( wxCommandEvent& event );
119         public:
120                 /** Constructor */
121                 frmActivityMgr( wxWindow* parent );
122                 int AddTask(int TaskType, wxString TaskDetail, wxString TaskAccount, 
123                         wxString TaskURL, wxString TaskFilename, wxString TaskFullFilename,
124                         wxString TaskData);
125                 void ProcessTasks();
126                 void OpenWindow();
127                 void SetupPointers(wxETagProcessTimer *ETagTmrPtrInc, void *frmMainPtrInc);
128                 void ResumeProcessing(wxCommandEvent &event);
129                 void PauseAllTimers();
130                 void ResumeAllTimers();
131                 int GetTaskStatus(int intTaskID);
132                 DECLARE_EVENT_TABLE()
134         //// end generated class members
135         
136 };
138 #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