Home | News | Projects | Releases
Bugs | RFE | Repositories | Help
Capitalise Bitmaps and Tools directories
[xestiaab/.git] / source / common / timers.h
index 1478948..8859e48 100644 (file)
@@ -1,9 +1,42 @@
+// timers.h - Timers subroutines header.
+//
+// (c) 2012-2015 Xestia Software Development.
+//
+// This file is part of Xestia Address Book.
+//
+// Xestia Address Book is free software: you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by the
+// Free Software Foundation, version 3 of the license.
+//
+// Xestia Address Book is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with Xestia Address Book. If not, see <http://www.gnu.org/licenses/>
+
 #include <map>
+#include <mutex>
+#include <atomic>
 #include <wx/timer.h>
 #include <wx/wx.h>
-#include <mutex>
-#include "../frmActivityMgr.h"
+#include <wx/mstream.h>
+#include <wx/file.h>
+#include <wx/ffile.h>
+#include <wx/filename.h>
+#include <wx/tokenzr.h>
+
+#include "../actmgr/frmActivityMgr.h"
 #include "../contacteditor/frmContactEditor.h"
+#include "../connobject/ConnectionObject.h"
+#include "../frmContact.h"
+#include "../frmMain.h"
+#include "../Bitmaps.h"
+#include "../enums.h"
+#include "../common/preferences.h"
+#include "../common/etag.h"
+#include "../common/dirs.h"
 #include "etag.h"
 
 #ifndef TIMERS_H
@@ -14,12 +47,12 @@ struct frmContactEditor;
 
 class wxActTimer : public wxTimer
 {
-       private:
-               int intActivityProgress = 0;
-               wxStaticBitmap *bmpActivity;
-               wxBitmap *SleepBitmapPtr;
-               void *frmMainPtr;
-       public:
+private:
+    int intActivityProgress = 0;
+    wxStaticBitmap *bmpActivity;
+    wxBitmap *SleepBitmapPtr;
+    void *frmMainPtr;
+public:
     wxActTimer():wxTimer()
     {
     }
@@ -30,84 +63,84 @@ class wxActTimer : public wxTimer
     void StopAnimation();
     void SetSleepBitmap(wxBitmap *SleepBitmap);
     void SetupPointer(void *frmMainPtrIn);
-
+    
 };
 
 class wxActProcessTimer : public wxTimer
 {
-
-       private:
-               int intActivityProgress = 0;
-               wxStaticBitmap *bmpActivity;
-               void *ActMgrPtr;
-       public:
+    
+private:
+    int intActivityProgress = 0;
+    wxStaticBitmap *bmpActivity;
+    void *ActMgrPtr;
+public:
     wxActProcessTimer():wxTimer()
     {
     }
     void Notify();
     void SetupPointers(void *ActMgr);
-
+    
 };
 
 class wxActListProcTimer : public wxTimer
 {
-
-       private:
-               std::map<int,int> *ActListPtr;
-               std::map<int,long> *ActListUIPtr;
-               std::map<int,wxString> *ActListDetailPtr;
-               wxListCtrl *lstActivityPtr;
-               wxStaticText *lblDetailsPtr;
-               bool *TasksActivePtr;
-               wxGauge *GauProgressPtr;
-               void *ActMgrPtr;
-               int intActivityTotal = 0;
-               int intActivityCompleted = 0;
-               wxActTimer *ActTimerPtr;
-               wxActProcessTimer *ActProcessTimerPtr;
-               std::map<int,wxDateTime> *ActListFinDTPtr;
-               bool ClearupProcessed = FALSE;
-       public:
+    
+private:
+    std::map<int,int> *ActListPtr = nullptr;
+    std::map<int,long> *ActListUIPtr = nullptr;
+    std::map<int,wxString> *ActListDetailPtr = nullptr;
+    wxListCtrl *lstActivityPtr = nullptr;
+    wxStaticText *lblDetailsPtr = nullptr;
+    bool *TasksActivePtr = nullptr;
+    wxGauge *GauProgressPtr = nullptr;
+    void *ActMgrPtr = nullptr;
+    int intActivityTotal = 0;
+    int intActivityCompleted = 0;
+    wxActTimer *ActTimerPtr = nullptr;
+    wxActProcessTimer *ActProcessTimerPtr = nullptr;
+    std::map<int,wxDateTime> *ActListFinDTPtr = nullptr;
+    std::map<int,ConnectionObject*> *ActListConnObjectsPtr = nullptr;
+    bool ClearupProcessed = FALSE;
+public:
     wxActListProcTimer():wxTimer()
     {
     }
     void Notify();
-    void SetupPointers(std::map<int,int> *ActList, std::map<int,long> *ActListUI, 
-                       std::map<int,wxString> *ActListDetail, bool *TasksActive,
-                       wxListCtrl *lstActivity, wxStaticText *lblDetails, wxGauge *GauProgress,
-                       void *ActMgr, wxActTimer *ActTimer, wxActProcessTimer *ActProcessTimer,
-                       std::map<int,wxDateTime> *ActListFinDT);
+    void SetupPointers(std::map<int,int> *ActList, std::map<int,long> *ActListUI,
+                       std::map<int,wxString> *ActListDetail, bool *TasksActive,
+                       wxListCtrl *lstActivity, wxStaticText *lblDetails, wxGauge *GauProgress,
+                       void *ActMgr, wxActTimer *ActTimer, wxActProcessTimer *ActProcessTimer,
+                       std::map<int,wxDateTime> *ActListFinDT, std::map<int,ConnectionObject*> *ActListConnObjects);
     void EnableClearup();
-
+    
 };
 
 class wxETagProcessTimer : public wxTimer
 {
-       private:
-               int intActivityProgress = 0;
-               std::map<wxString,ETagDB> ETagDBList;
-               //std::map<int,ETagDB2> ETagDBListv3;
-               std::mutex ReloadLock;
-       public:
+private:
+    int intActivityProgress = 0;
+    std::map<wxString,ETagDB> ETagDBList;
+
+    std::mutex ReloadLock;
+public:
     wxETagProcessTimer():wxTimer()
     {
-       ReloadAccounts();
+        ReloadAccounts();
     }
     void Notify();
     ETagDB* GetPointer(wxString Filename);
     void ReloadAccounts();
-    //void SetupPointers(frmActivityMgr *ActMgr);
-
+    
 };
 
 class wxContactFileMonitorTimer : public wxTimer
 {
-       private:
-               bool FileStatus = FALSE;
-               wxString Filename;
-               frmContactEditor *frmCEPtr;
-               wxDateTime FileDateTime;
-       public:
+private:
+    bool FileStatus = FALSE;
+    wxString Filename;
+    frmContactEditor *frmCEPtr;
+    wxDateTime FileDateTime;
+public:
     wxContactFileMonitorTimer():wxTimer()
     {
     }
@@ -119,9 +152,9 @@ class wxContactFileMonitorTimer : public wxTimer
 
 class wxContactWindowMonitor : public wxTimer
 {
-       private:
-               std::map<wxString, void*> *ContactWindowListPtr;
-       public:
+private:
+    std::map<wxString, void*> *ContactWindowListPtr;
+public:
     wxContactWindowMonitor():wxTimer()
     {
     }
@@ -131,24 +164,24 @@ class wxContactWindowMonitor : public wxTimer
 
 class wxAccountSyncTimer : public wxTimer
 {
-       private:
-               wxString AccName;
-               wxString AccNameFull;
-               void *frmMainPtr;
-               void *frmActMgrPtr;
-               ETagDB *ETagDBPtr;
-               int intTaskID;
-       public:
+private:
+    wxString AccName;
+    wxString AccNameFull;
+    void *frmMainPtr;
+    void *frmActMgrPtr;
+    ETagDB *ETagDBPtr;
+    int intTaskID;
+public:
     wxAccountSyncTimer():wxTimer()
     {
     }
     void Notify();
     void SetupData(wxString AccNameInc, wxString AccNameFull);
     void SetupPointers(void *frmMainPtrInc, 
-       void *frmACtMgrPtr, ETagDB *ETagDBPtrInc);
-       
+                       void *frmACtMgrPtr, ETagDB *ETagDBPtrInc);
+    
 };
 
 void SleepFor(unsigned long longSleepNanoSecs);
 
-#endif
\ No newline at end of file
+#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