SceNpLookupCreateTitleCtxA + SceNpAuth functions + SceInvitationDialog library + accept + sendto (#185)

* SceNpLookupCreateTitleCtxA

* SceNpAuth functions

* SceInvitationDialog library

* accept

* +

* sendto

* +

* +

---------

Co-authored-by: red-prig <vdpasha@mail.ru>
This commit is contained in:
Ordinary205 2024-02-04 19:57:25 +04:00 committed by GitHub
parent accf9ec255
commit ae7e8038ec
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 134 additions and 6 deletions

View File

@ -68,6 +68,7 @@ uses
ps4_libSceSocialScreen,
ps4_libSceVideoRecording,
ps4_libSceWebBrowserDialog,
ps4_libSceInvitationDialog,
ps4_libSceContentExport,
ps4_libSceConvertKeycode,
ps4_libSceUsbd,

View File

@ -1983,6 +1983,8 @@ begin
lib^.set_proc($95493AC2B197C8CC,@ps4_recvfrom);
lib^.set_proc($A719C299A82BB5AA,@ps4_listen);
lib^.set_proc($4D4BA2612DA413CB,@ps4_shutdown);
lib^.set_proc($DDEFB822FEC827C5,@ps4_accept);
lib^.set_proc($A01AF7D773E9A4D1,@ps4_sendto);
//socket

View File

@ -39,6 +39,17 @@ function ps4_listen(s:SceNetId;backlog:Integer):Integer; SysV_ABI_CDecl;
function ps4_shutdown(s:SceNetId;how:Integer):Integer; SysV_ABI_CDecl;
function ps4_accept(s:SceNetId;
addr:pSceNetSockaddr;
paddrlen:pSceNetSocklen_t):Integer; SysV_ABI_CDecl;
function ps4_sendto(s:SceNetId;
const buf:Pointer;
len:QWORD;
flags:Integer;
const addr:pSceNetSockaddr;
paddrlen:pSceNetSocklen_t):Integer; SysV_ABI_CDecl;
implementation
function ps4_socket(const name:PChar;
@ -87,5 +98,22 @@ begin
Result:=0;
end;
function ps4_accept(s:SceNetId;
addr:pSceNetSockaddr;
paddrlen:pSceNetSocklen_t):Integer; SysV_ABI_CDecl;
begin
Result:=0;
end;
function ps4_sendto(s:SceNetId;
const buf:Pointer;
len:QWORD;
flags:Integer;
const addr:pSceNetSockaddr;
paddrlen:pSceNetSocklen_t):Integer; SysV_ABI_CDecl;
begin
Result:=0;
end;
end.

View File

@ -7,8 +7,42 @@ interface
uses
ps4_program,
np_error,
ps4_libSceNpCommon,
sys_kernel;
const
SCE_NP_CLIENT_ID_MAX_LEN=128;
SCE_NP_AUTHORIZATION_CODE_MAX_LEN=128;
type
pSceNpClientId=^SceNpClientId;
SceNpClientId=packed record
id:array[0..SCE_NP_CLIENT_ID_MAX_LEN] of char;
padding:array[0..6] of Byte;
end;
pSceNpAuthCreateAsyncRequestParameter=^SceNpAuthCreateAsyncRequestParameter;
SceNpAuthCreateAsyncRequestParameter=packed record
size:QWORD;
cpuAffinityMask:QWORD;
threadPriority:Integer;
padding:array[0..3] of Byte;
end;
pSceNpAuthGetAuthorizationCodeParameter=^SceNpAuthGetAuthorizationCodeParameter;
SceNpAuthGetAuthorizationCodeParameter=packed record
size:QWORD;
pOnlineId:pSceNpOnlineId;
pClientId:pSceNpClientId;
scope:PChar;
end;
pSceNpAuthorizationCode=^SceNpAuthorizationCode;
SceNpAuthorizationCode=packed record
code:array[0..SCE_NP_AUTHORIZATION_CODE_MAX_LEN] of char;
padding:array[0..6] of Byte;
end;
implementation
function ps4_sceNpAuthCreateRequest():Integer; SysV_ABI_CDecl;
@ -17,6 +51,29 @@ begin
Result:=-1;
end;
function ps4_sceNpAuthCreateAsyncRequest(const pParam:pSceNpAuthCreateAsyncRequestParameter):Integer; SysV_ABI_CDecl;
begin
Result:=0;
end;
function ps4_sceNpAuthGetAuthorizationCode(reqId:Integer;
const param:pSceNpAuthGetAuthorizationCodeParameter;
authCode:pSceNpAuthorizationCode;
issuerId:PInteger):Integer; SysV_ABI_CDecl;
begin
Result:=0;
end;
function ps4_sceNpAuthPollAsync(reqId:Integer;pResult:PInteger):Integer; SysV_ABI_CDecl;
begin
Result:=0;
end;
function ps4_sceNpAuthDeleteRequest(reqId:Integer):Integer; SysV_ABI_CDecl;
begin
Result:=0;
end;
function Load_libSceNpAuth(Const name:RawByteString):TElf_node;
var
lib:PLIBRARY;
@ -26,7 +83,10 @@ begin
lib:=Result._add_lib('libSceNpAuth');
lib^.set_proc($E9BC05928B184508,@ps4_sceNpAuthCreateRequest);
//
lib^.set_proc($37E9ABEC68D3BEBF,@ps4_sceNpAuthCreateAsyncRequest);
lib^.set_proc($2B11A43AB4094EA6,@ps4_sceNpAuthGetAuthorizationCode);
lib^.set_proc($8234B27F34AC0DC1,@ps4_sceNpAuthPollAsync);
lib^.set_proc($1FCC06F4193F9CF7,@ps4_sceNpAuthDeleteRequest);
end;
initialization

View File

@ -8,19 +8,21 @@ uses
ps4_program,
ps4_libSceNpCommon;
const
SCE_NP_LOOKUP_MAX_CTX_NUM=32;
implementation
const
SCE_NP_LOOKUP_MAX_CTX_NUM=32;
function ps4_sceNpLookupCreateTitleCtx(selfNpId:PSceNpId):Integer; SysV_ABI_CDecl;
begin
Result:=1;
end;
function ps4_sceNpLookupCreateTitleCtxA(selfNpId:Integer):Integer; SysV_ABI_CDecl;
begin
Result:=1;
end;
function Load_libSceNpUtility(Const name:RawByteString):TElf_node;
var
lib:PLIBRARY;
@ -30,6 +32,7 @@ begin
lib:=Result._add_lib('libSceNpUtility');
lib^.set_proc($F39DF743E2D4EC44,@ps4_sceNpLookupCreateTitleCtx);
lib^.set_proc($BD3F7186A3CEEBED,@ps4_sceNpLookupCreateTitleCtxA);
///lib^.set_proc($E7262311D778B7C6,@ps4_sceNpSignalingCreateContext);
end;

View File

@ -0,0 +1,34 @@
unit ps4_libSceInvitationDialog;
{$mode ObjFPC}{$H+}
interface
uses
ps4_program,
Classes,
SysUtils;
implementation
function ps4_sceInvitationDialogUpdateStatus():Integer; SysV_ABI_CDecl;
begin
Result:=0;
end;
function Load_libSceInvitationDialog(Const name:RawByteString):TElf_node;
var
lib:PLIBRARY;
begin
Result:=TElf_node.Create;
Result.pFileName:=name;
lib:=Result._add_lib('libSceInvitationDialog');
lib^.set_proc($F7E83D88EABEEE48,@ps4_sceInvitationDialogUpdateStatus);
end;
initialization
ps4_app.RegistredPreLoad('libSceInvitationDialog.prx',@Load_libSceInvitationDialog);
end.