Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Resolved merge conflict with actmgr/frmActivityMgr.h
[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> ActivityListTaskDetail;
99                 std::map<int,wxString> ActivityListAccount;
100                 std::map<int,wxString> ActivityListFilename;
101                 std::map<int,wxString> ActivityListFullFilename;
102                 std::map<int,CardDAV*> ActivityListConn;
103                 std::map<int,ActivityMgrAccountSettings> ActivityListAccSettings;
104                 std::map<int,wxString> ActivityListETag;
105                 std::map<int,wxString> ActivityListETagOriginal;
106                 std::map<int,wxDateTime> ActivityListFinDate;
107                 std::map<int,wxArrayString> ActivityListLog;
108                 bool WindowOpen = FALSE;
109                 bool TasksActive = FALSE;
110                 bool SleepMode = FALSE;
111                 bool ProcessTasksData = FALSE;
112                 //int ConflictResult = 0;
113                 wxETagProcessTimer *ETagTmrPtr;
114                 void *frmMainPtr;
115 #if defined(__APPLE__)
116                 int DisplayTrustPanel(SecTrustRef SecurityTrustObject, wxString AccountNameFriendly);
117 #endif
118                 //frmMain *frmMainPtr;
119         protected:
120                 // Handlers for frmActivityMgrADT events.
121                 void CloseWindow( wxCommandEvent& event );
122                 void CloseWindow( wxCloseEvent& event );
123                 void StopTask( wxCommandEvent& event );
124                 void StopAllTasks( wxCommandEvent& event );
125                 void RetryTask( wxCommandEvent& event );
126                 void StartTimer( wxCommandEvent& event );
127                 void StopTimer( wxCommandEvent& event );
128                 void StartProcessTimer( wxCommandEvent& event );
129                 void StopProcessTimer( wxCommandEvent& event );
130                 void FlushAllTasks();
131                 void RemoveTask();
132                 void ProcessTasksThread();
133                 void ToggleConnectionStatus( wxCommandEvent& event );
134                 void WriteServerCertificate(wxString AccountName, SSLCertCollection SSLCertInc);
135                 void UpdateStatusLabel( wxCommandEvent& event );
136         public:
137                 /** Constructor */
138                 frmActivityMgr( wxWindow* parent );
139                 int AddTask(int TaskType, wxString TaskDetail, wxString TaskAccount, 
140                         wxString TaskURL, wxString TaskFilename, wxString TaskFullFilename,
141                         wxString TaskData);
142                 void ProcessTasks();
143                 void OpenWindow();
144                 void SetupPointers(wxETagProcessTimer *ETagTmrPtrInc, void *frmMainPtrInc);
145                 void ResumeProcessing(wxCommandEvent &event);
146                 void PauseAllTimers();
147                 void ResumeAllTimers();
148                 int GetTaskStatus(int intTaskID);
149                 DECLARE_EVENT_TABLE()
151         //// end generated class members
152         
153 };
155 #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