sceNp: add SCE_NP_ERROR_ID_NOT_FOUND for sceNpBasic*Entry* functions

This commit is contained in:
scribam 2018-12-02 19:40:42 +01:00 committed by Ivan
parent 7f3eaed435
commit 24a8d0aeef
1 changed files with 109 additions and 2 deletions

View File

@ -308,15 +308,33 @@ s32 sceNpBasicGetFriendListEntryCount(vm::ptr<u32> count)
{
sceNp.warning("sceNpBasicGetFriendListEntryCount(count=*0x%x)", count);
if (!count)
{
return SCE_NP_BASIC_ERROR_INVALID_ARGUMENT;
}
// TODO: Find the correct test which returns SCE_NP_ERROR_ID_NOT_FOUND
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
{
return SCE_NP_ERROR_ID_NOT_FOUND;
}
// TODO: Check if there are any friends
*count = 0;
return CELL_OK;
}
s32 sceNpBasicGetFriendListEntry()
s32 sceNpBasicGetFriendListEntry(u32 index, vm::ptr<SceNpId> npid)
{
UNIMPLEMENTED_FUNC(sceNp);
sceNp.todo("sceNpBasicGetFriendListEntry(index=%d, npid=*0x%x)", index, npid);
// TODO: Find the correct test which returns SCE_NP_ERROR_ID_NOT_FOUND
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
{
return SCE_NP_ERROR_ID_NOT_FOUND;
}
return CELL_OK;
}
@ -365,6 +383,12 @@ s32 sceNpBasicGetPlayersHistoryEntryCount(u32 options, vm::ptr<u32> count)
return SCE_NP_BASIC_ERROR_INVALID_ARGUMENT;
}
// TODO: Find the correct test which returns SCE_NP_ERROR_ID_NOT_FOUND
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
{
return SCE_NP_ERROR_ID_NOT_FOUND;
}
// TODO: Check if there are players histories
*count = 0;
@ -375,6 +399,12 @@ s32 sceNpBasicGetPlayersHistoryEntry(u32 options, u32 index, vm::ptr<SceNpId> np
{
sceNp.todo("sceNpBasicGetPlayersHistoryEntry(options=%d, index=%d, npid=*0x%x)", options, index, npid);
// TODO: Find the correct test which returns SCE_NP_ERROR_ID_NOT_FOUND
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
{
return SCE_NP_ERROR_ID_NOT_FOUND;
}
return CELL_OK;
}
@ -394,6 +424,12 @@ s32 sceNpBasicGetBlockListEntryCount(vm::ptr<u32> count)
return SCE_NP_BASIC_ERROR_INVALID_ARGUMENT;
}
// TODO: Find the correct test which returns SCE_NP_ERROR_ID_NOT_FOUND
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
{
return SCE_NP_ERROR_ID_NOT_FOUND;
}
// TODO: Check if there are block lists
*count = 0;
@ -404,6 +440,12 @@ s32 sceNpBasicGetBlockListEntry(u32 index, vm::ptr<SceNpId> npid)
{
sceNp.todo("sceNpBasicGetBlockListEntry(index=%d, npid=*0x%x)", index, npid);
// TODO: Find the correct test which returns SCE_NP_ERROR_ID_NOT_FOUND
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
{
return SCE_NP_ERROR_ID_NOT_FOUND;
}
return CELL_OK;
}
@ -416,6 +458,12 @@ s32 sceNpBasicGetMessageAttachmentEntryCount(vm::ptr<u32> count)
return SCE_NP_BASIC_ERROR_INVALID_ARGUMENT;
}
// TODO: Find the correct test which returns SCE_NP_ERROR_ID_NOT_FOUND
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
{
return SCE_NP_ERROR_ID_NOT_FOUND;
}
// TODO: Check if there are message attachments
*count = 0;
@ -426,6 +474,12 @@ s32 sceNpBasicGetMessageAttachmentEntry(u32 index, vm::ptr<SceNpUserInfo> from)
{
sceNp.todo("sceNpBasicGetMessageAttachmentEntry(index=%d, from=*0x%x)", index, from);
// TODO: Find the correct test which returns SCE_NP_ERROR_ID_NOT_FOUND
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
{
return SCE_NP_ERROR_ID_NOT_FOUND;
}
return CELL_OK;
}
@ -438,6 +492,12 @@ s32 sceNpBasicGetCustomInvitationEntryCount(vm::ptr<u32> count)
return SCE_NP_BASIC_ERROR_INVALID_ARGUMENT;
}
// TODO: Find the correct test which returns SCE_NP_ERROR_ID_NOT_FOUND
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
{
return SCE_NP_ERROR_ID_NOT_FOUND;
}
// TODO: Check if there are custom invitations
*count = 0;
@ -448,6 +508,12 @@ s32 sceNpBasicGetCustomInvitationEntry(u32 index, vm::ptr<SceNpUserInfo> from)
{
sceNp.todo("sceNpBasicGetCustomInvitationEntry(index=%d, from=*0x%x)", index, from);
// TODO: Find the correct test which returns SCE_NP_ERROR_ID_NOT_FOUND
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
{
return SCE_NP_ERROR_ID_NOT_FOUND;
}
return CELL_OK;
}
@ -460,6 +526,12 @@ s32 sceNpBasicGetMatchingInvitationEntryCount(vm::ptr<u32> count)
return SCE_NP_BASIC_ERROR_INVALID_ARGUMENT;
}
// TODO: Find the correct test which returns SCE_NP_ERROR_ID_NOT_FOUND
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
{
return SCE_NP_ERROR_ID_NOT_FOUND;
}
// TODO: Check if there are matching invitations
*count = 0;
@ -470,6 +542,12 @@ s32 sceNpBasicGetMatchingInvitationEntry(u32 index, vm::ptr<SceNpUserInfo> from)
{
sceNp.todo("sceNpBasicGetMatchingInvitationEntry(index=%d, from=*0x%x)", index, from);
// TODO: Find the correct test which returns SCE_NP_ERROR_ID_NOT_FOUND
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
{
return SCE_NP_ERROR_ID_NOT_FOUND;
}
return CELL_OK;
}
@ -482,6 +560,12 @@ s32 sceNpBasicGetClanMessageEntryCount(vm::ptr<u32> count)
return SCE_NP_BASIC_ERROR_INVALID_ARGUMENT;
}
// TODO: Find the correct test which returns SCE_NP_ERROR_ID_NOT_FOUND
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
{
return SCE_NP_ERROR_ID_NOT_FOUND;
}
// TODO: Check if there are clan messages
*count = 0;
@ -492,6 +576,12 @@ s32 sceNpBasicGetClanMessageEntry(u32 index, vm::ptr<SceNpUserInfo> from)
{
sceNp.todo("sceNpBasicGetClanMessageEntry(index=%d, from=*0x%x)", index, from);
// TODO: Find the correct test which returns SCE_NP_ERROR_ID_NOT_FOUND
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
{
return SCE_NP_ERROR_ID_NOT_FOUND;
}
return CELL_OK;
}
@ -499,6 +589,17 @@ s32 sceNpBasicGetMessageEntryCount(u32 type, vm::ptr<u32> count)
{
sceNp.warning("sceNpBasicGetMessageEntryCount(type=%d, count=*0x%x)", type, count);
if (!count)
{
return SCE_NP_BASIC_ERROR_INVALID_ARGUMENT;
}
// TODO: Find the correct test which returns SCE_NP_ERROR_ID_NOT_FOUND
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
{
return SCE_NP_ERROR_ID_NOT_FOUND;
}
// TODO: Check if there are messages
*count = 0;
@ -509,6 +610,12 @@ s32 sceNpBasicGetMessageEntry(u32 type, u32 index, vm::ptr<SceNpUserInfo> from)
{
sceNp.todo("sceNpBasicGetMessageEntry(type=%d, index=%d, from=*0x%x)", type, index, from);
// TODO: Find the correct test which returns SCE_NP_ERROR_ID_NOT_FOUND
if (g_psn_connection_status != SCE_NP_MANAGER_STATUS_ONLINE)
{
return SCE_NP_ERROR_ID_NOT_FOUND;
}
return CELL_OK;
}