Files
AnyPS5/docs/dev/debt/libSceNpWebApi2.md
T

5.4 KiB

libSceNpWebApi2 technical debt

Silent stubs

  • sceNpWebApi2SetRequestTimeout (libSceNpWebApi2) - the (request id, timeout) signature follows shadPS4. Pinball FX (PPSA08755) calls it while its main menu loads. It succeeds for any request id and stores nothing: no request reaches a service, as sceNpWebApi2SendRequest fails with UNAVAILABLE at once, so no timeout can expire. shadPS4 returns LIB_CONTEXT_NOT_FOUND, USER_CONTEXT_NOT_FOUND or REQUEST_NOT_FOUND for an id it does not know; this library keeps no context or request table (sceNpWebApi2CreateRequest hands out counter values, and sceNpWebApi2AbortRequest, sceNpWebApi2AddHttpRequestHeader and sceNpWebApi2DeleteRequest also accept any id), so those errors are not reported until the request functions track their ids together

Unknown function info

  • sceNpWebApi2AddMultipartPart, sceNpWebApi2IntCreateRequest, sceNpWebApi2IntPushEventCreateCtxIndFilter and sceNpWebApi2SetMultipartContentType (libSceNpWebApi2) - names and NIDs are present in the PS5 3.20 export inventory; no-argument prototypes follow shadPS4's PS4 stubs, not measured on a console. These declarations have no parameters solely to resolve known imports and make no ABI claim.
  • sceNpWebApi2InitializeForPresence, sceNpWebApi2IntInitialize and sceNpWebApi2IntInitialize2 (libSceNpWebApi2) - create a library context like sceNpWebApi2Initialize, as shadPS4 does on the PS4: the argument structures (32 and 40 bytes) and the struct_size check that returns SCE_NP_WEBAPI2_ERROR_INVALID_ARGUMENT follow its declarations. The context type shadPS4 records (2 for the internal initializers, 3 for presence), the context name and the push configuration group are not kept, and the 0x8000 context limit is not applied. Not measured on a PS5
  • sceNpWebApi2CreateMultipartRequest and sceNpWebApi2SendMultipartRequest (libSceNpWebApi2) - names and NIDs are present in the PS5 3.20 export inventory. The signatures follow the PS4 implementations in shadPS4 and its multipart sender; opaque struct pointers use const void* or void* to preserve source constness. These prototypes are not measured on a console.
  • sceNpWebApi2IntPushEventCreateDestPs4CtxIndFilter (libSceNpWebApi2) - no credible prototype was found; it is declared without parameters solely to resolve known imports and makes no ABI claim.
  • sceNpWebApi2PushEventAbortHandle (libSceNpWebApi2, NID 1OLgvahaSco) - the two signed 32-bit handle arguments and return type follow shadPS4 (PS4); the PS5 signature and abort behavior are unverified. PPSA01736 imports it. An unknown library context throws, as in sceNpWebApi2PushEventSetHandleTimeout. The handle is not checked and nothing is aborted, as push event handles are not tracked and nothing waits on a handle offline
  • sceNpWebApi2GetMemoryPoolStats (libSceNpWebApi2) - imported by PPSA21703's Unity PSN plugin. The signature (int libCtxId, stats*) and the layout of the Http2 statistics above (measured on a PS5 for Http2, Ssl and Net) are assumed for this library, not measured. The pool size is the one given to the initializer that created the context, and the peak and current use are 0. The error codes are unknown, so a null output or an unknown context throws
  • sceNpWebApi2PushEventSetHandleTimeout (libSceNpWebApi2) - imported by PPSA01317, which fails to load without it. The signature (int libCtxId, int handleId, uint32_t timeout) follows sceNpWebApiSetHandleTimeout of the PS4 libSceNpWebApi in shadPS4 and is unverified on the PS5. An unknown library context throws, as in sceNpWebApi2GetMemoryPoolStats, since its error code is unknown. The handle is not checked, as push event handles are not tracked (sceNpWebApi2PushEventDeleteHandle accepts any handle), and the timeout is not kept, as nothing waits on a handle offline