X-Git-Url: http://Server1/repobrowser/?a=blobdiff_plain;f=source%2Fcommon%2Ftimers.h;h=4bb44825913e58ea4df10e80058fe4e642c2cbf6;hb=fa9edc1e1656e737b9194e54e06043473cad3622;hp=147894862a7282bdb7901bb6849122745e0fbea1;hpb=45729fca56479bd9158486e0cda0c4a94b4dd1dc;p=xestiaab%2F.git diff --git a/source/common/timers.h b/source/common/timers.h index 1478948..4bb4482 100644 --- a/source/common/timers.h +++ b/source/common/timers.h @@ -1,8 +1,27 @@ +// 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 + #include #include #include #include -#include "../frmActivityMgr.h" +#include +#include "../actmgr/frmActivityMgr.h" #include "../contacteditor/frmContactEditor.h" #include "etag.h" @@ -11,15 +30,16 @@ struct ETagDB; struct frmContactEditor; +struct CardDAV; 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 +50,85 @@ 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 *ActListPtr; - std::map *ActListUIPtr; - std::map *ActListDetailPtr; - wxListCtrl *lstActivityPtr; - wxStaticText *lblDetailsPtr; - bool *TasksActivePtr; - wxGauge *GauProgressPtr; - void *ActMgrPtr; - int intActivityTotal = 0; - int intActivityCompleted = 0; - wxActTimer *ActTimerPtr; - wxActProcessTimer *ActProcessTimerPtr; - std::map *ActListFinDTPtr; - bool ClearupProcessed = FALSE; - public: + +private: + std::map *ActListPtr; + std::map *ActListUIPtr; + std::map *ActListDetailPtr; + std::map *ActListConnPtr; + wxListCtrl *lstActivityPtr; + wxStaticText *lblDetailsPtr; + bool *TasksActivePtr; + wxGauge *GauProgressPtr; + void *ActMgrPtr; + int intActivityTotal = 0; + int intActivityCompleted = 0; + wxActTimer *ActTimerPtr; + wxActProcessTimer *ActProcessTimerPtr; + std::map *ActListFinDTPtr; + bool ClearupProcessed = FALSE; +public: wxActListProcTimer():wxTimer() { } void Notify(); - void SetupPointers(std::map *ActList, std::map *ActListUI, - std::map *ActListDetail, bool *TasksActive, - wxListCtrl *lstActivity, wxStaticText *lblDetails, wxGauge *GauProgress, - void *ActMgr, wxActTimer *ActTimer, wxActProcessTimer *ActProcessTimer, - std::map *ActListFinDT); + void SetupPointers(std::map *ActList, std::map *ActListUI, + std::map *ActListDetail, bool *TasksActive, + wxListCtrl *lstActivity, wxStaticText *lblDetails, wxGauge *GauProgress, + void *ActMgr, wxActTimer *ActTimer, wxActProcessTimer *ActProcessTimer, + std::map *ActListFinDT, std::map *ActListConn); void EnableClearup(); - + }; class wxETagProcessTimer : public wxTimer { - private: - int intActivityProgress = 0; - std::map ETagDBList; - //std::map ETagDBListv3; - std::mutex ReloadLock; - public: +private: + int intActivityProgress = 0; + std::map ETagDBList; + //std::map ETagDBListv3; + 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 +140,9 @@ class wxContactFileMonitorTimer : public wxTimer class wxContactWindowMonitor : public wxTimer { - private: - std::map *ContactWindowListPtr; - public: +private: + std::map *ContactWindowListPtr; +public: wxContactWindowMonitor():wxTimer() { } @@ -131,22 +152,22 @@ 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);