From a066714be6d7646614c51e71313cc7c2a6bb4a0f Mon Sep 17 00:00:00 2001 From: Steve Brokenshire Date: Sat, 9 Apr 2016 08:36:19 +0100 Subject: [PATCH] Added ActivityListAccSettings to eventually replace ActivityListConn --- source/actmgr/frmActivityMgr-tasks.cpp | 13 +++++++++++++ source/actmgr/frmActivityMgr.h | 11 +++++++++++ 2 files changed, 24 insertions(+) diff --git a/source/actmgr/frmActivityMgr-tasks.cpp b/source/actmgr/frmActivityMgr-tasks.cpp index fe6eb3d..72135db 100644 --- a/source/actmgr/frmActivityMgr-tasks.cpp +++ b/source/actmgr/frmActivityMgr-tasks.cpp @@ -79,6 +79,15 @@ int frmActivityMgr::AddTask(int TaskType, wxString TaskDetail, wxString TaskAcco } + ActivityMgrAccountSettings AccountSettings; + AccountSettings.Address = AccountAddress; + AccountSettings.Port = AccountPort; + AccountSettings.Username = AccountUsername; + AccountSettings.Password = AccountPassword; + AccountSettings.SSL = AccountSSL; + AccountSettings.Prefix = AccountPrefix; + AccountSettings.Dir = AccountDir; + CardDAVConn->SetupConnection(AccountAddress, AccountPort, AccountUsername, AccountPassword, AccountSSL, AccountPrefix, AccountDir); CardDAVConn->SetupVariables(&ActivityList, ActivityTaskID); CardDAVConn->SetupResultBools(&BlankBool, &BlankBool); @@ -112,6 +121,7 @@ int frmActivityMgr::AddTask(int TaskType, wxString TaskDetail, wxString TaskAcco ActivityListAccount.insert(std::make_pair(ActivityTaskID, TaskAccount)); ActivityListFilename.insert(std::make_pair(ActivityTaskID, TaskFilename)); ActivityListFullFilename.insert(std::make_pair(ActivityTaskID, TaskFullFilename)); + ActivityListAccSettings.insert(std::make_pair(ActivityTaskID, AccountSettings)); ActivityListETag.insert(std::make_pair(ActivityTaskID, ETagDBPtr->GetETag(TaskFilename))); ActivityListETagOriginal.insert(std::make_pair(ActivityTaskID, ETagDBPtr->GetETagOriginal(TaskFilename))); @@ -139,6 +149,7 @@ int frmActivityMgr::AddTask(int TaskType, wxString TaskDetail, wxString TaskAcco ActivityListAccount.insert(std::make_pair(ActivityTaskID, TaskAccount)); ActivityListFilename.insert(std::make_pair(ActivityTaskID, TaskFilename)); ActivityListFullFilename.insert(std::make_pair(ActivityTaskID, TaskFullFilename)); + ActivityListAccSettings.insert(std::make_pair(ActivityTaskID, AccountSettings)); ActivityListETag.insert(std::make_pair(ActivityTaskID, ETagDBPtr->GetETag(TaskFilename))); ActivityListETagOriginal.insert(std::make_pair(ActivityTaskID, ETagDBPtr->GetETagOriginal(TaskFilename))); @@ -161,6 +172,7 @@ int frmActivityMgr::AddTask(int TaskType, wxString TaskDetail, wxString TaskAcco ActivityListConn.insert(std::make_pair(ActivityTaskID, CardDAVConn)); ActivityListFilename.insert(std::make_pair(ActivityTaskID, TaskFilename)); ActivityListIndex.insert(std::make_pair(ActivityTaskID, itemindex)); + ActivityListAccSettings.insert(std::make_pair(ActivityTaskID, AccountSettings)); } else if (TaskType == 3){ @@ -177,6 +189,7 @@ int frmActivityMgr::AddTask(int TaskType, wxString TaskDetail, wxString TaskAcco ActivityListTaskDetail.insert(std::make_pair(ActivityTaskID, AccountPrefix)); ActivityListAccount.insert(std::make_pair(ActivityTaskID, TaskAccount)); ActivityListIndex.insert(std::make_pair(ActivityTaskID, itemindex)); + ActivityListAccSettings.insert(std::make_pair(ActivityTaskID, AccountSettings)); } diff --git a/source/actmgr/frmActivityMgr.h b/source/actmgr/frmActivityMgr.h index 71b8515..493bdd1 100644 --- a/source/actmgr/frmActivityMgr.h +++ b/source/actmgr/frmActivityMgr.h @@ -55,6 +55,16 @@ struct ActivityMgrLabelUpdate{ wxString ItemDes; }; +struct ActivityMgrAccountSettings{ + wxString Address; + int Port; + wxString Username; + wxString Password; + bool SSL; + wxString Prefix; + wxString Dir; +}; + /** Implementing frmActivityMgrADT */ class frmActivityMgr : public frmActivityMgrADT { @@ -76,6 +86,7 @@ class frmActivityMgr : public frmActivityMgrADT std::map ActivityListFilename; std::map ActivityListFullFilename; std::map ActivityListConn; + std::map ActivityListAccSettings; std::map ActivityListETag; std::map ActivityListETagOriginal; std::map ActivityListFinDate; -- 2.39.5