From a7fbdfd69ab74f27243197ac70698894e821fecb Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Fri, 2 Jan 2015 18:27:08 -0500 Subject: [PATCH] Fix plVaultClientApi to work with new NetVaultNode --- Sources/Plasma/PubUtilLib/plVault/Pch.h | 2 + .../PubUtilLib/plVault/plVaultClientApi.cpp | 184 ++++++------------ .../PubUtilLib/plVault/plVaultClientApi.h | 26 +-- 3 files changed, 78 insertions(+), 134 deletions(-) diff --git a/Sources/Plasma/PubUtilLib/plVault/Pch.h b/Sources/Plasma/PubUtilLib/plVault/Pch.h index 62951664..9bba4423 100644 --- a/Sources/Plasma/PubUtilLib/plVault/Pch.h +++ b/Sources/Plasma/PubUtilLib/plVault/Pch.h @@ -63,6 +63,8 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com #pragma warning(push, 0) #include #include +#include + #include "hsStringTokenizer.h" #include "hsGeometry3.h" #include "plSDL/plSDL.h" diff --git a/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp b/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp index aa34d07c..c484a501 100644 --- a/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp +++ b/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.cpp @@ -74,17 +74,6 @@ struct INotifyAfterDownload : THashKeyVal { {} }; -struct DeviceInbox : CHashKeyStr { - HASHLINK(DeviceInbox) link; - wchar_t inboxName[kMaxVaultNodeStringLength]; - - DeviceInbox (const wchar_t device[], const wchar_t inbox[]) - : CHashKeyStr(device) - { - StrCopy(inboxName, inbox, arrsize(inboxName)); - } -}; - // A RelVaultNodeLink may be either stored in the global table, // or stored in an IRelVaultNode's parents or children table. struct RelVaultNodeLink : THashKeyVal { @@ -293,11 +282,7 @@ static HASHTABLEDECL( link ) s_notifyAfterDownload; -static HASHTABLEDECL( - DeviceInbox, - CHashKeyStr, - link -) s_ageDeviceInboxes; +static std::unordered_map s_ageDeviceInboxes; static bool s_processPlayerInbox = false; @@ -553,13 +538,13 @@ static void VaultNodeFetched ( // Add to global node table RelVaultNodeLink * link = s_nodes.Find(node->GetNodeId()); if (!link) { - link = new RelVaultNodeLink(false, 0, node->GetNodeId(), new RelVaultNode); + link = new RelVaultNodeLink(false, 0, node->GetNodeId(), new RelVaultNode()); link->node->SetNodeId_NoDirty(node->GetNodeId()); s_nodes.Add(link); } - link->node->CopyFrom(node, NetVaultNode::kCopyOverwrite); + link->node->CopyFrom(node); InitFetchedNode(link->node); - + link->node->Print(L"Fetched", LogDumpProc, 0); } @@ -602,7 +587,7 @@ static void VaultNodeChanged ( // We are the party responsible for the change, so we already have the // latest version of the node; no need to fetch it. - if (link->node->revisionId == revisionId) + if (link->node->GetRevision() == revisionId) return; // We have the node and we weren't the one that changed it, so fetch it. @@ -726,12 +711,7 @@ static void SaveDirtyNodes () { for (RelVaultNodeLink * link = s_nodes.Head(); link; link = s_nodes.Next(link)) { if (bytesWritten >= kMaxBytesPerSaveUpdate) break; - if (link->node->GetDirtyFlags()) { - - // Auth server needs the name of the sdl record - if (link->node->GetNodeType() == plVault::kNodeType_SDL) - link->node->SetDirtyFlags(VaultSDLNode::kSDLName); - + if (link->node->IsDirty()) { if (unsigned bytes = NetCliAuthVaultNodeSave(link->node, nil, nil)) { bytesWritten += bytes; link->node->Print(L"Saving", LogDumpProc, 0); @@ -1428,12 +1408,12 @@ static bool IStrSqlEscape (const T src[], T * dst, unsigned dstChars) { } static void IGetStringFieldValue ( - const wchar_t * value, - wchar_t * dst, - size_t dstChars + const plString & value, + wchar_t * dst, + size_t dstChars ) { wchar_t * tmp = (wchar_t*)malloc(sizeof(wchar_t) * dstChars); - IStrSqlEscape(value, tmp, dstChars); + IStrSqlEscape(value.ToWchar().GetData(), tmp, dstChars); swprintf(dst, dstChars, L"'%s'", tmp); free(tmp); } @@ -1875,18 +1855,18 @@ void VaultDeleteNode ( //============================================================================ void VaultPublishNode ( unsigned nodeId, - const wchar_t deviceName[] + const plString& deviceName ) { hsRef rvn; - + rvn = VaultAgeGetDeviceInbox(deviceName); if (!rvn) { - LogMsg(kLogDebug, L"Failed to find inbox for device %s, adding it on-the-fly", deviceName); + LogMsg(kLogDebug, L"Failed to find inbox for device %S, adding it on-the-fly", deviceName.c_str()); VaultAgeSetDeviceInboxAndWait(deviceName, DEFAULT_DEVICE_INBOX); rvn = VaultAgeGetDeviceInbox(deviceName); if (!rvn) { - LogMsg(kLogDebug, L"Failed to add inbox to device %s on-the-fly", deviceName); + LogMsg(kLogDebug, L"Failed to add inbox to device %S on-the-fly", deviceName.c_str()); return; } } @@ -1914,10 +1894,8 @@ void VaultCreateNode ( if (hsRef age = VaultGetAgeNode()) { VaultAgeNode access(age); - if (!(templateNode->GetFieldFlags() & NetVaultNode::kCreateAgeName)) - templateNode->SetCreateAgeName(access.GetAgeName()); - if (!(templateNode->GetFieldFlags() & NetVaultNode::kCreateAgeUuid)) - templateNode->SetCreateAgeUuid(access.GetAgeInstanceGuid()); + templateNode->SetCreateAgeName(access.GetAgeName()); + templateNode->SetCreateAgeUuid(access.GetAgeInstanceGuid()); } NetCliAuthVaultNodeCreate( @@ -2297,9 +2275,7 @@ bool VaultGetLinkToMyNeighborhood (plAgeLinkStruct * link) { templateNode->SetNodeType(plVault::kNodeType_AgeInfo); VaultAgeInfoNode ageInfo(templateNode); - wchar_t str[MAX_PATH]; - StrToUnicode(str, kNeighborhoodAgeFilename, arrsize(str)); - ageInfo.SetAgeFilename(str); + ageInfo.SetAgeFilename(kNeighborhoodAgeFilename); hsRef node; if (node = rvnFldr->GetChildNode(templateNode, 2)) { @@ -2320,9 +2296,7 @@ bool VaultGetLinkToMyPersonalAge (plAgeLinkStruct * link) { templateNode->SetNodeType(plVault::kNodeType_AgeInfo); VaultAgeInfoNode ageInfo(templateNode); - wchar_t str[MAX_PATH]; - StrToUnicode(str, kPersonalAgeFilename, arrsize(str)); - ageInfo.SetAgeFilename(str); + ageInfo.SetAgeFilename(kPersonalAgeFilename); hsRef node; if (node = rvnFldr->GetChildNode(templateNode, 2)) { @@ -2343,9 +2317,7 @@ bool VaultGetLinkToCity (plAgeLinkStruct * link) { templateNode->SetNodeType(plVault::kNodeType_AgeInfo); VaultAgeInfoNode ageInfo(templateNode); - wchar_t str[MAX_PATH]; - StrToUnicode(str, kCityAgeFilename, arrsize(str)); - ageInfo.SetAgeFilename(str); + ageInfo.SetAgeFilename(kCityAgeFilename); hsRef node; if (node = rvnFldr->GetChildNode(templateNode, 2)) { @@ -2368,16 +2340,14 @@ hsRef VaultGetOwnedAgeLink (const plAgeInfoStruct * info) { VaultAgeInfoNode ageInfo(templateNode); if (info->HasAgeFilename()) { - wchar_t str[MAX_PATH]; - StrToUnicode(str, info->GetAgeFilename(), arrsize(str)); - ageInfo.SetAgeFilename(str); + ageInfo.SetAgeFilename(info->GetAgeFilename()); } if (info->HasAgeInstanceGuid()) { ageInfo.SetAgeInstanceGuid(*info->GetAgeInstanceGuid()); } if (hsRef rvnInfo = rvnFldr->GetChildNode(templateNode, 2)) { - templateNode->ClearFieldFlags(); + templateNode->Clear(); templateNode->SetNodeType(plVault::kNodeType_AgeLink); rvnLink = rvnInfo->GetParentNode(templateNode, 1); } @@ -2390,7 +2360,6 @@ hsRef VaultGetOwnedAgeLink (const plAgeInfoStruct * info) { hsRef VaultGetOwnedAgeInfo (const plAgeInfoStruct * info) { hsRef rvnInfo; - if (hsRef rvnFldr = VaultGetAgesIOwnFolder()) { hsRef templateNode = new NetVaultNode; @@ -2398,9 +2367,7 @@ hsRef VaultGetOwnedAgeInfo (const plAgeInfoStruct * info) { VaultAgeInfoNode ageInfo(templateNode); if (info->HasAgeFilename()) { - wchar_t str[MAX_PATH]; - StrToUnicode(str, info->GetAgeFilename(), arrsize(str)); - ageInfo.SetAgeFilename(str); + ageInfo.SetAgeFilename(info->GetAgeFilename()); } if (info->HasAgeInstanceGuid()) { ageInfo.SetAgeInstanceGuid(*info->GetAgeInstanceGuid()); @@ -2408,7 +2375,6 @@ hsRef VaultGetOwnedAgeInfo (const plAgeInfoStruct * info) { rvnInfo = rvnFldr->GetChildNode(templateNode, 2); } - return rvnInfo; } @@ -2488,16 +2454,14 @@ bool VaultSetAgePublicAndWait (NetVaultNode * ageInfoNode, bool publicOrNot) { NetCliAuthSetAgePublic(ageInfoNode->GetNodeId(), publicOrNot); VaultAgeInfoNode access(ageInfoNode); - char ageName[MAX_PATH]; - StrToAnsi(ageName, access.GetAgeFilename(), arrsize(ageName)); - + plVaultNotifyMsg * msg = new plVaultNotifyMsg; if (publicOrNot) msg->SetType(plVaultNotifyMsg::kPublicAgeCreated); else msg->SetType(plVaultNotifyMsg::kPublicAgeRemoved); msg->SetResultCode(true); - msg->GetArgs()->AddString(plNetCommon::VaultTaskArgs::kAgeFilename, ageName); + msg->GetArgs()->AddString(plNetCommon::VaultTaskArgs::kAgeFilename, access.GetAgeFilename().c_str()); msg->Send(); return true; } @@ -2513,17 +2477,15 @@ hsRef VaultGetVisitAgeLink (const plAgeInfoStruct * info) { VaultAgeInfoNode ageInfo(templateNode); if (info->HasAgeFilename()) { - wchar_t str[MAX_PATH]; - StrToUnicode(str, info->GetAgeFilename(), arrsize(str)); - ageInfo.SetAgeFilename(str); + ageInfo.SetAgeFilename(info->GetAgeFilename()); } if (info->HasAgeInstanceGuid()) { ageInfo.SetAgeInstanceGuid(*info->GetAgeInstanceGuid()); } if (hsRef rvnInfo = rvnFldr->GetChildNode(templateNode, 2)) { - templateNode->ClearFieldFlags(); - templateNode->SetNodeType(plVault::kNodeType_AgeLink); + templateNode->Clear(); + templateNode->SetNodeType(plVault::kNodeType_AgeLink); rvnLink = rvnInfo->GetParentNode(templateNode, 1); } } @@ -2539,7 +2501,6 @@ bool VaultGetVisitAgeLink (const plAgeInfoStruct * info, class plAgeLinkStruct * VaultAgeLinkNode ageLink(rvn); ageLink.CopyTo(link); - return true; } @@ -3365,7 +3326,7 @@ bool VaultUnregisterVisitAgeAndWait (const plAgeInfoStruct * info) { } //============================================================================ -hsRef VaultFindChronicleEntry (const wchar_t entryName[], int entryType) { +hsRef VaultFindChronicleEntry (const plString& entryName, int entryType) { hsRef result; if (hsRef rvnFldr = GetChildFolderNode(GetPlayerNode(), plVault::kChronicleFolder, 1)) { @@ -3382,7 +3343,7 @@ hsRef VaultFindChronicleEntry (const wchar_t entryName[], int entr } //============================================================================ -bool VaultHasChronicleEntry (const wchar_t entryName[], int entryType) { +bool VaultHasChronicleEntry (const plString& entryName, int entryType) { if (VaultFindChronicleEntry(entryName, entryType)) return true; return false; @@ -3390,9 +3351,9 @@ bool VaultHasChronicleEntry (const wchar_t entryName[], int entryType) { //============================================================================ void VaultAddChronicleEntryAndWait ( - const wchar_t entryName[], - int entryType, - const wchar_t entryValue[] + const plString& entryName, + int entryType, + const plString& entryValue ) { if (hsRef rvnChrn = VaultFindChronicleEntry(entryName, entryType)) { VaultChronicleNode chrnNode(rvnChrn); @@ -3526,7 +3487,7 @@ bool VaultAmOwnerOfCurrentAge () { VaultAgeInfoNode curAgeInfo(currentAgeInfoNode); plAgeInfoStruct info; - info.SetAgeFilename(plString::FromWchar(curAgeInfo.GetAgeFilename())); + info.SetAgeFilename(curAgeInfo.GetAgeFilename()); if (hsRef rvnLink = VaultGetOwnedAgeLink(&info)) { @@ -3778,13 +3739,11 @@ hsRef VaultFindAgeSubAgeLink (const plAgeInfoStruct * info) { templateNode->SetNodeType(plVault::kNodeType_AgeInfo); VaultAgeInfoNode ageInfo(templateNode); - wchar_t str[MAX_PATH]; - StrToUnicode(str, info->GetAgeFilename(), arrsize(str)); - ageInfo.SetAgeFilename(str); + ageInfo.SetAgeFilename(info->GetAgeFilename()); if (hsRef rvnInfo = rvnFldr->GetChildNode(templateNode, 2)) { - templateNode->ClearFieldFlags(); - templateNode->SetNodeType(plVault::kNodeType_AgeLink); + templateNode->Clear(); + templateNode->SetNodeType(plVault::kNodeType_AgeLink); rvnLink = rvnInfo->GetParentNode(templateNode, 1); } } @@ -3808,7 +3767,7 @@ void VaultAddAgeChronicleEntry ( } //============================================================================ -hsRef VaultAgeAddDeviceAndWait (const wchar_t deviceName[]) { +hsRef VaultAgeAddDeviceAndWait (const plString& deviceName) { if (hsRef existing = VaultAgeGetDevice(deviceName)) return existing; @@ -3836,7 +3795,7 @@ hsRef VaultAgeAddDeviceAndWait (const wchar_t deviceName[]) { } //============================================================================ -void VaultAgeRemoveDevice (const wchar_t deviceName[]) { +void VaultAgeRemoveDevice (const plString& deviceName) { if (hsRef folder = VaultGetAgeDevicesFolder()) { hsRef templateNode = new NetVaultNode; templateNode->SetNodeType(plVault::kNodeType_TextNote); @@ -3845,14 +3804,15 @@ void VaultAgeRemoveDevice (const wchar_t deviceName[]) { if (hsRef device = folder->GetChildNode(templateNode, 1)) { VaultRemoveChildNode(folder->GetNodeId(), device->GetNodeId(), nil, nil); - if (DeviceInbox * deviceInbox = s_ageDeviceInboxes.Find(CHashKeyStr(deviceName))) - delete device; + auto it = s_ageDeviceInboxes.find(deviceName); + if (it != s_ageDeviceInboxes.end()) + s_ageDeviceInboxes.erase(it); } } } //============================================================================ -bool VaultAgeHasDevice (const wchar_t deviceName[]) { +bool VaultAgeHasDevice (const plString& deviceName) { bool found = false; if (hsRef folder = VaultGetAgeDevicesFolder()) { hsRef templateNode = new NetVaultNode; @@ -3866,7 +3826,7 @@ bool VaultAgeHasDevice (const wchar_t deviceName[]) { } //============================================================================ -hsRef VaultAgeGetDevice (const wchar_t deviceName[]) { +hsRef VaultAgeGetDevice (const plString& deviceName) { hsRef result; if (hsRef folder = VaultGetAgeDevicesFolder()) { hsRef templateNode = new NetVaultNode; @@ -3880,24 +3840,17 @@ hsRef VaultAgeGetDevice (const wchar_t deviceName[]) { } //============================================================================ -hsRef VaultAgeSetDeviceInboxAndWait (const wchar_t deviceName[], const wchar_t inboxName[]) { - DeviceInbox * devInbox = s_ageDeviceInboxes.Find(CHashKeyStr(deviceName)); - if (devInbox) { - StrCopy(devInbox->inboxName, inboxName, arrsize(devInbox->inboxName)); - } - else { - devInbox = new DeviceInbox(deviceName, inboxName); - s_ageDeviceInboxes.Add(devInbox); - } +hsRef VaultAgeSetDeviceInboxAndWait (const plString& deviceName, const plString& inboxName) { + s_ageDeviceInboxes[deviceName] = inboxName; // if we found the inbox or its a global inbox then return here, otherwise if its the default inbox and // it wasn't found then continue on and create the inbox hsRef existing = VaultAgeGetDeviceInbox(deviceName); - if (existing || StrCmp(inboxName, DEFAULT_DEVICE_INBOX) != 0) + if (existing || inboxName == DEFAULT_DEVICE_INBOX) return existing; hsRef device, inbox; - + for (;;) { device = VaultAgeGetDevice(deviceName); if (!device) @@ -3911,7 +3864,7 @@ hsRef VaultAgeSetDeviceInboxAndWait (const wchar_t deviceName[], c VaultFolderNode access(inbox); access.SetFolderName(inboxName); access.SetFolderType(plVault::kDeviceInboxFolder); - + VaultAddChildNodeAndWait(device->GetNodeId(), inbox->GetNodeId(), 0); break; } @@ -3920,28 +3873,26 @@ hsRef VaultAgeSetDeviceInboxAndWait (const wchar_t deviceName[], c } //============================================================================ -hsRef VaultAgeGetDeviceInbox (const wchar_t deviceName[]) { +hsRef VaultAgeGetDeviceInbox (const plString& deviceName) { hsRef result; - DeviceInbox * devInbox = s_ageDeviceInboxes.Find(CHashKeyStr(deviceName)); + auto it = s_ageDeviceInboxes.find(deviceName); - if (devInbox) - { + if (it != s_ageDeviceInboxes.end()) { hsRef parentNode; const wchar_t * inboxName = nil; - if (StrCmp(devInbox->inboxName, DEFAULT_DEVICE_INBOX) == 0) { + //if (StrCmp(devInbox->inboxName, DEFAULT_DEVICE_INBOX) == 0) { + if (it->second == DEFAULT_DEVICE_INBOX) parentNode = VaultAgeGetDevice(deviceName); - } - else { + else parentNode = VaultGetGlobalInbox(); - } if (parentNode) { hsRef templateNode = new NetVaultNode; templateNode->SetNodeType(plVault::kNodeType_Folder); VaultFolderNode access(templateNode); access.SetFolderType(plVault::kDeviceInboxFolder); - access.SetFolderName(devInbox->inboxName); + access.SetFolderName(it->second); result = parentNode->GetChildNode(templateNode, 1); } } @@ -3950,9 +3901,7 @@ hsRef VaultAgeGetDeviceInbox (const wchar_t deviceName[]) { //============================================================================ void VaultClearDeviceInboxMap () { - while (DeviceInbox * inbox = s_ageDeviceInboxes.Head()) { - delete inbox; - } + s_ageDeviceInboxes.clear(); } //============================================================================ @@ -3998,13 +3947,11 @@ hsRef VaultGetSubAgeLink (const plAgeInfoStruct * info) { templateNode->SetNodeType(plVault::kNodeType_AgeInfo); VaultAgeInfoNode ageInfo(templateNode); - wchar_t str[MAX_PATH]; - StrToUnicode(str, info->GetAgeFilename(), arrsize(str)); - ageInfo.SetAgeFilename(str); + ageInfo.SetAgeFilename(info->GetAgeFilename()); if (hsRef rvnInfo = rvnFldr->GetChildNode(templateNode, 2)) { - templateNode->ClearFieldFlags(); - templateNode->SetNodeType(plVault::kNodeType_AgeLink); + templateNode->Clear(); + templateNode->SetNodeType(plVault::kNodeType_AgeLink); rvnLink = rvnInfo->GetParentNode(templateNode, 1); } } @@ -4438,13 +4385,11 @@ bool VaultAgeFindOrCreateChildAgeLinkAndWait ( templateNode->SetNodeType(plVault::kNodeType_AgeInfo); VaultAgeInfoNode ageInfo(templateNode); - wchar_t str[MAX_PATH]; - StrToUnicode(str, info->GetAgeFilename(), arrsize(str)); - ageInfo.SetAgeFilename(str); + ageInfo.SetAgeFilename(info->GetAgeFilename()); if (hsRef rvnInfo = rvnChildAges->GetChildNode(templateNode, 2)) { - templateNode->ClearFieldFlags(); - templateNode->SetNodeType(plVault::kNodeType_AgeLink); + templateNode->Clear(); + templateNode->SetNodeType(plVault::kNodeType_AgeLink); rvnLink = rvnInfo->GetParentNode(templateNode, 1); } @@ -4684,14 +4629,11 @@ uint8_t VaultAgeFindOrCreateChildAgeLink( // Still here? Try to find the Child Ages folder uint8_t retval = hsFail; if (hsRef rvnChildAges = rvnParentInfo->GetChildAgeInfoListNode(plVault::kChildAgesFolder, 1)) { - wchar_t hack[MAX_PATH]; - StrToUnicode(hack, info->GetAgeFilename(), arrsize(hack)); - // Search for our age hsRef temp = new NetVaultNode; temp->SetNodeType(plVault::kNodeType_AgeInfo); VaultAgeInfoNode theAge(temp); - theAge.SetAgeFilename(hack); + theAge.SetAgeFilename(info->GetAgeFilename()); if (hsRef rvnAgeInfo = rvnChildAges->GetChildNode(temp, 2)) { hsRef rvnAgeLink = rvnAgeInfo->GetParentAgeLink(); diff --git a/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.h b/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.h index c617a712..5ff236ec 100644 --- a/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.h +++ b/Sources/Plasma/PubUtilLib/plVault/plVaultClientApi.h @@ -246,7 +246,7 @@ void VaultDeleteNode ( ); void VaultPublishNode ( unsigned nodeId, - const wchar_t deviceName[] + const plString& deviceName ); void VaultSendNode ( RelVaultNode* srcNode, @@ -354,13 +354,13 @@ bool VaultRegisterVisitAgeAndWait(const plAgeLinkStruct * link); void VaultRegisterVisitAge(const plAgeLinkStruct* link); bool VaultUnregisterOwnedAgeAndWait(const plAgeInfoStruct * info); bool VaultUnregisterVisitAgeAndWait(const plAgeInfoStruct * info); -hsRef VaultFindChronicleEntry(const wchar_t entryName[], int entryType = -1); -bool VaultHasChronicleEntry(const wchar_t entryName[], int entryType = -1); +hsRef VaultFindChronicleEntry(const plString& entryName, int entryType = -1); +bool VaultHasChronicleEntry(const plString& entryName, int entryType = -1); // if entry of same name and type already exists, value is updated void VaultAddChronicleEntryAndWait ( - const wchar_t entryName[], - int entryType, - const wchar_t entryValue[] + const plString& entryName, + int entryType, + const plString& entryValue ); bool VaultAmIgnoringPlayer (unsigned playerId); unsigned VaultGetKILevel (); @@ -388,7 +388,7 @@ void VaultProcessPlayerInbox (); * ***/ -#define DEFAULT_DEVICE_INBOX L"DevInbox" +#define DEFAULT_DEVICE_INBOX "DevInbox" hsRef VaultGetAgeNode(); hsRef VaultGetAgeInfoNode(); @@ -410,12 +410,12 @@ void VaultAddAgeChronicleEntry ( int entryType, const wchar_t entryValue[] ); -hsRef VaultAgeAddDeviceAndWait(const wchar_t deviceName[]); // blocks until completion -void VaultAgeRemoveDevice (const wchar_t deviceName[]); -bool VaultAgeHasDevice (const wchar_t deviceName[]); -hsRef VaultAgeGetDevice(const wchar_t deviceName[]); -hsRef VaultAgeSetDeviceInboxAndWait(const wchar_t deviceName[], const wchar_t inboxName[]); // blocks until completion -hsRef VaultAgeGetDeviceInbox(const wchar_t deviceName[]); +hsRef VaultAgeAddDeviceAndWait(const plString& deviceName); // blocks until completion +void VaultAgeRemoveDevice (const plString& deviceName); +bool VaultAgeHasDevice (const plString& deviceName); +hsRef VaultAgeGetDevice(const plString& deviceName); +hsRef VaultAgeSetDeviceInboxAndWait(const plString& deviceName, const plString& inboxName); // blocks until completion +hsRef VaultAgeGetDeviceInbox(const plString& deviceName); void VaultClearDeviceInboxMap (); bool VaultAgeGetAgeSDL (class plStateDataRecord * out);