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

6.0 KiB

libSceNpWebApi2 technical debt

Silent stubs

  • sceNpWebApi2AddWebTraceTag (libSceNpWebApi2) - the (request id, value) signature follows shadPS4. A title imports it. It validates that the value pointer is not null (returning INVALID_ARGUMENT 0x80553402), accepts any request id, and stores nothing: no request reaches a service, as sceNpWebApi2SendRequest fails with UNAVAILABLE at once, so trace tags are not transmitted offline
  • sceNpWebApi2PushEventRegisterCallback and sceNpWebApi2PushEventRegisterPushContextCallback (libSceNpWebApi2) - they store no callback and return a new id for any user context and filter, so an unknown context or filter is not rejected and no callback is ever called: no push event reaches a title, as network push operations are unimplemented and sceNpWebApi2PushEventCreatePushContext fails with UNAVAILABLE. The callback's prototype is not identified. The (user context id, filter id, callback, user argument) signature comes from one disassembled title (PPSA21564 01.007.000), not from a console: it calls them at 0x2ba5f0 and 0x2ba9e0 respectively, both with the id sceNpWebApi2CreateUserContext returned, the id sceNpWebApi2PushEventCreateFilter returned just before, the address of one of its functions and a user argument, and treats a negative result as failure
  • 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