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