mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-27 00:28:14 +00:00
feat(libSceNpCppWebApi): cover the UserProfile models and remaining Common instantiations
9.9 KiB
9.9 KiB
libSceNpCppWebApi technical debt
Silent stubs
- sce::Np::CppWebApi::Common (libSceNpCppWebApi) - the
finishoverrides ofTransactionBase<...>(13 instantiations),DownStreamTransaction<...>(2 instantiations) andVector<IntrusivePtr<Leaderboards::V1::User>>::pushBackreturn success without doing work; a failed request never produces a transaction to finish.Transaction<...>::setOnFinishedCallbackandTransactionBase<...>::setResponseInformationOption(5 instantiations each, theUserProfile::V1,ProfanityFilter::V2andCommunicationRestrictionStatus::V3responses) return success without storing the callback or the option:startfails, so neither is ever used. The constructors and destructors of the same fiveTransaction<...>instantiations succeed without keeping state - sce::Np::CppWebApi::Leaderboards::V1 (libSceNpCppWebApi) - request-body and parameter bookkeeping succeeds without storing state:
GetRankingRequestBody::set{StartSerialRank,Group,Limit,Users,Offset},RecordScoreRequestBody::set{Comment,SmallData,NeedsTmpRank,ComparedDateTime,PcId},User::{setAccountId,setPcId},BoardsApi::ParameterToGetBoardDefinition::{initialize,terminate},RecordApi::ParameterToRecordLargeData::{initialize,terminate},RecordApi::ParameterToRecordScore::{initialize,setxPsnAtomicOperation,terminate},ViewApi::ParameterToGetLargeDataByObjectId::{initialize,terminate},ViewApi::ParameterToGetRanking::{initialize,setgetRankingRequestBody,terminate} - sce::Np::CppWebApi::SessionManager::V1 (libSceNpCppWebApi) - parameter bookkeeping succeeds without storing state:
PlayerSessionsApi::ParameterToCreatePlayerSessions::{ctor,dtor,initialize},PlayerSessionsApi::ParameterToGetPlayerSessionInvitations::{ctor,dtor,initialize,setfields,setinvitationInvalidFilter},PlayerSessionsApi::ParameterToJoinPlayerSessionAsPlayer::{ctor,dtor,initialize,terminate},PlayerSessionsApi::ParameterToLeavePlayerSession::{ctor,dtor,initialize},RequestPlayerSession::set{MaxSpectators,InvitableUserType,JoinableUserType,ExclusiveLeaderPrivileges},RequestPlayerSessionPlayer::setPushContexts - sce::Np::CppWebApi::TitleCloudStorage::V1 and InGameCatalog::V5 (libSceNpCppWebApi) -
DataApi::ParameterToDownloadData,DataApi::ParameterToGetMultiDataStatusesByUserandContainerApi::ParameterToGetContainerkeep only whether they are initialized.initialize,terminateand the string setters return the codes of the module bundled with PPSA21564: 0x80553503 for a nullLibContextor string, 0x80553502 for aLibContextthatCommon::initializedid not set or a parameter not yet initialized, 0x8055350f for a secondinitializeand 0x80553510 forterminatewithout one. They store none of the values, andParameterToGetContainer::set{sort,offset,limit,serviceLabel}store nothing either: only a request would read them - sce::Np::CppWebApi::UserProfile::V1, ProfanityFilter::V2, CommunicationRestrictionStatus::V3 (libSceNpCppWebApi) - parameter bookkeeping succeeds without storing state:
FriendsApi::ParameterToGetFriends,PresenceApi::ParameterToGetBasicPresences,BlocksApi::ParameterToGetBlockingUsers,ProfanityApi::ParameterToFilterProfanityandCommunicationRestrictionStatusApi::ParameterToGetCommunicationRestrictionStatus, each{ctor,dtor,initialize,terminate}
Unknown function info
- sce::Np::CppWebApi (libSceNpCppWebApi) - every request entry point (API calls, transaction
start/getResponse/readData, the*Factory::creates) returnsSCE_NP_WEBAPI_ERROR_NOT_SIGNED_INoffline. The constant's name and value follow the reference tables in shadPS4np_error.hand fpPS4np_error.pas, where0x80552907isORBIS_NP_WEBAPI_ERROR_NOT_SIGNED_INand0x80552901isOUT_OF_MEMORY(noUNAVAILABLEexists in the0x80552901-0x8055291Frange); it is the code a signed-out console returns from these entry points. The earlier0x80552901value came from the module the previous implementation shipped, which used the same incorrect constant - sce::Np::CppWebApi::Common::IntrusivePtr (libSceNpCppWebApi) - the 0x18-byte layout (object, deleter,
LibContext*) and the offset of the 32-bit reference count in the pointee (0x00, 0x30 forVector) come from the module bundled with one title (PPSA21564); other SDK versions are not checked. The destructor throws on the last reference of a pointer without a deleter: destroying the object needs its destructor and theLibContextallocator, which are not implemented - sce::Np::CppWebApi::Common::String (libSceNpCppWebApi) - the 0x20-byte layout (32-bit reference count, buffer at 0x08, buffer size at 0x10,
LibContext*at 0x18) comes from the module bundled with one title (PPSA21564); other SDK versions are not checked.appendgrows the buffer with the host allocator and the destructor frees it, instead of going through theLibContextallocator.pushBackintoVector<String>stores a deep copy, so a destroyed temporary cannot invalidate the stored element; a title that byte-copies aStringwith a live buffer would still double-free, as nothing increments the reference count - sce::Np::CppWebApi::Common::Vector (libSceNpCppWebApi) - imported by PPSA03671, whose dump ships no
libSceNpCppWebApi.prx. AVectorhandle is anIntrusivePtrover a shared body; bodies created bypushBackuse a host-side layout with the reference count at 0x30, matching the adopted-body convention measured on PPSA21564. The pointer/deleter constructor adopts a title-provided body released through the stored deleter;pushBackon such a body throws, since its element layout is unknown.begin,end, iterators andcopyFromthrow: the onlyVectors the title reads back come from failed transactions, which never produce one.empty,sizeandoperator[]read the host-created body honestly and throw on title-provided bodies - sce::Np::CppWebApi::SessionManager2V1 (libSceNpCppWebApi) - imported by PPSA03671. Offline, the factories,
PlayerSessionsApicalls and transactionstart/getResponse/readDatafail withSCE_NP_WEBAPI_ERROR_NOT_SIGNED_IN; parameter setters,initialize,terminate, constructors and destructors succeed without keeping state, as no request is ever sent. Response-body accessors (getSessionId,getPlayerSessions,getInvitations, theIsSetqueries) throw: a failed request never produces a response object - sce::Np::CppWebApi::UserProfile::V1, ProfanityFilter::V2, CommunicationRestrictionStatus::V3 (libSceNpCppWebApi) - imported by an Epic Online Services module whose dump ships no
libSceNpCppWebApi.prx. The reference-count offset 0x00 ofResponseHeaderBaseandWebApiFilterRequestis assumed from the other objects, not measured. Offline, the five API calls,WebApiFilterRequestFactory::createand the transactions'start/getResponseHeadersfail withSCE_NP_WEBAPI_ERROR_NOT_SIGNED_IN. Response accessors,ResponseHeaderBase::getHeaderValueand theVector/Iteratormembers overIntrusivePtr<UserProfile::V1::BasicPresence>andunsigned longthrow: a failed request never produces a response - libSceNpCppWebApi (libSceNpCppWebApi) - unimplemented stubs have their parameter lists, const qualifiers and return types aligned with the demangled symbols confirmed by NID matching in #8143. They cover response-body accessors, iterators, and uninstantiated transactions in Leaderboards::V1, SessionManager::V1, InGameCatalog::V5, TitleCloudStorage::V1, and Common templates: each mangled name gives the method and parameter types, but the runtime layout of response objects and errors are unverified on console, so each call continues to throw NotImplemented_nid_no_patch. No call site is recorded for them
- sce::Np::CppWebApi::SessionManager2V1 and sce::Np::CppWebApi::InGameCatalog2V5 (libSceNpCppWebApi) - 198 further exports imported by PPSA20397, named from aerolib. API calls, factories and transaction
start/getResponse*failSCE_NP_WEBAPI_ERROR_NOT_SIGNED_IN; parameter bookkeeping succeeds without state;IntrusivePtr/Vectorhelpers follow the layouts above, withVector::empty/size/operator[]reading host-created bodies and throwing on title-provided ones. Response accessors, iterators,Vector::begin/end/copyFromand transactionabort/getId/operator=throw: a failed request produces no response object, and aborting or renumbering a transaction that never ran has no defined outcome - sce::Np::CppWebApi::UserProfile::V1, sce::Np::CppWebApi::CommunicationRestrictionStatus::V3 and the remaining sce::Np::CppWebApi::Common instantiations (libSceNpCppWebApi) - 87 further exports imported by PPSA20397, plus the previously-throwing
ContainerApi::ParameterToGetContainerlifecycle andgetContainer. API verbs and transactionstart/getResponsefailSCE_NP_WEBAPI_ERROR_NOT_SIGNED_IN; parameter and model bookkeeping (initialize,terminate,set*, constructors, destructors) succeeds without state.BasicProfile/BasicPresence/PersonalDetailresponse accessors,*IsSetqueries,Get*Responsegetters, vectorbegin/end, iterator dereference/compare and transactionabort/getId/operator=throw: no response object exists offline and the model layouts are unverified