mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 02:51:27 +00:00
Compare commits
1 Commits
statusmess
...
setpublic
Author | SHA1 | Date | |
---|---|---|---|
ce5719c83f |
@ -1250,24 +1250,20 @@ void StatusCallback(void *param)
|
|||||||
{
|
{
|
||||||
static char data[256] = {0};
|
static char data[256] = {0};
|
||||||
DWORD bytesRead;
|
DWORD bytesRead;
|
||||||
if(
|
WinHttpSendRequest(
|
||||||
WinHttpSendRequest(
|
hRequest,
|
||||||
hRequest,
|
WINHTTP_NO_ADDITIONAL_HEADERS,
|
||||||
WINHTTP_NO_ADDITIONAL_HEADERS,
|
0,
|
||||||
0,
|
WINHTTP_NO_REQUEST_DATA,
|
||||||
WINHTTP_NO_REQUEST_DATA,
|
0,
|
||||||
0,
|
0,
|
||||||
0,
|
0
|
||||||
0
|
);
|
||||||
)
|
WinHttpReceiveResponse(hRequest, 0);
|
||||||
&& WinHttpReceiveResponse(hRequest, 0)
|
WinHttpReadData(hRequest, data, 255, &bytesRead);
|
||||||
&& WinHttpReadData(hRequest, data, 255, &bytesRead)
|
data[bytesRead] = 0;
|
||||||
&& bytesRead
|
if(bytesRead)
|
||||||
)
|
|
||||||
{
|
|
||||||
data[bytesRead] = 0;
|
|
||||||
PostMessage(hwnd, WM_USER_SETSTATUSMSG, 0, (LPARAM) data);
|
PostMessage(hwnd, WM_USER_SETSTATUSMSG, 0, (LPARAM) data);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -664,6 +664,11 @@ bool pyVault::SetAgePublic( const pyAgeInfoStruct * ageInfo, bool makePublic )
|
|||||||
return VaultSetOwnedAgePublicAndWait(ageInfo->GetAgeInfo(), makePublic);
|
return VaultSetOwnedAgePublicAndWait(ageInfo->GetAgeInfo(), makePublic);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool pyVault::SetAgePublic( const pyVaultAgeInfoNode * ageInfoNode, bool makePublic )
|
||||||
|
{
|
||||||
|
return VaultSetAgePublicAndWait(ageInfoNode->GetNode(), makePublic);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
PyObject* pyVault::GetGlobalInbox( void )
|
PyObject* pyVault::GetGlobalInbox( void )
|
||||||
{
|
{
|
||||||
|
@ -176,6 +176,8 @@ public:
|
|||||||
void CreateNeighborhood();
|
void CreateNeighborhood();
|
||||||
// set an age's public status. will fail if you aren't czar of age.
|
// set an age's public status. will fail if you aren't czar of age.
|
||||||
bool SetAgePublic( const pyAgeInfoStruct * ageInfo, bool makePublic );
|
bool SetAgePublic( const pyAgeInfoStruct * ageInfo, bool makePublic );
|
||||||
|
// set an age's public status, also works for non-owners
|
||||||
|
bool SetAgePublic( const pyVaultAgeInfoNode * ageInfoNode, bool makePublic );
|
||||||
|
|
||||||
PyObject* GetGlobalInbox( void ); // returns pyVaultFolderNode
|
PyObject* GetGlobalInbox( void ); // returns pyVaultFolderNode
|
||||||
#ifdef GlobalInboxTestCode
|
#ifdef GlobalInboxTestCode
|
||||||
|
@ -43,6 +43,7 @@ You can contact Cyan Worlds, Inc. by email legal@cyan.com
|
|||||||
#include "pyEnum.h"
|
#include "pyEnum.h"
|
||||||
#include "pyAgeInfoStruct.h"
|
#include "pyAgeInfoStruct.h"
|
||||||
#include "pyVaultNode.h"
|
#include "pyVaultNode.h"
|
||||||
|
#include "pyVaultAgeInfoNode.h"
|
||||||
#include "pySDL.h"
|
#include "pySDL.h"
|
||||||
#include "pyAgeLinkStruct.h"
|
#include "pyAgeLinkStruct.h"
|
||||||
|
|
||||||
@ -451,16 +452,21 @@ PYTHON_METHOD_DEFINITION(ptVault, setAgePublic, args)
|
|||||||
char makePublic;
|
char makePublic;
|
||||||
if (!PyArg_ParseTuple(args, "Ob", &ageInfoObj, &makePublic))
|
if (!PyArg_ParseTuple(args, "Ob", &ageInfoObj, &makePublic))
|
||||||
{
|
{
|
||||||
PyErr_SetString(PyExc_TypeError, "setAgePublic expects a ptAgeInfoStruct and a boolean");
|
PyErr_SetString(PyExc_TypeError, "setAgePublic expects a ptAgeInfoStruct or ptVaultAgeInfoNode and a boolean");
|
||||||
PYTHON_RETURN_ERROR;
|
PYTHON_RETURN_ERROR;
|
||||||
}
|
}
|
||||||
if (!pyAgeInfoStruct::Check(ageInfoObj))
|
if (pyAgeInfoStruct::Check(ageInfoObj))
|
||||||
{
|
{
|
||||||
PyErr_SetString(PyExc_TypeError, "setAgePublic expects a ptAgeInfoStruct and a boolean");
|
pyAgeInfoStruct* ageInfo = pyAgeInfoStruct::ConvertFrom(ageInfoObj);
|
||||||
PYTHON_RETURN_ERROR;
|
PYTHON_RETURN_BOOL(self->fThis->SetAgePublic(ageInfo, makePublic != 0));
|
||||||
}
|
}
|
||||||
pyAgeInfoStruct* ageInfo = pyAgeInfoStruct::ConvertFrom(ageInfoObj);
|
else if (pyVaultAgeInfoNode::Check(ageInfoObj))
|
||||||
PYTHON_RETURN_BOOL(self->fThis->SetAgePublic(ageInfo, makePublic != 0));
|
{
|
||||||
|
pyVaultAgeInfoNode* ageInfoNode = pyVaultAgeInfoNode::ConvertFrom(ageInfoObj);
|
||||||
|
PYTHON_RETURN_BOOL(self->fThis->SetAgePublic(ageInfoNode, makePublic != 0));
|
||||||
|
}
|
||||||
|
PyErr_SetString(PyExc_TypeError, "setAgePublic expects a ptAgeInfoStruct or ptVaultAgeInfoNode and a boolean");
|
||||||
|
PYTHON_RETURN_ERROR;
|
||||||
}
|
}
|
||||||
|
|
||||||
PYTHON_START_METHODS_TABLE(ptVault)
|
PYTHON_START_METHODS_TABLE(ptVault)
|
||||||
|
@ -2476,21 +2476,7 @@ bool VaultAddOwnedAgeSpawnPoint (const Uuid & ageInstId, const plSpawnPointInfo
|
|||||||
bool VaultSetOwnedAgePublicAndWait (const plAgeInfoStruct * info, bool publicOrNot) {
|
bool VaultSetOwnedAgePublicAndWait (const plAgeInfoStruct * info, bool publicOrNot) {
|
||||||
if (RelVaultNode * rvnLink = VaultGetOwnedAgeLinkIncRef(info)) {
|
if (RelVaultNode * rvnLink = VaultGetOwnedAgeLinkIncRef(info)) {
|
||||||
if (RelVaultNode * rvnInfo = rvnLink->GetChildNodeIncRef(plVault::kNodeType_AgeInfo, 1)) {
|
if (RelVaultNode * rvnInfo = rvnLink->GetChildNodeIncRef(plVault::kNodeType_AgeInfo, 1)) {
|
||||||
NetCliAuthSetAgePublic(rvnInfo->nodeId, publicOrNot);
|
VaultSetAgePublicAndWait(rvnInfo, publicOrNot);
|
||||||
|
|
||||||
VaultAgeInfoNode access(rvnInfo);
|
|
||||||
char ageName[MAX_PATH];
|
|
||||||
StrToAnsi(ageName, access.ageFilename, arrsize(ageName));
|
|
||||||
|
|
||||||
plVaultNotifyMsg * msg = NEWZERO(plVaultNotifyMsg);
|
|
||||||
if (publicOrNot)
|
|
||||||
msg->SetType(plVaultNotifyMsg::kPublicAgeCreated);
|
|
||||||
else
|
|
||||||
msg->SetType(plVaultNotifyMsg::kPublicAgeRemoved);
|
|
||||||
msg->SetResultCode(true);
|
|
||||||
msg->GetArgs()->AddString(plNetCommon::VaultTaskArgs::kAgeFilename, ageName);
|
|
||||||
msg->Send();
|
|
||||||
|
|
||||||
rvnInfo->DecRef();
|
rvnInfo->DecRef();
|
||||||
}
|
}
|
||||||
rvnLink->DecRef();
|
rvnLink->DecRef();
|
||||||
@ -2498,6 +2484,25 @@ bool VaultSetOwnedAgePublicAndWait (const plAgeInfoStruct * info, bool publicOrN
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//============================================================================
|
||||||
|
bool VaultSetAgePublicAndWait (NetVaultNode * ageInfoNode, bool publicOrNot) {
|
||||||
|
NetCliAuthSetAgePublic(ageInfoNode->nodeId, publicOrNot);
|
||||||
|
|
||||||
|
VaultAgeInfoNode access(ageInfoNode);
|
||||||
|
char ageName[MAX_PATH];
|
||||||
|
StrToAnsi(ageName, access.ageFilename, arrsize(ageName));
|
||||||
|
|
||||||
|
plVaultNotifyMsg * msg = NEWZERO(plVaultNotifyMsg);
|
||||||
|
if (publicOrNot)
|
||||||
|
msg->SetType(plVaultNotifyMsg::kPublicAgeCreated);
|
||||||
|
else
|
||||||
|
msg->SetType(plVaultNotifyMsg::kPublicAgeRemoved);
|
||||||
|
msg->SetResultCode(true);
|
||||||
|
msg->GetArgs()->AddString(plNetCommon::VaultTaskArgs::kAgeFilename, ageName);
|
||||||
|
msg->Send();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
//============================================================================
|
//============================================================================
|
||||||
RelVaultNode * VaultGetVisitAgeLinkIncRef (const plAgeInfoStruct * info) {
|
RelVaultNode * VaultGetVisitAgeLinkIncRef (const plAgeInfoStruct * info) {
|
||||||
RelVaultNode * rvnLink = nil;
|
RelVaultNode * rvnLink = nil;
|
||||||
|
@ -345,6 +345,7 @@ RelVaultNode * VaultGetOwnedAgeInfoIncRef (const plAgeInfoStruct * info);
|
|||||||
bool VaultGetOwnedAgeLink (const plAgeInfoStruct * info, plAgeLinkStruct * link);
|
bool VaultGetOwnedAgeLink (const plAgeInfoStruct * info, plAgeLinkStruct * link);
|
||||||
bool VaultAddOwnedAgeSpawnPoint (const Uuid & ageInstId, const plSpawnPointInfo & spawnPt);
|
bool VaultAddOwnedAgeSpawnPoint (const Uuid & ageInstId, const plSpawnPointInfo & spawnPt);
|
||||||
bool VaultSetOwnedAgePublicAndWait (const plAgeInfoStruct * info, bool publicOrNot);
|
bool VaultSetOwnedAgePublicAndWait (const plAgeInfoStruct * info, bool publicOrNot);
|
||||||
|
bool VaultSetAgePublicAndWait (NetVaultNode * ageInfoNode, bool publicOrNot);
|
||||||
RelVaultNode * VaultGetVisitAgeLinkIncRef (const plAgeInfoStruct * info);
|
RelVaultNode * VaultGetVisitAgeLinkIncRef (const plAgeInfoStruct * info);
|
||||||
bool VaultGetVisitAgeLink (const plAgeInfoStruct * info, class plAgeLinkStruct * link);
|
bool VaultGetVisitAgeLink (const plAgeInfoStruct * info, class plAgeLinkStruct * link);
|
||||||
bool VaultRegisterOwnedAgeAndWait (const plAgeLinkStruct * link);
|
bool VaultRegisterOwnedAgeAndWait (const plAgeLinkStruct * link);
|
||||||
|
Reference in New Issue
Block a user