Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Initial import of code already done for Xestia Address Book
[xestiaab/.git] / source / common / timers.h
1 #include <map>
2 #include <wx/timer.h>
3 #include <wx/wx.h>
4 #include <mutex>
5 #include "../frmActivityMgr.h"
6 #include "../contacteditor/frmContactEditor.h"
7 #include "etag.h"
9 #ifndef TIMERS_H
10 #define TIMERS_H
12 struct ETagDB;
13 struct frmContactEditor;
15 class wxActTimer : public wxTimer
16 {
17         private:
18                 int intActivityProgress = 0;
19                 wxStaticBitmap *bmpActivity;
20                 wxBitmap *SleepBitmapPtr;
21                 void *frmMainPtr;
22         public:
23     wxActTimer():wxTimer()
24     {
25     }
26     void Notify();
27     void SetBitmap(wxStaticBitmap *ActMgr);
28     void ResetBitmap();
29     void StartAnimation();
30     void StopAnimation();
31     void SetSleepBitmap(wxBitmap *SleepBitmap);
32     void SetupPointer(void *frmMainPtrIn);
34 };
36 class wxActProcessTimer : public wxTimer
37 {
39         private:
40                 int intActivityProgress = 0;
41                 wxStaticBitmap *bmpActivity;
42                 void *ActMgrPtr;
43         public:
44     wxActProcessTimer():wxTimer()
45     {
46     }
47     void Notify();
48     void SetupPointers(void *ActMgr);
50 };
52 class wxActListProcTimer : public wxTimer
53 {
55         private:
56                 std::map<int,int> *ActListPtr;
57                 std::map<int,long> *ActListUIPtr;
58                 std::map<int,wxString> *ActListDetailPtr;
59                 wxListCtrl *lstActivityPtr;
60                 wxStaticText *lblDetailsPtr;
61                 bool *TasksActivePtr;
62                 wxGauge *GauProgressPtr;
63                 void *ActMgrPtr;
64                 int intActivityTotal = 0;
65                 int intActivityCompleted = 0;
66                 wxActTimer *ActTimerPtr;
67                 wxActProcessTimer *ActProcessTimerPtr;
68                 std::map<int,wxDateTime> *ActListFinDTPtr;
69                 bool ClearupProcessed = FALSE;
70         public:
71     wxActListProcTimer():wxTimer()
72     {
73     }
74     void Notify();
75     void SetupPointers(std::map<int,int> *ActList, std::map<int,long> *ActListUI, 
76                         std::map<int,wxString> *ActListDetail, bool *TasksActive,
77                         wxListCtrl *lstActivity, wxStaticText *lblDetails, wxGauge *GauProgress,
78                         void *ActMgr, wxActTimer *ActTimer, wxActProcessTimer *ActProcessTimer,
79                         std::map<int,wxDateTime> *ActListFinDT);
80     void EnableClearup();
82 };
84 class wxETagProcessTimer : public wxTimer
85 {
86         private:
87                 int intActivityProgress = 0;
88                 std::map<wxString,ETagDB> ETagDBList;
89                 //std::map<int,ETagDB2> ETagDBListv3;
90                 std::mutex ReloadLock;
91         public:
92     wxETagProcessTimer():wxTimer()
93     {
94         ReloadAccounts();
95     }
96     void Notify();
97     ETagDB* GetPointer(wxString Filename);
98     void ReloadAccounts();
99     //void SetupPointers(frmActivityMgr *ActMgr);
101 };
103 class wxContactFileMonitorTimer : public wxTimer
105         private:
106                 bool FileStatus = FALSE;
107                 wxString Filename;
108                 frmContactEditor *frmCEPtr;
109                 wxDateTime FileDateTime;
110         public:
111     wxContactFileMonitorTimer():wxTimer()
112     {
113     }
114     void Notify();
115     void SetFilename(wxString FilenameInc);
116     void SetupPointers(frmContactEditor *frmCEPtrInc);
117     void UpdateTimestamp();
118 };
120 class wxContactWindowMonitor : public wxTimer
122         private:
123                 std::map<wxString, void*> *ContactWindowListPtr;
124         public:
125     wxContactWindowMonitor():wxTimer()
126     {
127     }
128     void Notify();
129     void SetupPointers(std::map<wxString, void*> *ContactWindowListPtrInc);
130 };
132 class wxAccountSyncTimer : public wxTimer
134         private:
135                 wxString AccName;
136                 wxString AccNameFull;
137                 void *frmMainPtr;
138                 void *frmActMgrPtr;
139                 ETagDB *ETagDBPtr;
140                 int intTaskID;
141         public:
142     wxAccountSyncTimer():wxTimer()
143     {
144     }
145     void Notify();
146     void SetupData(wxString AccNameInc, wxString AccNameFull);
147     void SetupPointers(void *frmMainPtrInc, 
148         void *frmACtMgrPtr, ETagDB *ETagDBPtrInc);
149         
150 };
152 void SleepFor(unsigned long longSleepNanoSecs);
154 #endif
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