DEFINE_EVENT_TYPE(ACTMGR_STARTPROCESSTIMER);
DEFINE_EVENT_TYPE(ACTMGR_STOPPROCESSTIMER);
DEFINE_EVENT_TYPE(ACTMGR_UPDATESTATUSLABEL);
+DEFINE_EVENT_TYPE(ACTMGR_STARTANIMATIONTIMER);
BEGIN_EVENT_TABLE(frmActivityMgr, wxWindow)
EVT_COMMAND(wxID_ANY, ACTMGR_RESUMEPROC, frmActivityMgr::ResumeProcessing)
EVT_COMMAND(wxID_ANY, ACTMGR_STARTPROCESSTIMER, frmActivityMgr::StartProcessTimer)
EVT_COMMAND(wxID_ANY, ACTMGR_STOPPROCESSTIMER, frmActivityMgr::StopProcessTimer)
EVT_COMMAND(wxID_ANY, ACTMGR_UPDATESTATUSLABEL, frmActivityMgr::UpdateStatusLabel)
+ EVT_COMMAND(wxID_ANY, ACTMGR_STARTANIMATIONTIMER, frmActivityMgr::StartAnimationTimer)
END_EVENT_TABLE()
frmActivityMgr::frmActivityMgr( wxWindow* parent )
}
+ if (ApplicationSleepMode == TRUE){
+
+ return;
+
+ }
+
std::map<int,int>::iterator TypeIter;
std::map<int,wxString>::iterator StringIter;
std::map<int,wxString>::iterator StringDataIter;
continue;
}
+ wxCommandEvent StartAnimationEvent(ACTMGR_STARTANIMATIONTIMER);
+
+ wxPostEvent(this, StartAnimationEvent);
+
+ // Start the animation timer if it hasn't started.
+
CardDAVIter = ActivityListConn.find(iter->first);
TypeIter = ActivityListType.find(iter->first);
StringETagIter = ActivityListETag.find(iter->first);
SSLInvalidCertNotifObj SSLICNProcData;
- SSLCertCollection certcol = ConnHandle.GetCertificateData();
+ SSLCertCollection certcol = ConnHandle.GetSSLVerifyResults();
bool *PauseMode = new bool;
QRNotif qrn;
SSLInvalidCertNotifObj SSLICNProcData;
- SSLCertCollection certcol = ConnHandle.GetCertificateData();
+ SSLCertCollection certcol = ConnHandle.GetSSLVerifyResults();
bool *PauseMode = new bool;
QRNotif qrn;
// Accept the certificate. Write the certificate into the account
// directory (as server.crt) - will overwrite old certificate.
- frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnHandle.GetCertificateData());
- WriteServerCertificate(AccountDir, ConnHandle.GetCertificateData());
+ frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnHandle.GetSSLVerifyResults());
+ WriteServerCertificate(AccountDir, ConnHandle.GetSSLVerifyResults());
} else if (SSLResult == 2){
// Reject the certificate, abort the task and mark as failed.
- frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 1, ConnHandle.GetCertificateData());
+ frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 1, ConnHandle.GetSSLVerifyResults());
iter->second = 2;
break;
#else
- frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnHandle.GetCertificateData());
+ frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnHandle.GetSSLVerifyResults());
#endif
SSLInvalidCertNotifObj SSLICNProcData;
+ SSLCertCollection certcol = ConnHandle.GetSSLVerifyResults();
+
bool *PauseMode = new bool;
QRNotif qrn;
// Accept the certificate. Write the certificate into the account
// directory (as server.crt) - will overwrite old certificate.
- frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnHandle.GetCertificateData());
- WriteServerCertificate(AccountDir, ConnHandle.GetCertificateData());
+ frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnHandle.GetSSLVerifyResults());
+ WriteServerCertificate(AccountDir, ConnHandle.GetSSLVerifyResults());
} else if (SSLResult == 2){
// Reject the certificate, abort the task and mark as failed.
- frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 1, ConnHandle.GetCertificateData());
+ frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 1, ConnHandle.GetSSLVerifyResults());
iter->second = 2;
break;
#else
- frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnHandle.GetCertificateData());
+ frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnHandle.GetSSLVerifyResults());
#endif
ConnHandle.SetUploadMode(FALSE);
ConnHandle.SetupData(wxT("DELETE"), ContactFilename, wxT(""));
ConnHandle.ProcessData();
+
SSLCertCollection certcol = ConnHandle.GetCertificateData();
// Check if any errors have occured whilst getting the data.
SSLInvalidCertNotifObj SSLICNProcData;
+ SSLCertCollection certcol = ConnHandle.GetSSLVerifyResults();
+
bool *PauseMode = new bool;
QRNotif qrn;
// Accept the certificate. Write the certificate into the account
// directory (as server.crt) - will overwrite old certificate.
- frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnHandle.GetCertificateData());
- WriteServerCertificate(AccountDir, ConnHandle.GetCertificateData());
+ frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnHandle.GetSSLVerifyResults());
+ WriteServerCertificate(AccountDir, ConnHandle.GetSSLVerifyResults());
} else if (SSLResult == 2){
// Reject the certificate, abort the task and mark as failed.
- frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 1, ConnHandle.GetCertificateData());
+ frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 1, ConnHandle.GetSSLVerifyResults());
iter->second = 2;
break;
#else
- frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnHandle.GetCertificateData());
+ frmMainPtrGet->UpdateSSLAccountStatus(AccountID, 0, ConnHandle.GetSSLVerifyResults());
#endif
//ActListProcTimer.Start();
}
-
+
wxCommandEvent event(ACTMGR_STARTPROCESSTIMER);
wxPostEvent(this, event);
void frmActivityMgr::ProcessTasks()
{
-
+
std::thread ProcessThread(&frmActivityMgr::ProcessTasksThread, this);
ProcessThread.detach();
wxCommandEvent connevent(CONNSTAT_UPDATE);
- if (SleepMode == FALSE){
+ if (ApplicationSleepMode == FALSE){
connevent.SetInt(1);
- SleepMode = TRUE;
+ ApplicationSleepMode = TRUE;
+ mnuSleepMode->Check(true);
} else {
connevent.SetInt(0);
- SleepMode = FALSE;
+ ApplicationSleepMode = FALSE;
+ mnuSleepMode->Check(false);
+
+ wxCommandEvent event(ACTMGR_STARTTIMER);
+ wxPostEvent(this, event);
+
+ wxCommandEvent eventp(ACTMGR_STARTPROCESSTIMER);
+ wxPostEvent(this, eventp);
}
}
+void frmActivityMgr::SleepMode( wxCommandEvent &event ){
+
+ wxCommandEvent connevent(ACTMGR_TOGGLECONN);
+
+ wxPostEvent(this, connevent);
+
+}
+
void frmActivityMgr::WriteServerCertificate(wxString AccountName, SSLCertCollection SSLCertInc){
wxString ServerCertFinal;
}
+void frmActivityMgr::StartAnimationTimer(wxCommandEvent& event){
+
+ AnimationTimer.StartAnimation();
+
+}
+
void frmActivityMgr::UpdateStatusLabel(wxCommandEvent& event){
ActivityMgrLabelUpdate *actmgrudata = (ActivityMgrLabelUpdate*)event.GetClientData();