Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Replaced code for PREF in GEO with ProcessIntegerValue.
[xestiaab/.git] / source / common / timers.h
1 // timers.h - Timers subroutines header.
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 #include <map>
20 #include <wx/timer.h>
21 #include <wx/wx.h>
22 #include <mutex>
23 #include <atomic>
24 #include "../actmgr/frmActivityMgr.h"
25 #include "../contacteditor/frmContactEditor.h"
26 #include "etag.h"
28 #ifndef TIMERS_H
29 #define TIMERS_H
31 struct ETagDB;
32 struct frmContactEditor;
34 class wxActTimer : public wxTimer
35 {
36 private:
37     int intActivityProgress = 0;
38     wxStaticBitmap *bmpActivity;
39     wxBitmap *SleepBitmapPtr;
40     void *frmMainPtr;
41 public:
42     wxActTimer():wxTimer()
43     {
44     }
45     void Notify();
46     void SetBitmap(wxStaticBitmap *ActMgr);
47     void ResetBitmap();
48     void StartAnimation();
49     void StopAnimation();
50     void SetSleepBitmap(wxBitmap *SleepBitmap);
51     void SetupPointer(void *frmMainPtrIn);
52     
53 };
55 class wxActProcessTimer : public wxTimer
56 {
57     
58 private:
59     int intActivityProgress = 0;
60     wxStaticBitmap *bmpActivity;
61     void *ActMgrPtr;
62 public:
63     wxActProcessTimer():wxTimer()
64     {
65     }
66     void Notify();
67     void SetupPointers(void *ActMgr);
68     
69 };
71 class wxActListProcTimer : public wxTimer
72 {
73     
74 private:
75     std::map<int,int> *ActListPtr;
76     std::map<int,long> *ActListUIPtr;
77     std::map<int,wxString> *ActListDetailPtr;
78     std::map<int,CardDAV*> *ActListConnPtr;
79     wxListCtrl *lstActivityPtr;
80     wxStaticText *lblDetailsPtr;
81     bool *TasksActivePtr;
82     wxGauge *GauProgressPtr;
83     void *ActMgrPtr;
84     int intActivityTotal = 0;
85     int intActivityCompleted = 0;
86     wxActTimer *ActTimerPtr;
87     wxActProcessTimer *ActProcessTimerPtr;
88     std::map<int,wxDateTime> *ActListFinDTPtr;
89     bool ClearupProcessed = FALSE;
90 public:
91     wxActListProcTimer():wxTimer()
92     {
93     }
94     void Notify();
95     void SetupPointers(std::map<int,int> *ActList, std::map<int,long> *ActListUI,
96                        std::map<int,wxString> *ActListDetail, bool *TasksActive,
97                        wxListCtrl *lstActivity, wxStaticText *lblDetails, wxGauge *GauProgress,
98                        void *ActMgr, wxActTimer *ActTimer, wxActProcessTimer *ActProcessTimer,
99                        std::map<int,wxDateTime> *ActListFinDT, std::map<int, CardDAV*> *ActListConn);
100     void EnableClearup();
101     
102 };
104 class wxETagProcessTimer : public wxTimer
106 private:
107     int intActivityProgress = 0;
108     std::map<wxString,ETagDB> ETagDBList;
109     //std::map<int,ETagDB2> ETagDBListv3;
110     std::mutex ReloadLock;
111 public:
112     wxETagProcessTimer():wxTimer()
113     {
114         ReloadAccounts();
115     }
116     void Notify();
117     ETagDB* GetPointer(wxString Filename);
118     void ReloadAccounts();
119     //void SetupPointers(frmActivityMgr *ActMgr);
120     
121 };
123 class wxContactFileMonitorTimer : public wxTimer
125 private:
126     bool FileStatus = FALSE;
127     wxString Filename;
128     frmContactEditor *frmCEPtr;
129     wxDateTime FileDateTime;
130 public:
131     wxContactFileMonitorTimer():wxTimer()
132     {
133     }
134     void Notify();
135     void SetFilename(wxString FilenameInc);
136     void SetupPointers(frmContactEditor *frmCEPtrInc);
137     void UpdateTimestamp();
138 };
140 class wxContactWindowMonitor : public wxTimer
142 private:
143     std::map<wxString, void*> *ContactWindowListPtr;
144 public:
145     wxContactWindowMonitor():wxTimer()
146     {
147     }
148     void Notify();
149     void SetupPointers(std::map<wxString, void*> *ContactWindowListPtrInc);
150 };
152 class wxAccountSyncTimer : public wxTimer
154 private:
155     wxString AccName;
156     wxString AccNameFull;
157     void *frmMainPtr;
158     void *frmActMgrPtr;
159     ETagDB *ETagDBPtr;
160     int intTaskID;
161 public:
162     wxAccountSyncTimer():wxTimer()
163     {
164     }
165     void Notify();
166     void SetupData(wxString AccNameInc, wxString AccNameFull);
167     void SetupPointers(void *frmMainPtrInc, 
168                        void *frmACtMgrPtr, ETagDB *ETagDBPtrInc);
169     
170 };
172 void SleepFor(unsigned long longSleepNanoSecs);
174 #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