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