Browse Source

Implement pyVault::getAllPlayersFolder

Adam Johnson 12 years ago
parent
commit
3d6fb7e827
  1. 42
      Sources/Plasma/FeatureLib/pfPython/pyVault.cpp
  2. 28
      Sources/Plasma/FeatureLib/pfPython/pyVault.h
  3. 10
      Sources/Plasma/FeatureLib/pfPython/pyVaultGlue.cpp

42
Sources/Plasma/FeatureLib/pfPython/pyVault.cpp

@ -121,7 +121,7 @@ static PyObject * GetAgeInfoList (unsigned folderType) {
}
//////////////////////////////////////////////////
PyObject* pyVault::GetPlayerInfo( void )
PyObject* pyVault::GetPlayerInfo()
{
PyObject * result = nil;
if (RelVaultNode * rvnPlr = VaultGetPlayerNodeIncRef()) {
@ -140,7 +140,7 @@ PyObject* pyVault::GetPlayerInfo( void )
}
PyObject* pyVault::GetAvatarOutfitFolder( void )
PyObject* pyVault::GetAvatarOutfitFolder()
{
PyObject * result = GetFolder(plVault::kAvatarOutfitFolder);
@ -152,7 +152,7 @@ PyObject* pyVault::GetAvatarOutfitFolder( void )
PYTHON_RETURN_NONE;
}
PyObject* pyVault::GetAvatarClosetFolder( void )
PyObject* pyVault::GetAvatarClosetFolder()
{
PyObject * result = GetFolder(plVault::kAvatarClosetFolder);
@ -164,7 +164,7 @@ PyObject* pyVault::GetAvatarClosetFolder( void )
PYTHON_RETURN_NONE;
}
PyObject* pyVault::GetChronicleFolder( void )
PyObject* pyVault::GetChronicleFolder()
{
PyObject * result = GetFolder(plVault::kChronicleFolder);
@ -176,7 +176,7 @@ PyObject* pyVault::GetChronicleFolder( void )
PYTHON_RETURN_NONE;
}
PyObject* pyVault::GetInbox( void )
PyObject* pyVault::GetInbox()
{
PyObject * result = GetFolder(plVault::kInboxFolder);
@ -188,7 +188,7 @@ PyObject* pyVault::GetInbox( void )
PYTHON_RETURN_NONE;
}
PyObject* pyVault::GetAgeJournalsFolder( void )
PyObject* pyVault::GetAgeJournalsFolder()
{
PyObject * result = GetFolder(plVault::kAgeJournalsFolder);
@ -249,8 +249,18 @@ PyObject* pyVault::GetKIUsage(void)
return retVal;
}
PyObject* pyVault::GetAllPlayersFolder()
{
#ifndef PLASMA_EXTERNAL_RELEASE
PyObject* result = GetPlayerInfoList(plVault::kAllPlayersFolder);
if (result)
return result;
#endif
PyObject* pyVault::GetIgnoreListFolder( void )
PYTHON_RETURN_NONE;
}
PyObject* pyVault::GetIgnoreListFolder()
{
PyObject * result = GetPlayerInfoList(plVault::kIgnoreListFolder);
@ -262,7 +272,7 @@ PyObject* pyVault::GetIgnoreListFolder( void )
PYTHON_RETURN_NONE;
}
PyObject* pyVault::GetBuddyListFolder( void )
PyObject* pyVault::GetBuddyListFolder()
{
PyObject * result = GetPlayerInfoList(plVault::kBuddyListFolder);
@ -274,7 +284,7 @@ PyObject* pyVault::GetBuddyListFolder( void )
PYTHON_RETURN_NONE;
}
PyObject* pyVault::GetPeopleIKnowAboutFolder( void )
PyObject* pyVault::GetPeopleIKnowAboutFolder()
{
PyObject * result = GetPlayerInfoList(plVault::kPeopleIKnowAboutFolder);
@ -389,7 +399,7 @@ void pyVault::SendToDevice( pyVaultNode& node, const char * deviceName )
}
PyObject* pyVault::GetAgesICanVisitFolder(void)
PyObject* pyVault::GetAgesICanVisitFolder()
{
PyObject * result = GetAgeInfoList(plVault::kAgesICanVisitFolder);
@ -402,7 +412,7 @@ PyObject* pyVault::GetAgesICanVisitFolder(void)
}
PyObject* pyVault::GetAgesIOwnFolder(void)
PyObject* pyVault::GetAgesIOwnFolder()
{
PyObject * result = GetAgeInfoList(plVault::kAgesIOwnFolder);
@ -415,7 +425,7 @@ PyObject* pyVault::GetAgesIOwnFolder(void)
}
PyObject* pyVault::GetInviteFolder(void)
PyObject* pyVault::GetInviteFolder()
{
PyObject * result = GetFolder(plVault::kPlayerInviteFolder);
@ -506,12 +516,12 @@ void pyVault::UpdatePsnlAgeSDL( pySDLStateDataRecord & pyrec )
templateNode->DecRef();
}
bool pyVault::InMyPersonalAge( void ) const
bool pyVault::InMyPersonalAge() const
{
return VaultAmInMyPersonalAge();
}
bool pyVault::InMyNeighborhoodAge( void ) const
bool pyVault::InMyNeighborhoodAge() const
{
return VaultAmInMyNeighborhoodAge();
}
@ -684,7 +694,7 @@ bool pyVault::SetAgePublic( const pyAgeInfoStruct * ageInfo, bool makePublic )
}
PyObject* pyVault::GetGlobalInbox( void )
PyObject* pyVault::GetGlobalInbox()
{
PyObject * result = nil;
if (RelVaultNode * rvnGlobalInbox = VaultGetGlobalInboxIncRef()) {
@ -725,5 +735,3 @@ PyObject* pyVault::FindNode( pyVaultNode* templateNode ) const
PYTHON_RETURN_NONE;
}

28
Sources/Plasma/FeatureLib/pfPython/pyVault.h

@ -103,16 +103,17 @@ public:
#ifndef BUILDING_PYPLASMA
//////////////////////////////////////////////////
PyObject* GetPlayerInfo( void ); // returns pyVaultNode
PyObject* GetKIUsage(void);
PyObject* GetAvatarOutfitFolder( void ); // returns pyVaultFolderNode
PyObject* GetAvatarClosetFolder( void ); // returns pyVaultFolderNode
PyObject* GetInbox( void ); // returns pyVaultFolderNode
PyObject* GetChronicleFolder( void ); // returns pyVaultFolderNode
PyObject* GetAgeJournalsFolder( void ); // returns pyVaultFolderNode
PyObject* GetIgnoreListFolder( void ); // returns pyVaultPlayerInfoListNode
PyObject* GetBuddyListFolder( void ); // returns pyVaultPlayerInfoListNode
PyObject* GetPeopleIKnowAboutFolder( void ); // returns pyVaultPlayerInfoListNode
PyObject* GetPlayerInfo(); // returns pyVaultNode
PyObject* GetKIUsage();
PyObject* GetAvatarOutfitFolder(); // returns pyVaultFolderNode
PyObject* GetAvatarClosetFolder(); // returns pyVaultFolderNode
PyObject* GetInbox(); // returns pyVaultFolderNode
PyObject* GetChronicleFolder(); // returns pyVaultFolderNode
PyObject* GetAgeJournalsFolder(); // returns pyVaultFolderNode
PyObject* GetAllPlayersFolder();
PyObject* GetIgnoreListFolder(); // returns pyVaultPlayerInfoListNode
PyObject* GetBuddyListFolder(); // returns pyVaultPlayerInfoListNode
PyObject* GetPeopleIKnowAboutFolder(); // returns pyVaultPlayerInfoListNode
PyObject* GetAgesICanVisitFolder(); // returns pyVaultFolderNode
PyObject* GetAgesIOwnFolder(); // returns pyVaultFolderNode
PyObject* GetInviteFolder(); // returns pyVaultFolderNode
@ -139,9 +140,9 @@ public:
///////////////
// true if we are joined to our personal age.
bool InMyPersonalAge( void ) const;
bool InMyPersonalAge() const;
// true if we are joined to our neighborhood age.
bool InMyNeighborhoodAge( void ) const;
bool InMyNeighborhoodAge() const;
// true if we own the age we are in
bool AmOwnerOfCurrentAge() const;
// true if we are czar of the age we are in
@ -175,9 +176,6 @@ public:
bool SetAgePublic( const pyAgeInfoStruct * ageInfo, bool makePublic );
PyObject* GetGlobalInbox( void ); // returns pyVaultFolderNode
#ifdef GlobalInboxTestCode
void CreateGlobalInbox( void );
#endif
// find matching node
PyObject* FindNode( pyVaultNode* templateNode ) const; // returns pyVaultNode

10
Sources/Plasma/FeatureLib/pfPython/pyVaultGlue.cpp

@ -101,6 +101,11 @@ PYTHON_METHOD_DEFINITION_NOARGS(ptVault, getAgeJournalsFolder)
return self->fThis->GetAgeJournalsFolder();
}
PYTHON_METHOD_DEFINITION_NOARGS(ptVault, getAllPlayersFolder)
{
return self->fThis->GetAllPlayersFolder();
}
PYTHON_METHOD_DEFINITION_NOARGS(ptVault, getIgnoreListFolder)
{
return self->fThis->GetIgnoreListFolder();
@ -205,10 +210,6 @@ PYTHON_METHOD_DEFINITION_NOARGS(ptVault, getGlobalInbox)
return self->fThis->GetGlobalInbox();
}
#ifdef GlobalInboxTestCode
PYTHON_BASIC_METHOD_DEFINITION(ptVault, createGlobalInbox, CreateGlobalInbox)
#endif
PYTHON_METHOD_DEFINITION(ptVault, findNode, args)
{
PyObject* templateNodeObj = NULL;
@ -476,6 +477,7 @@ PYTHON_START_METHODS_TABLE(ptVault)
"Returns a ptVaultFolderNode of the avatars outfit in their closet."),
PYTHON_METHOD_NOARGS(ptVault, getChronicleFolder, "Returns a ptVaultFolderNode of the current player's chronicle folder."),
PYTHON_METHOD_NOARGS(ptVault, getAgeJournalsFolder, "Returns a ptVaultFolderNode of the current player's age journals folder."),
PYTHON_METHOD_NOARGS(ptVault, getAllPlayersFolder, "Returns a ptVaultPlayerInfoListNode of the all players folder."),
PYTHON_METHOD_NOARGS(ptVault, getIgnoreListFolder, "Returns a ptVaultPlayerInfoListNode of the current player's ignore list folder."),
PYTHON_METHOD_NOARGS(ptVault, getBuddyListFolder, "Returns a ptVaultPlayerInfoListNode of the current player's buddy list folder."),
PYTHON_METHOD_NOARGS(ptVault, getPeopleIKnowAboutFolder, "Returns a ptVaultPlayerInfoListNode of the current player's people I know about (Recent) list folder."),

Loading…
Cancel
Save