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