// frmActivityMgr.h - Activity Manager header file. // // (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 #ifndef __frmActivityMgr__ #define __frmActivityMgr__ /** @file Subclass of frmActivityMgrADT, which is generated by wxFormBuilder. */ #include "AppXestiaAddrBk.h" #include "carddav/carddav.h" #include #include #include "common/timers.h" #include "common/etag.h" //// end generated include DECLARE_EVENT_TYPE(ACTMGR_RESUMEPROC, wxID_ANY) DECLARE_EVENT_TYPE(ACTMGR_TOGGLECONN, wxID_ANY) DECLARE_EVENT_TYPE(ACTMGR_STARTTIMER, wxID_ANY) DECLARE_EVENT_TYPE(ACTMGR_STOPTIMER, wxID_ANY) DECLARE_EVENT_TYPE(ACTMGR_STARTPROCESSTIMER, wxID_ANY) DECLARE_EVENT_TYPE(ACTMGR_STOPPROCESSTIMER, wxID_ANY) DECLARE_EVENT_TYPE(ACTMGR_UPDATESTATUSLABEL, wxID_ANY) struct vCardDownloadDataFileClass{ unsigned int DataType = 0; wxString FileData; }; struct ActivityMgrLabelUpdate{ long ItemIndex; wxString ItemLabel; wxString ItemDes; }; /** Implementing frmActivityMgrADT */ class frmActivityMgr : public frmActivityMgrADT { private: wxActTimer AnimationTimer; wxActProcessTimer ActProcessTimer; wxActListProcTimer ActListProcTimer; wxBitmap SleepBitmap; int ActivityTaskID = 0; int ActivityProgressBarTotal = 0; int ActivityProgressBarDone = 0; bool BlankBool = FALSE; std::map ActivityList; std::map ActivityListType; std::map ActivityListIndex; std::map ActivityListData; std::map ActivityListTaskDetail; std::map ActivityListAccount; std::map ActivityListFilename; std::map ActivityListFullFilename; std::map ActivityListConn; std::map ActivityListETag; std::map ActivityListETagOriginal; std::map ActivityListFinDate; std::map ActivityListLog; bool WindowOpen = FALSE; bool TasksActive = FALSE; bool SleepMode = FALSE; bool ProcessTasksData = FALSE; //int ConflictResult = 0; wxETagProcessTimer *ETagTmrPtr; void *frmMainPtr; //frmMain *frmMainPtr; protected: // Handlers for frmActivityMgrADT events. void CloseWindow( wxCommandEvent& event ); void CloseWindow( wxCloseEvent& event ); void StopTask( wxCommandEvent& event ); void StopAllTasks( wxCommandEvent& event ); void RetryTask( wxCommandEvent& event ); void StartTimer( wxCommandEvent& event ); void StopTimer( wxCommandEvent& event ); void StartProcessTimer( wxCommandEvent& event ); void StopProcessTimer( wxCommandEvent& event ); void FlushAllTasks(); void RemoveTask(); void ProcessTasksThread(); void ToggleConnectionStatus( wxCommandEvent& event ); void WriteServerCertificate(wxString AccountName, SSLCertCollection SSLCertInc); void UpdateStatusLabel( wxCommandEvent& event ); public: /** Constructor */ frmActivityMgr( wxWindow* parent ); int AddTask(int TaskType, wxString TaskDetail, wxString TaskAccount, wxString TaskURL, wxString TaskFilename, wxString TaskFullFilename, wxString TaskData); void ProcessTasks(); void OpenWindow(); void SetupPointers(wxETagProcessTimer *ETagTmrPtrInc, void *frmMainPtrInc); void ResumeProcessing(wxCommandEvent &event); void PauseAllTimers(); void ResumeAllTimers(); int GetTaskStatus(int intTaskID); DECLARE_EVENT_TABLE() //// end generated class members }; #endif // __frmActivityMgr__