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;
|
pSceNpOnlineId=^SceNpOnlineId;
|
||||||
SceNpOnlineId=packed record
|
SceNpOnlineId=packed record
|
||||||
data:array[0..SCE_NP_ONLINEID_MAX_LENGTH-1] of AnsiChar;
|
data :array[0..SCE_NP_ONLINEID_MAX_LENGTH-1] of AnsiChar;
|
||||||
term:AnsiChar;
|
term :AnsiChar;
|
||||||
dummy:array[0..2] of AnsiChar;
|
dummy:array[0..2] of AnsiChar;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
PSceNpId=^SceNpId;
|
PSceNpId=^SceNpId;
|
||||||
SceNpId=packed record
|
SceNpId=packed record
|
||||||
handle:SceNpOnlineId;
|
handle :SceNpOnlineId;
|
||||||
opt:array[0..7] of Byte;
|
opt :array[0..7] of Byte;
|
||||||
reserved:array[0..7] of Byte;
|
reserved:array[0..7] of Byte;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
|
@ -36,35 +36,35 @@ end;
|
||||||
type
|
type
|
||||||
pSceNpScoreRankData=^SceNpScoreRankData;
|
pSceNpScoreRankData=^SceNpScoreRankData;
|
||||||
SceNpScoreRankData=packed record
|
SceNpScoreRankData=packed record
|
||||||
npId:SceNpId;
|
npId :SceNpId;
|
||||||
reserved:array[0..48] of Byte;
|
reserved :array[0..48] of Byte;
|
||||||
pad0:array[0..2] of Byte;
|
pad0 :array[0..2] of Byte;
|
||||||
pcId:Integer;
|
pcId :Integer;
|
||||||
serialRank:DWORD;
|
serialRank :DWORD;
|
||||||
rank:DWORD;
|
rank :DWORD;
|
||||||
highestRank:DWORD;
|
highestRank:DWORD;
|
||||||
scoreValue:Int64;
|
scoreValue :Int64;
|
||||||
hasGameData:Integer;
|
hasGameData:Integer;
|
||||||
pad1:array[0..3] of Byte;
|
pad1 :array[0..3] of Byte;
|
||||||
recordDate:QWORD;
|
recordDate :QWORD;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
PSceNpScoreRankDataA=^SceNpScoreRankDataA;
|
PSceNpScoreRankDataA=^SceNpScoreRankDataA;
|
||||||
SceNpScoreRankDataA=packed record
|
SceNpScoreRankDataA=packed record
|
||||||
onlineId:SceNpOnlineId;
|
onlineId :SceNpOnlineId;
|
||||||
reserved0:array[0..15] of Byte;
|
reserved0 :array[0..15] of Byte;
|
||||||
reserved:array[0..48] of Byte;
|
reserved :array[0..48] of Byte;
|
||||||
pad0:array[0..2] of Byte;
|
pad0 :array[0..2] of Byte;
|
||||||
pcId:Integer;
|
pcId :Integer;
|
||||||
serialRank:DWORD;
|
serialRank :DWORD;
|
||||||
rank:DWORD;
|
rank :DWORD;
|
||||||
highestRank:DWORD;
|
highestRank:DWORD;
|
||||||
hasGameData:Integer;
|
hasGameData:Integer;
|
||||||
pad1:array[0..3] of Byte;
|
pad1 :array[0..3] of Byte;
|
||||||
scoreValue:Int64;
|
scoreValue :Int64;
|
||||||
recordDate:QWORD;
|
recordDate :QWORD;
|
||||||
accountId:QWORD;
|
accountId :QWORD;
|
||||||
pad2:array[0..7] of Byte;
|
pad2 :array[0..7] of Byte;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
const
|
const
|
||||||
|
@ -89,11 +89,24 @@ type
|
||||||
|
|
||||||
PSceNpScoreGetFriendRankingOptParam=^SceNpScoreGetFriendRankingOptParam;
|
PSceNpScoreGetFriendRankingOptParam=^SceNpScoreGetFriendRankingOptParam;
|
||||||
SceNpScoreGetFriendRankingOptParam=packed record
|
SceNpScoreGetFriendRankingOptParam=packed record
|
||||||
size:size_t;
|
size :size_t;
|
||||||
startSerialRank:PInteger;
|
startSerialRank:PInteger;
|
||||||
hits:PInteger;
|
hits :PInteger;
|
||||||
end;
|
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(
|
function ps4_sceNpScoreGetFriendsRanking(
|
||||||
reqId:Integer;
|
reqId:Integer;
|
||||||
boardId:DWORD;
|
boardId:DWORD;
|
||||||
|
@ -213,7 +226,7 @@ function ps4_sceNpScoreRecordScore(
|
||||||
score:Int64; //SceNpScoreValue
|
score:Int64; //SceNpScoreValue
|
||||||
scoreComment:pSceNpScoreComment;
|
scoreComment:pSceNpScoreComment;
|
||||||
gameInfo:pSceNpScoreGameInfo;
|
gameInfo:pSceNpScoreGameInfo;
|
||||||
tmpRank:PDWORD; //SceNpScoreRankNumber
|
tmpRank:pSceNpScoreRankNumber;
|
||||||
compareDate:PQWORD; //SceRtcTick
|
compareDate:PQWORD; //SceRtcTick
|
||||||
option:Pointer):Integer; SysV_ABI_CDecl;
|
option:Pointer):Integer; SysV_ABI_CDecl;
|
||||||
begin
|
begin
|
||||||
|
@ -230,7 +243,7 @@ function ps4_sceNpScoreRecordScoreAsync(
|
||||||
score:Int64; //SceNpScoreValue
|
score:Int64; //SceNpScoreValue
|
||||||
scoreComment:pSceNpScoreComment;
|
scoreComment:pSceNpScoreComment;
|
||||||
gameInfo:pSceNpScoreGameInfo;
|
gameInfo:pSceNpScoreGameInfo;
|
||||||
tmpRank:PDWORD; //SceNpScoreRankNumber
|
tmpRank:pSceNpScoreRankNumber;
|
||||||
compareDate:PQWORD; //SceRtcTick
|
compareDate:PQWORD; //SceRtcTick
|
||||||
option:Pointer):Integer; SysV_ABI_CDecl;
|
option:Pointer):Integer; SysV_ABI_CDecl;
|
||||||
begin
|
begin
|
||||||
|
@ -252,6 +265,34 @@ begin
|
||||||
Result:=0;
|
Result:=0;
|
||||||
end;
|
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;
|
function Load_libSceNpScoreRanking(Const name:RawByteString):TElf_node;
|
||||||
var
|
var
|
||||||
lib:PLIBRARY;
|
lib:PLIBRARY;
|
||||||
|
@ -270,6 +311,9 @@ begin
|
||||||
lib^.set_proc($CD3D1706D82D3922,@ps4_sceNpScoreRecordScore);
|
lib^.set_proc($CD3D1706D82D3922,@ps4_sceNpScoreRecordScore);
|
||||||
lib^.set_proc($00D26CB0FCF7998D,@ps4_sceNpScoreRecordScoreAsync);
|
lib^.set_proc($00D26CB0FCF7998D,@ps4_sceNpScoreRecordScoreAsync);
|
||||||
lib^.set_proc($9B50DF351B2D9124,@ps4_sceNpScorePollAsync);
|
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;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
|
|
@ -5,7 +5,20 @@ unit ps4_libSceNpSignaling;
|
||||||
interface
|
interface
|
||||||
|
|
||||||
uses
|
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
|
implementation
|
||||||
|
|
||||||
|
@ -17,6 +30,14 @@ begin
|
||||||
Result:=0;
|
Result:=0;
|
||||||
end;
|
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;
|
function Load_libSceNpSignaling(Const name:RawByteString):TElf_node;
|
||||||
var
|
var
|
||||||
lib:PLIBRARY;
|
lib:PLIBRARY;
|
||||||
|
@ -26,6 +47,7 @@ begin
|
||||||
|
|
||||||
lib:=Result._add_lib('libSceNpSignaling');
|
lib:=Result._add_lib('libSceNpSignaling');
|
||||||
lib^.set_proc($DCA3AE0B84666595,@ps4_sceNpSignalingInitialize);
|
lib^.set_proc($DCA3AE0B84666595,@ps4_sceNpSignalingInitialize);
|
||||||
|
lib^.set_proc($E7262311D778B7C6,@ps4_sceNpSignalingCreateContext)
|
||||||
end;
|
end;
|
||||||
|
|
||||||
initialization
|
initialization
|
||||||
|
|
|
@ -182,6 +182,30 @@ type
|
||||||
extdDataKeyNum:size_t;
|
extdDataKeyNum:size_t;
|
||||||
end;
|
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;
|
function ps4_sceNpWebApiCreatePushEventFilter(libCtxId:Integer;
|
||||||
pDataType:pSceNpWebApiPushEventDataType;
|
pDataType:pSceNpWebApiPushEventDataType;
|
||||||
dataTypeNum:size_t):Integer; SysV_ABI_CDecl;
|
dataTypeNum:size_t):Integer; SysV_ABI_CDecl;
|
||||||
|
@ -232,6 +256,13 @@ begin
|
||||||
Result:=3;
|
Result:=3;
|
||||||
end;
|
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;
|
procedure ps4_sceNpWebApiCheckTimeout(); SysV_ABI_CDecl;
|
||||||
begin
|
begin
|
||||||
//
|
//
|
||||||
|
@ -270,6 +301,7 @@ begin
|
||||||
lib^.set_proc($909409134B8A9B9C,@ps4_sceNpWebApiRegisterServicePushEventCallback);
|
lib^.set_proc($909409134B8A9B9C,@ps4_sceNpWebApiRegisterServicePushEventCallback);
|
||||||
lib^.set_proc($33605407E0CD1061,@ps4_sceNpWebApiCreateExtdPushEventFilter);
|
lib^.set_proc($33605407E0CD1061,@ps4_sceNpWebApiCreateExtdPushEventFilter);
|
||||||
lib^.set_proc($BEB334D80E46CB53,@ps4_sceNpWebApiRegisterExtdPushEventCallback);
|
lib^.set_proc($BEB334D80E46CB53,@ps4_sceNpWebApiRegisterExtdPushEventCallback);
|
||||||
|
lib^.set_proc($8E15CA1902787A02,@ps4_sceNpWebApiRegisterExtdPushEventCallbackA);
|
||||||
lib^.set_proc($81534DCB17FFD528,@ps4_sceNpWebApiCheckTimeout);
|
lib^.set_proc($81534DCB17FFD528,@ps4_sceNpWebApiCheckTimeout);
|
||||||
lib^.set_proc($5D48DDB124D36775,@ps4_sceNpWebApiDeleteContext);
|
lib^.set_proc($5D48DDB124D36775,@ps4_sceNpWebApiDeleteContext);
|
||||||
end;
|
end;
|
||||||
|
|
Loading…
Reference in New Issue