mirror of https://github.com/red-prig/fpPS4.git
SceNpWebApi + SceNpSignaling + SceNpScore functions (#182)
* sceNpWebApiRegisterExtdPushEventCallbackA * sceNpSignalingCreateContext * libSceNpScore functions * + --------- Co-authored-by: red-prig <vdpasha@mail.ru>
This commit is contained in:
parent
f8d9ad0f45
commit
4a540f2a02
|
@ -29,15 +29,15 @@ type
|
|||
|
||||
pSceNpOnlineId=^SceNpOnlineId;
|
||||
SceNpOnlineId=packed record
|
||||
data:array[0..SCE_NP_ONLINEID_MAX_LENGTH-1] of AnsiChar;
|
||||
term:AnsiChar;
|
||||
data :array[0..SCE_NP_ONLINEID_MAX_LENGTH-1] of AnsiChar;
|
||||
term :AnsiChar;
|
||||
dummy:array[0..2] of AnsiChar;
|
||||
end;
|
||||
|
||||
PSceNpId=^SceNpId;
|
||||
SceNpId=packed record
|
||||
handle:SceNpOnlineId;
|
||||
opt:array[0..7] of Byte;
|
||||
handle :SceNpOnlineId;
|
||||
opt :array[0..7] of Byte;
|
||||
reserved:array[0..7] of Byte;
|
||||
end;
|
||||
|
||||
|
|
|
@ -36,35 +36,35 @@ end;
|
|||
type
|
||||
pSceNpScoreRankData=^SceNpScoreRankData;
|
||||
SceNpScoreRankData=packed record
|
||||
npId:SceNpId;
|
||||
reserved:array[0..48] of Byte;
|
||||
pad0:array[0..2] of Byte;
|
||||
pcId:Integer;
|
||||
serialRank:DWORD;
|
||||
rank:DWORD;
|
||||
npId :SceNpId;
|
||||
reserved :array[0..48] of Byte;
|
||||
pad0 :array[0..2] of Byte;
|
||||
pcId :Integer;
|
||||
serialRank :DWORD;
|
||||
rank :DWORD;
|
||||
highestRank:DWORD;
|
||||
scoreValue:Int64;
|
||||
scoreValue :Int64;
|
||||
hasGameData:Integer;
|
||||
pad1:array[0..3] of Byte;
|
||||
recordDate:QWORD;
|
||||
pad1 :array[0..3] of Byte;
|
||||
recordDate :QWORD;
|
||||
end;
|
||||
|
||||
PSceNpScoreRankDataA=^SceNpScoreRankDataA;
|
||||
SceNpScoreRankDataA=packed record
|
||||
onlineId:SceNpOnlineId;
|
||||
reserved0:array[0..15] of Byte;
|
||||
reserved:array[0..48] of Byte;
|
||||
pad0:array[0..2] of Byte;
|
||||
pcId:Integer;
|
||||
serialRank:DWORD;
|
||||
rank:DWORD;
|
||||
onlineId :SceNpOnlineId;
|
||||
reserved0 :array[0..15] of Byte;
|
||||
reserved :array[0..48] of Byte;
|
||||
pad0 :array[0..2] of Byte;
|
||||
pcId :Integer;
|
||||
serialRank :DWORD;
|
||||
rank :DWORD;
|
||||
highestRank:DWORD;
|
||||
hasGameData:Integer;
|
||||
pad1:array[0..3] of Byte;
|
||||
scoreValue:Int64;
|
||||
recordDate:QWORD;
|
||||
accountId:QWORD;
|
||||
pad2:array[0..7] of Byte;
|
||||
pad1 :array[0..3] of Byte;
|
||||
scoreValue :Int64;
|
||||
recordDate :QWORD;
|
||||
accountId :QWORD;
|
||||
pad2 :array[0..7] of Byte;
|
||||
end;
|
||||
|
||||
const
|
||||
|
@ -89,11 +89,24 @@ type
|
|||
|
||||
PSceNpScoreGetFriendRankingOptParam=^SceNpScoreGetFriendRankingOptParam;
|
||||
SceNpScoreGetFriendRankingOptParam=packed record
|
||||
size:size_t;
|
||||
size :size_t;
|
||||
startSerialRank:PInteger;
|
||||
hits:PInteger;
|
||||
hits :PInteger;
|
||||
end;
|
||||
|
||||
pSceNpScoreBoardId=^SceNpScoreBoardId;
|
||||
SceNpScoreBoardId=DWORD;
|
||||
|
||||
pSceNpScorePlayerRankDataA=^SceNpScorePlayerRankDataA;
|
||||
SceNpScorePlayerRankDataA=packed record
|
||||
hasData :Integer;
|
||||
pad0 :array[0..3] of Byte;
|
||||
rankData:SceNpScoreRankDataA;
|
||||
end;
|
||||
|
||||
pSceNpScoreRankNumber=^SceNpScoreRankNumber;
|
||||
SceNpScoreRankNumber=DWORD;
|
||||
|
||||
function ps4_sceNpScoreGetFriendsRanking(
|
||||
reqId:Integer;
|
||||
boardId:DWORD;
|
||||
|
@ -213,7 +226,7 @@ function ps4_sceNpScoreRecordScore(
|
|||
score:Int64; //SceNpScoreValue
|
||||
scoreComment:pSceNpScoreComment;
|
||||
gameInfo:pSceNpScoreGameInfo;
|
||||
tmpRank:PDWORD; //SceNpScoreRankNumber
|
||||
tmpRank:pSceNpScoreRankNumber;
|
||||
compareDate:PQWORD; //SceRtcTick
|
||||
option:Pointer):Integer; SysV_ABI_CDecl;
|
||||
begin
|
||||
|
@ -230,7 +243,7 @@ function ps4_sceNpScoreRecordScoreAsync(
|
|||
score:Int64; //SceNpScoreValue
|
||||
scoreComment:pSceNpScoreComment;
|
||||
gameInfo:pSceNpScoreGameInfo;
|
||||
tmpRank:PDWORD; //SceNpScoreRankNumber
|
||||
tmpRank:pSceNpScoreRankNumber;
|
||||
compareDate:PQWORD; //SceRtcTick
|
||||
option:Pointer):Integer; SysV_ABI_CDecl;
|
||||
begin
|
||||
|
@ -252,6 +265,34 @@ begin
|
|||
Result:=0;
|
||||
end;
|
||||
|
||||
function ps4_sceNpScoreGetRankingByNpIdAsync():Integer; SysV_ABI_CDecl;
|
||||
begin
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
function ps4_sceNpScoreGetRankingByAccountId(reqId:Integer;
|
||||
boardId:SceNpScoreBoardId;
|
||||
const accountIdArray:SceNpAccountId;
|
||||
accountIdArraySize:QWORD;
|
||||
rankArray:pSceNpScorePlayerRankDataA;
|
||||
rankArraySize:QWORD;
|
||||
commentArray:pSceNpScoreComment;
|
||||
commentArraySize:QWORD;
|
||||
infoArray:pSceNpScoreGameInfo;
|
||||
infoArraySize:QWORD;
|
||||
arrayNum:QWORD;
|
||||
lastSortDate:PQWORD; //SceRtcTick
|
||||
totalRecord:pSceNpScoreRankNumber;
|
||||
option:Pointer):Integer; SysV_ABI_CDecl;
|
||||
begin
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
function ps4_sceNpScoreDeleteNpTitleCtx(titleCtxId:Integer):Integer; SysV_ABI_CDecl;
|
||||
begin
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
function Load_libSceNpScoreRanking(Const name:RawByteString):TElf_node;
|
||||
var
|
||||
lib:PLIBRARY;
|
||||
|
@ -270,6 +311,9 @@ begin
|
|||
lib^.set_proc($CD3D1706D82D3922,@ps4_sceNpScoreRecordScore);
|
||||
lib^.set_proc($00D26CB0FCF7998D,@ps4_sceNpScoreRecordScoreAsync);
|
||||
lib^.set_proc($9B50DF351B2D9124,@ps4_sceNpScorePollAsync);
|
||||
lib^.set_proc($45DDBB76A505655F,@ps4_sceNpScoreGetRankingByNpIdAsync);
|
||||
lib^.set_proc($2BDB653834D0C777,@ps4_sceNpScoreGetRankingByAccountId);
|
||||
lib^.set_proc($1B4A44F91342C1F9,@ps4_sceNpScoreDeleteNpTitleCtx);
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
|
|
@ -5,7 +5,20 @@ unit ps4_libSceNpSignaling;
|
|||
interface
|
||||
|
||||
uses
|
||||
ps4_program;
|
||||
ps4_program,
|
||||
ps4_libSceNpCommon;
|
||||
|
||||
const
|
||||
SCE_NP_SIGNALING_CONTEXT_MAX=8;
|
||||
|
||||
type
|
||||
SceNpSignalingHandler=procedure(
|
||||
ctxId :DWORD;
|
||||
subjectId:DWORD;
|
||||
event :Integer;
|
||||
errorCode:Integer;
|
||||
arg :Pointer
|
||||
); SysV_ABI_CDecl;
|
||||
|
||||
implementation
|
||||
|
||||
|
@ -17,6 +30,14 @@ begin
|
|||
Result:=0;
|
||||
end;
|
||||
|
||||
function ps4_sceNpSignalingCreateContext(npId:pSceNpId;
|
||||
handler:SceNpSignalingHandler;
|
||||
arg:Pointer;
|
||||
ctxId:PDWORD):Integer; SysV_ABI_CDecl;
|
||||
begin
|
||||
Result:=0;
|
||||
end;
|
||||
|
||||
function Load_libSceNpSignaling(Const name:RawByteString):TElf_node;
|
||||
var
|
||||
lib:PLIBRARY;
|
||||
|
@ -26,6 +47,7 @@ begin
|
|||
|
||||
lib:=Result._add_lib('libSceNpSignaling');
|
||||
lib^.set_proc($DCA3AE0B84666595,@ps4_sceNpSignalingInitialize);
|
||||
lib^.set_proc($E7262311D778B7C6,@ps4_sceNpSignalingCreateContext)
|
||||
end;
|
||||
|
||||
initialization
|
||||
|
|
|
@ -182,6 +182,30 @@ type
|
|||
extdDataKeyNum:size_t;
|
||||
end;
|
||||
|
||||
pSceNpWebApiExtdPushEventExtdData=^SceNpWebApiExtdPushEventExtdData;
|
||||
SceNpWebApiExtdPushEventExtdData=packed record
|
||||
extdDataKey:SceNpWebApiExtdPushEventExtdDataKey;
|
||||
pData :PChar;
|
||||
dataLen :QWORD;
|
||||
end;
|
||||
|
||||
SceNpWebApiExtdPushEventCallbackA=procedure(
|
||||
userCtxId :Integer;
|
||||
callbackId :Integer;
|
||||
pNpServiceName:PChar;
|
||||
npServiceLabel:SceNpServiceLabel;
|
||||
pTo :pSceNpPeerAddressA;
|
||||
pToOnlineId :pSceNpOnlineId;
|
||||
pFrom :pSceNpPeerAddressA;
|
||||
pFromOnlineId :SceNpOnlineId;
|
||||
pDataType :pSceNpWebApiPushEventDataType;
|
||||
pData :PChar;
|
||||
dataLen :QWORD;
|
||||
pExtdData :pSceNpWebApiExtdPushEventExtdData;
|
||||
extdDataNum :QWORD;
|
||||
pUserArg :Pointer
|
||||
); SysV_ABI_CDecl;
|
||||
|
||||
function ps4_sceNpWebApiCreatePushEventFilter(libCtxId:Integer;
|
||||
pDataType:pSceNpWebApiPushEventDataType;
|
||||
dataTypeNum:size_t):Integer; SysV_ABI_CDecl;
|
||||
|
@ -232,6 +256,13 @@ begin
|
|||
Result:=3;
|
||||
end;
|
||||
|
||||
function ps4_sceNpWebApiRegisterExtdPushEventCallbackA(userCtxId,filterId:Integer;
|
||||
cbFunc:SceNpWebApiExtdPushEventCallbackA;
|
||||
pUserArg:Pointer):Integer; SysV_ABI_CDecl;
|
||||
begin
|
||||
Result:=3;
|
||||
end;
|
||||
|
||||
procedure ps4_sceNpWebApiCheckTimeout(); SysV_ABI_CDecl;
|
||||
begin
|
||||
//
|
||||
|
@ -270,6 +301,7 @@ begin
|
|||
lib^.set_proc($909409134B8A9B9C,@ps4_sceNpWebApiRegisterServicePushEventCallback);
|
||||
lib^.set_proc($33605407E0CD1061,@ps4_sceNpWebApiCreateExtdPushEventFilter);
|
||||
lib^.set_proc($BEB334D80E46CB53,@ps4_sceNpWebApiRegisterExtdPushEventCallback);
|
||||
lib^.set_proc($8E15CA1902787A02,@ps4_sceNpWebApiRegisterExtdPushEventCallbackA);
|
||||
lib^.set_proc($81534DCB17FFD528,@ps4_sceNpWebApiCheckTimeout);
|
||||
lib^.set_proc($5D48DDB124D36775,@ps4_sceNpWebApiDeleteContext);
|
||||
end;
|
||||
|
|
Loading…
Reference in New Issue