DEFINE_EVENT_TYPE(ACTMGR_STOPTIMER);
DEFINE_EVENT_TYPE(ACTMGR_STARTPROCESSTIMER);
DEFINE_EVENT_TYPE(ACTMGR_STOPPROCESSTIMER);
+DEFINE_EVENT_TYPE(ACTMGR_UPDATESTATUSLABEL);
BEGIN_EVENT_TABLE(frmActivityMgr, wxWindow)
EVT_COMMAND(wxID_ANY, ACTMGR_RESUMEPROC, frmActivityMgr::ResumeProcessing)
EVT_COMMAND(wxID_ANY, ACTMGR_STOPTIMER, frmActivityMgr::StopTimer)
EVT_COMMAND(wxID_ANY, ACTMGR_STARTPROCESSTIMER, frmActivityMgr::StartProcessTimer)
EVT_COMMAND(wxID_ANY, ACTMGR_STOPPROCESSTIMER, frmActivityMgr::StopProcessTimer)
+ EVT_COMMAND(wxID_ANY, ACTMGR_UPDATESTATUSLABEL, frmActivityMgr::UpdateStatusLabel)
END_EVENT_TABLE()
frmActivityMgr::frmActivityMgr( wxWindow* parent )
this->Hide();
}
+void frmActivityMgr::CloseWindow( wxCloseEvent& event )
+{
+ WindowOpen = FALSE;
+ this->Hide();
+}
+
void frmActivityMgr::ProcessTasksThread()
{
//ServerContactList = CardDAVInstance.GetContactList(SyncTokenLoad.ToUTF8());
ServerContactList = CardDAVIter->second.GetContactList(SyncTokenLoad.ToUTF8());
+ SSLCertCollection certcol = CardDAVIter->second.GetCertificateData();
// Create a pointer for the std::map<wxString,FileSyncData>.
qrn.QResponse = &SSLResult;
qrn.PausePtr = PauseMode;
- SSLICNProcData.CertCollection = CardDAVIter->second.GetCertificateData();
+ SSLICNProcData.CertCollection = certcol;
SSLICNProcData.QRNotifData = &qrn;
SSLICNProcData.AccountName = AccountNameFriendly;
ETagDB *ETagDBPtr = ETagTmrPtr->GetPointer(AccountDir);
ETag = ETagDBPtr->GetETag(vCardAdd[vi]);
ETagOriginal = ETagDBPtr->GetETagOriginal(vCardAdd[vi]);
+
ContactFilename = vCardAdd[vi];
FullFilename = CreateFilenamePath(AccountDirFinal, vCardAdd[vi]);
ContactFilename.Trim();
- if (ETag == ETagOriginal){
+ if (ETag == ETagOriginal && ETagDBPtr->ETagExists(vCardAdd[vi])){
// Compare the ETag with the Server ETag.
+
+ CardDAVIter->second.SetServerFilename(vCardAdd[vi]);
+ CardDAVIter->second.GetServerETagValueThread();
+ ETagServer = CardDAVIter->second.ETagValueResult();
if (ETagOriginal != ETagServer){
}
+void frmActivityMgr::UpdateStatusLabel(wxCommandEvent& event){
+
+ ActivityMgrLabelUpdate *actmgrudata = (ActivityMgrLabelUpdate*)event.GetClientData();
+
+ if (actmgrudata != NULL){
+
+ wxPuts(wxT("ItemIndex:") + actmgrudata->ItemIndex);
+ wxPuts(wxT("ItemLabel:") + actmgrudata->ItemLabel);
+ wxPuts(wxT("ItemDes: ") + actmgrudata->ItemDes);
+
+ lstActivity->SetItem(actmgrudata->ItemIndex, 2, actmgrudata->ItemLabel);
+
+ /*if (!actmgrudata->ItemDes.IsEmpty()){
+ lstActivity->SetItem(actmgrudata->ItemIndex, 0, actmgrudata->ItemDes);
+ }*/
+
+ delete actmgrudata;
+ actmgrudata = NULL;
+
+ }
+
+}
+
#endif
\ No newline at end of file
#include "carddav/carddav.h"
#include <map>
#include <wx/timer.h>
+
#include "common/timers.h"
#include "common/etag.h"
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
{
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 ProcessTasksThread();
void ToggleConnectionStatus( wxCommandEvent& event );
void WriteServerCertificate(wxString AccountName, SSLCertCollection SSLCertInc);
+ void UpdateStatusLabel( wxCommandEvent& event );
public:
/** Constructor */
frmActivityMgr( wxWindow* parent );