1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-18 19:29:09 +00:00

Replace Uuid with plUUID EVERYWHERE.

This commit is contained in:
Darryl Pogue
2012-12-29 02:05:23 -08:00
parent a0641ba66b
commit bcf6e97d23
78 changed files with 427 additions and 892 deletions

View File

@ -552,7 +552,7 @@ static void ChangedVaultNodeFetched (
//============================================================================
static void VaultNodeChanged (
unsigned nodeId,
const Uuid & revisionId
const plUUID& revisionId
) {
LogMsg(kLogDebug, L"Notify: Node changed: %u", nodeId);
@ -2115,7 +2115,7 @@ void VaultFetchNodesAndWait (
//============================================================================
void VaultInitAge (
const plAgeInfoStruct * info,
const Uuid & parentAgeInstId, // optional
const plUUID parentAgeInstId, // optional
FVaultInitAgeCallback callback,
void * state,
void * param
@ -2136,7 +2136,7 @@ void VaultInitAge (
StrToUnicode(ageDesc, info->GetAgeDescription(), arrsize(ageDesc));
NetCliAuthVaultInitAge(
(Uuid)*info->GetAgeInstanceGuid(),
*info->GetAgeInstanceGuid(),
parentAgeInstId,
ageFilename,
ageInstName,
@ -2418,7 +2418,7 @@ bool VaultFindOrCreateChildAgeLinkAndWait (const wchar_t ownedAgeName[], const p
}
//============================================================================
bool VaultAddOwnedAgeSpawnPoint (const Uuid & ageInstId, const plSpawnPointInfo & spawnPt) {
bool VaultAddOwnedAgeSpawnPoint (const plUUID& ageInstId, const plSpawnPointInfo & spawnPt) {
RelVaultNode * fldr = nil;
RelVaultNode * link = nil;
@ -2638,7 +2638,7 @@ bool VaultRegisterOwnedAgeAndWait (const plAgeLinkStruct * link) {
VaultInitAge(
link->GetAgeInfo(),
kNilGuid,
kNilUuid,
_InitAgeCallback,
nil,
&param
@ -2909,7 +2909,7 @@ void VaultRegisterOwnedAge(const plAgeLinkStruct* link) {
// Let's go async, my friend :)
VaultInitAge(link->GetAgeInfo(),
kNilGuid,
kNilUuid,
(FVaultInitAgeCallback)_InitAgeCallback,
nil,
new plSpawnPointInfo(link->SpawnPoint()));
@ -3012,7 +3012,7 @@ bool VaultRegisterVisitAgeAndWait (const plAgeLinkStruct * link) {
VaultInitAge(
link->GetAgeInfo(),
kNilGuid,
kNilUuid,
_InitAgeCallback,
nil,
&param
@ -3271,7 +3271,7 @@ void VaultRegisterVisitAge(const plAgeLinkStruct* link) {
// This doesn't actually *create* a new age but rather fetches the
// already existing age vault. Weird? Yes...
VaultInitAge(link->GetAgeInfo(),
kNilGuid,
kNilUuid,
(FVaultInitAgeCallback)_InitAgeCallback,
nil,
p
@ -3632,13 +3632,13 @@ bool VaultAmCzarOfCurrentAge () {
}
//============================================================================
bool VaultAmOwnerOfAge (const Uuid & ageInstId) {
bool VaultAmOwnerOfAge (const plUUID& ageInstId) {
hsAssert(false, "eric, implement me");
return true;
}
//============================================================================
bool VaultAmCzarOfAge (const Uuid & ageInstId) {
bool VaultAmCzarOfAge (const plUUID& ageInstId) {
// hsAssert(false, "eric, implement me");
return false;
}
@ -4249,7 +4249,7 @@ static void _AddChildNodeCallback (
bool VaultAgeFindOrCreateSubAgeLinkAndWait (
const plAgeInfoStruct * info,
plAgeLinkStruct * link,
const Uuid & parentAgeInstId
const plUUID& parentAgeInstId
) {
if (RelVaultNode * rvnLink = VaultFindAgeSubAgeLinkIncRef(info)) {
VaultAgeLinkNode linkAcc(rvnLink);
@ -4464,7 +4464,7 @@ namespace _VaultCreateSubAge {
}
}; // namespace _VaultCreateSubAge
bool VaultAgeFindOrCreateSubAgeLink(const plAgeInfoStruct* info, plAgeLinkStruct* link, const Uuid& parentUuid) {
bool VaultAgeFindOrCreateSubAgeLink(const plAgeInfoStruct* info, plAgeLinkStruct* link, const plUUID& parentUuid) {
using namespace _VaultCreateSubAge;
// First, try to find an already existing subage
@ -4633,8 +4633,7 @@ bool VaultAgeFindOrCreateChildAgeLinkAndWait (
_InitAgeParam param;
memset(&param, 0, sizeof(param));
Uuid parentAgeInstId;
memset(&parentAgeInstId, 0, sizeof(parentAgeInstId));
plUUID parentAgeInstId;
if (RelVaultNode * rvnAge = VaultGetAgeNodeIncRef()) {
VaultAgeNode access(rvnAge);
parentAgeInstId = access.ageInstUuid;

View File

@ -60,6 +60,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
***/
struct RelVaultNode;
class plUUID;
struct VaultCallback {
struct IVaultCallback * internal;
@ -316,7 +317,7 @@ typedef void (*FVaultInitAgeCallback)(
);
void VaultInitAge (
const class plAgeInfoStruct * info,
const Uuid & parentAgeInstId,
const plUUID parentAgeInstId,
FVaultInitAgeCallback callback,
void * state,
void * param
@ -343,7 +344,7 @@ RelVaultNode * VaultGetPlayerInboxFolderIncRef ();
RelVaultNode * VaultGetOwnedAgeLinkIncRef (const plAgeInfoStruct * info);
RelVaultNode * VaultGetOwnedAgeInfoIncRef (const plAgeInfoStruct * info);
bool VaultGetOwnedAgeLink (const plAgeInfoStruct * info, plAgeLinkStruct * link);
bool VaultAddOwnedAgeSpawnPoint (const Uuid & ageInstId, const plSpawnPointInfo & spawnPt);
bool VaultAddOwnedAgeSpawnPoint (const plUUID& ageInstId, const plSpawnPointInfo & spawnPt);
bool VaultSetOwnedAgePublicAndWait (const plAgeInfoStruct * info, bool publicOrNot);
RelVaultNode * VaultGetVisitAgeLinkIncRef (const plAgeInfoStruct * info);
bool VaultGetVisitAgeLink (const plAgeInfoStruct * info, class plAgeLinkStruct * link);
@ -372,8 +373,8 @@ bool VaultAmInMyPersonalAge ();
bool VaultAmInMyNeighborhoodAge ();
bool VaultAmOwnerOfCurrentAge ();
bool VaultAmCzarOfCurrentAge ();
bool VaultAmOwnerOfAge (const Uuid & ageInstId);
bool VaultAmCzarOfAge (const Uuid & ageInstId);
bool VaultAmOwnerOfAge (const plUUID& ageInstId);
bool VaultAmCzarOfAge (const plUUID& ageInstId);
bool VaultRegisterMTStationAndWait (
const wchar_t stationName[],
const wchar_t linkBackSpawnPtObjName[]
@ -430,9 +431,9 @@ bool VaultAgeGetSubAgeLink (
bool VaultAgeFindOrCreateSubAgeLinkAndWait (
const plAgeInfoStruct * info,
plAgeLinkStruct * link,
const Uuid & parentAgeInstId
const plUUID& parentAgeInstId
);
bool VaultAgeFindOrCreateSubAgeLink(const plAgeInfoStruct* info, plAgeLinkStruct* link, const Uuid& parentUuid);
bool VaultAgeFindOrCreateSubAgeLink(const plAgeInfoStruct* info, plAgeLinkStruct* link, const plUUID& arentUuid);
bool VaultAgeFindOrCreateChildAgeLinkAndWait (
const wchar_t parentAgeName[], // nil --> current age, non-nil --> owned age by given name
const plAgeInfoStruct * info,

View File

@ -132,12 +132,12 @@ void VaultPlayerNode::SetOnlineTime (unsigned v) {
}
//============================================================================
void VaultPlayerNode::SetAccountUuid (const Uuid & v) {
void VaultPlayerNode::SetAccountUuid (const plUUID& v) {
IVaultNodeSetValue(kAccountUuid, base, &accountUuid, v);
}
//============================================================================
void VaultPlayerNode::SetInviteUuid (const Uuid & v) {
void VaultPlayerNode::SetInviteUuid (const plUUID& v) {
IVaultNodeSetValue(kInviteUuid, base, &inviteUuid, v);
}
@ -181,7 +181,7 @@ void VaultPlayerInfoNode::SetAgeInstName (const wchar_t v[]) {
}
//============================================================================
void VaultPlayerInfoNode::SetAgeInstUuid (const Uuid & v) {
void VaultPlayerInfoNode::SetAgeInstUuid (const plUUID& v) {
IVaultNodeSetValue(kAgeInstUuid, base, &ageInstUuid, v);
}
@ -369,7 +369,7 @@ void VaultTextNoteNode::SetVisitInfo (const plAgeInfoStruct & info) {
break;
case kAgeInstGuid: {
plUUID guid = (plUUID)*info.GetAgeInstanceGuid();
plUUID guid = *info.GetAgeInstanceGuid();
wchar_t src[64];
wcsncpy(src, guid.AsString().ToWchar(), 64);
unsigned len = StrLen(src);
@ -464,9 +464,7 @@ bool VaultTextNoteNode::GetVisitInfo (plAgeInfoStruct * info) {
case kAgeInstGuid: {
StrTokenize(&str, token, arrsize(token), L"|", 1);
if (StrLen(token) > 0) {
Uuid guid;
GuidFromString(token, &guid);
plUUID uuid(guid);
plUUID uuid(plString::FromWchar(token));
info->SetAgeInstanceGuid(&uuid);
}
}
@ -859,12 +857,12 @@ VaultAgeNode::VaultAgeNode (NetVaultNode * node)
}
//============================================================================
void VaultAgeNode::SetAgeInstGuid (const Uuid & v) {
void VaultAgeNode::SetAgeInstGuid (const plUUID& v) {
IVaultNodeSetValue(kAgeInstanceGuid, base, &ageInstUuid, v);
}
//============================================================================
void VaultAgeNode::SetParentAgeInstGuid (const Uuid & v) {
void VaultAgeNode::SetParentAgeInstGuid (const plUUID& v) {
IVaultNodeSetValue(kParentAgeInstanceGuid, base, &parentAgeInstUuid, v);
}
@ -914,12 +912,12 @@ void VaultAgeInfoNode::SetAgeUserDefinedName (const wchar_t v[]) {
}
//============================================================================
void VaultAgeInfoNode::SetAgeInstGuid (const Uuid & v) {
void VaultAgeInfoNode::SetAgeInstGuid (const plUUID& v) {
IVaultNodeSetValue(kAgeInstanceGuid, base, &ageInstUuid, v);
}
//============================================================================
void VaultAgeInfoNode::SetParentAgeInstGuid (const Uuid & v) {
void VaultAgeInfoNode::SetParentAgeInstGuid (const plUUID& v) {
IVaultNodeSetValue(kParentAgeInstanceGuid, base, &parentAgeInstUuid, v);
}
@ -1012,7 +1010,7 @@ void VaultAgeInfoNode::CopyFrom (const plAgeInfoStruct * info) {
SetAgeSequenceNumber(info->GetAgeSequenceNumber());
// age instance guid
SetAgeInstGuid((Uuid)*info->GetAgeInstanceGuid());
SetAgeInstGuid(*info->GetAgeInstanceGuid());
// age language
SetAgeLanguage(info->GetAgeLanguage());
@ -1091,6 +1089,6 @@ void VaultMarkerGameNode::SetGameName (const wchar_t v[]) {
}
//============================================================================
void VaultMarkerGameNode::SetGameGuid (const Uuid & v) {
void VaultMarkerGameNode::SetGameGuid (const plUUID& v) {
IVaultNodeSetValue(kGameGuid, base, &gameGuid, v);
}

View File

@ -101,8 +101,8 @@ struct VaultPlayerNode : NetVaultNodeAccess {
wchar_t *& avatarShapeName;
int & disabled;
unsigned & onlineTime;
Uuid & accountUuid;
Uuid & inviteUuid;
plUUID& accountUuid;
plUUID& inviteUuid;
int & explorer;
VaultPlayerNode (NetVaultNode * node);
@ -114,8 +114,8 @@ struct VaultPlayerNode : NetVaultNodeAccess {
void SetAvatarShapeName (const wchar_t v[]);
void SetDisabled (int v);
void SetOnlineTime (unsigned v);
void SetAccountUuid (const Uuid & v);
void SetInviteUuid (const Uuid & v);
void SetAccountUuid (const plUUID& v);
void SetInviteUuid (const plUUID& v);
void SetExplorer (int v);
};
@ -136,7 +136,7 @@ struct VaultPlayerInfoNode : NetVaultNodeAccess {
unsigned & playerId;
wchar_t *& playerName;
wchar_t *& ageInstName;
Uuid & ageInstUuid;
plUUID& ageInstUuid;
int & online;
int & ccrLevel;
@ -148,7 +148,7 @@ struct VaultPlayerInfoNode : NetVaultNodeAccess {
void SetPlayerId (unsigned v);
void SetPlayerName (const wchar_t v[]);
void SetAgeInstName (const wchar_t v[]);
void SetAgeInstUuid (const Uuid & v);
void SetAgeInstUuid (const plUUID& v);
void SetOnline (int v);
void SetCCRLevel (int v);
};
@ -362,16 +362,16 @@ struct VaultAgeNode : NetVaultNodeAccess {
static const uint64_t kParentAgeInstanceGuid = NetVaultNode::kUuid_2;
static const uint64_t kAgeName = NetVaultNode::kString64_1;
Uuid & ageInstUuid;
Uuid & parentAgeInstUuid;
plUUID& ageInstUuid;
plUUID& parentAgeInstUuid;
wchar_t *& ageName;
VaultAgeNode (NetVaultNode * node);
VaultAgeNode (const VaultAgeNode &); // not implemented
const VaultAgeNode & operator= (const VaultAgeNode &); // not implemented
void SetAgeInstGuid (const Uuid & v);
void SetParentAgeInstGuid (const Uuid & v);
void SetAgeInstGuid (const plUUID& v);
void SetParentAgeInstGuid (const plUUID& v);
void SetAgeName (const wchar_t v[]);
};
@ -396,8 +396,8 @@ struct VaultAgeInfoNode : NetVaultNodeAccess {
wchar_t *& ageFilename;
wchar_t *& ageInstName;
wchar_t *& ageUserDefinedName;
Uuid & ageInstUuid;
Uuid & parentAgeInstUuid;
plUUID& ageInstUuid;
plUUID& parentAgeInstUuid;
int & ageSequenceNumber;
int & ageIsPublic;
int & ageLanguage;
@ -413,8 +413,8 @@ struct VaultAgeInfoNode : NetVaultNodeAccess {
void SetAgeFilename (const wchar_t v[]);
void SetAgeInstName (const wchar_t v[]);
void SetAgeUserDefinedName (const wchar_t v[]);
void SetAgeInstGuid (const Uuid & v);
void SetParentAgeInstGuid (const Uuid & v);
void SetAgeInstGuid (const plUUID& v);
void SetParentAgeInstGuid (const plUUID& v);
void SetAgeSequenceNumber (int v);
void _SetAgeIsPublic (int v); // WARNING: Do not call this. The age will not be set public this way. Use NetCliAuthSetAgePublic instead (changes this field's value in the process).
void SetAgeLanguage (int v);
@ -456,12 +456,12 @@ struct VaultMarkerGameNode : NetVaultNodeAccess {
static const uint64_t kGameGuid = NetVaultNode::kUuid_1;
wchar_t *& gameName;
Uuid & gameGuid;
plUUID& gameGuid;
VaultMarkerGameNode (NetVaultNode * node);
VaultMarkerGameNode (const VaultMarkerGameNode &); // not implemented
const VaultMarkerGameNode & operator= (const VaultMarkerGameNode &); // not implemented
void SetGameName (const wchar_t v[]);
void SetGameGuid (const Uuid & v);
void SetGameGuid (const plUUID& v);
};