Skip to content

Commit

Permalink
SceNpWebApi library and SceWebBrowserDialog functions (#179)
Browse files Browse the repository at this point in the history
* libSceWebBrowserDialog

* libSceNpWebApi

* +

---------

Co-authored-by: red-prig <vdpasha@mail.ru>
  • Loading branch information
Ordinary205 and red-prig authored Jan 28, 2024
1 parent 04344ba commit 9af0047
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 0 deletions.
1 change: 1 addition & 0 deletions fpPS4.lpr
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@
ps4_libSceShareUtility,
ps4_libSceSocialScreen,
ps4_libSceVideoRecording,
ps4_libSceWebBrowserDialog,
ps4_libSceContentExport,
ps4_libSceUsbd,
ps4_libSceAudiodecCpu,
Expand Down
17 changes: 17 additions & 0 deletions src/np/ps4_libscenpwebapi.pas
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ function ps4_sceNpWebApi2CreateUserContext(libCtxId,m_userId:Integer):Integer; S
Result:=5;
end;

function ps4_sceNpWebApi2PushEventDeletePushContext(param_1:Integer;param_2:Pointer):Integer; SysV_ABI_CDecl;
begin
Result:=0;
end;

function ps4_sceNpWebApiSendRequest(requestId:Int64;
pData:Pointer;
dataSize:size_t):Integer; SysV_ABI_CDecl;
Expand Down Expand Up @@ -227,6 +232,15 @@ function ps4_sceNpWebApiRegisterExtdPushEventCallback(userCtxId,filterId:Integer
Result:=3;
end;

procedure ps4_sceNpWebApiCheckTimeout(); SysV_ABI_CDecl;
begin
//
end;

function ps4_sceNpWebApiDeleteContext(userCtxId:Integer):Integer; SysV_ABI_CDecl;
begin
Result:=0;
end;

function Load_libSceNpWebApi(Const name:RawByteString):TElf_node;
var
Expand Down Expand Up @@ -256,6 +270,8 @@ function Load_libSceNpWebApi(Const name:RawByteString):TElf_node;
lib^.set_proc($909409134B8A9B9C,@ps4_sceNpWebApiRegisterServicePushEventCallback);
lib^.set_proc($33605407E0CD1061,@ps4_sceNpWebApiCreateExtdPushEventFilter);
lib^.set_proc($BEB334D80E46CB53,@ps4_sceNpWebApiRegisterExtdPushEventCallback);
lib^.set_proc($81534DCB17FFD528,@ps4_sceNpWebApiCheckTimeout);
lib^.set_proc($5D48DDB124D36775,@ps4_sceNpWebApiDeleteContext);
end;

function Load_libSceNpWebApi2(Const name:RawByteString):TElf_node;
Expand All @@ -269,6 +285,7 @@ function Load_libSceNpWebApi2(Const name:RawByteString):TElf_node;

lib^.set_proc($FA8F7CD7A61086A4,@ps4_sceNpWebApi2Initialize );
lib^.set_proc($B24E786E2E85B583,@ps4_sceNpWebApi2CreateUserContext);
lib^.set_proc($41A7F179933758AE,@ps4_sceNpWebApi2PushEventDeletePushContext);
end;

initialization
Expand Down
53 changes: 53 additions & 0 deletions src/ps4_libscewebbrowserdialog.pas
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
unit ps4_libSceWebBrowserDialog;

{$mode ObjFPC}{$H+}

interface

uses
ps4_program,
Classes,
SysUtils;

const
//SceCommonDialogStatus
SCE_COMMON_DIALOG_STATUS_NONE =0;
SCE_COMMON_DIALOG_STATUS_INITIALIZED=1;
SCE_COMMON_DIALOG_STATUS_RUNNING =2;
SCE_COMMON_DIALOG_STATUS_FINISHED =3;

implementation

function ps4_sceWebBrowserDialogUpdateStatus():Integer; SysV_ABI_CDecl;
begin
Result:=0;
end;

function ps4_sceWebBrowserDialogGetStatus():Integer; SysV_ABI_CDecl;
begin
Result:=0;
end;

function ps4_sceWebBrowserDialogTerminate():Integer; SysV_ABI_CDecl;
begin
Result:=0;
end;

function Load_libSceWebBrowserDialog(Const name:RawByteString):TElf_node;
var
lib:PLIBRARY;
begin
Result:=TElf_node.Create;
Result.pFileName:=name;

lib:=Result._add_lib('libSceWebBrowserDialog');
lib^.set_proc($875751FEDE484A08,@ps4_sceWebBrowserDialogUpdateStatus);
lib^.set_proc($0854C6E9AF138CE5,@ps4_sceWebBrowserDialogGetStatus);
lib^.set_proc($A1C1EDC81C077F2B,@ps4_sceWebBrowserDialogTerminate);
end;

initialization
ps4_app.RegistredPreLoad('libSceWebBrowserDialog.prx',@Load_libSceWebBrowserDialog);

end.

0 comments on commit 9af0047

Please sign in to comment.