Skip to content

feat(libSceNpCppWebApi): answer the UserProfile, ProfanityFilter and CommunicationRestrictionStatus requests offline - #8561

Merged
oneandonlydean merged 3 commits into
boykopovar:mainfrom
DProkos:feat/npcppwebapi-user-profile-offline
Oct 23, 2026
Merged

oneandonlydean merged 3 commits into
boykopovar:mainfrom
DProkos:feat/npcppwebapi-user-profile-offline

Conversation

@DProkos

@DProkos DProkos commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

What

Dying Light: The Beast (PPSA24003) ships no libSceNpCppWebApi.prx, and its Epic Online Services module imports 106 exports that the library does not have, so the loader stops at start-up. This adds them, following the offline rules the library already uses (#6901):

  • The five API calls (FriendsApi::getFriends, PresenceApi::getBasicPresences, BlocksApi::getBlockingUsers, ProfanityApi::filterProfanity, CommunicationRestrictionStatusApi::getCommunicationRestrictionStatus), WebApiFilterRequestFactory::create and the transactions' start/getResponseHeaders return SCE_NP_WEBAPI_ERROR_NOT_SIGNED_IN.
  • Parameter objects ({ctor,dtor,initialize,terminate}), Transaction construction and destruction, setOnFinishedCallback, setResponseInformationOption and finish succeed without keeping state. They are listed under Silent stubs.
  • The IntrusivePtr members over WebApiFilterRequest, ResponseHeaderBase, String and Vector<IntrusivePtr<BasicPresence>> use the existing CopyIntrusivePtr/ReleaseIntrusivePtr helpers with the documented reference-count offsets (0x00, 0x30 for Vector); operator->, operator* and get return the pointee.
  • Response accessors, ResponseHeaderBase::getHeaderValue and the Vector/Iterator members over IntrusivePtr<BasicPresence> and unsigned long throw: a failed request never produces a response.

Every added name recomputes to the NID the title imports (checked for all 106). None of them is in main, #8264 or #8088.

Tested

Windows 11 Pro 26200, WinLibs GCC 15.2.0 r7 UCRT, Ninja, Release, BUILD_TESTING=ON, on main 587bb343e.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: PPSA24003 Dying Light: The Beast (PPSA24003) #8560
  • GPUs tested: n/a
  • AI-assisted: yes

🤖 Generated with Claude Code

…CommunicationRestrictionStatus requests offline

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions github-actions Bot added the unblocks title Names a title ID on the Unblocks line label Oct 20, 2026
@github-actions

github-actions Bot commented Oct 20, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
PR 7780 core/libs/CMakeLists.txt L623-629
PR 8264 core/libs/CMakeLists.txt L623
core/libs/tests/GuestNpCppWebApiIntrusivePtr.cpp L58, L281, L295, L301, L313
PR 8959 core/libs/prx/libSceNpCppWebApi/Export.cpp L1892
PR 9015 core/libs/prx/libSceNpCppWebApi/Export.cpp L1892

Some comparisons could not be completed because a pull request conflicts with the base branch. Review these shared files manually before concluding that there is no overlap.

Pull request Shared files not compared
PR 5021 core/libs/CMakeLists.txt
PR 6044 core/libs/CMakeLists.txt
PR 7201 core/libs/CMakeLists.txt
PR 7275 core/libs/CMakeLists.txt
PR 8285 core/libs/CMakeLists.txt
PR 8650 core/libs/CMakeLists.txt
PR 9019 core/libs/CMakeLists.txt
PR 9161 core/libs/CMakeLists.txt
PR 9294 core/libs/CMakeLists.txt
PR 9571 core/libs/CMakeLists.txt
PR 9573 core/libs/CMakeLists.txt
PR 9924 core/libs/CMakeLists.txt
PR 9933 core/libs/CMakeLists.txt

@nikowolf123

Copy link
Copy Markdown
Contributor

Two inaccuracies in docs/dev/debt/libSceNpCppWebApi.md:

Line 5 says the finish overrides of TransactionBase<...> (15 instantiations) return success without doing work. Export.cpp at this head has 15 such overrides, but only 13 of them return 0: the 8 already on main and the 5 added here at L2044, L2056, L2068, L2080 and L2092. The InGameCatalog::V5 and TitleCloudStorage::V1 overrides at L1610 and L1620 call NotImplemented_nid_no_patch(__func__), and line 19 of the same file lists them among the exports that throw. That is also why main says 8 even though it has 10 overrides.

The PR description says Transaction construction and destruction are listed under Silent stubs, but neither Silent stubs bullet names them. The 10 constructors and destructors at L1928-L1992 only return 0; and leave the object untouched. CONTRIBUTING.md puts silent stubs under Silent stubs, and the review of #6901 asked for constructors and destructors that succeed without storing state to be listed there.

Suggested fix: on line 5, change (15 instantiations) to (13 instantiations), and after the setResponseInformationOption sentence add:

The constructors and destructors of the same five `Transaction<...>` instantiations succeed without keeping state

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@DProkos thanks, the exports and tests look right. Three changes to docs/dev/debt/libSceNpCppWebApi.md before merge:

  1. The first Silent stubs bullet says the finish overrides of TransactionBase<...> have 15 instantiations that return success. The head has 15 overrides, but only 13 return 0: the 8 on main and your 5. The InGameCatalog::V5 and TitleCloudStorage::V1 ones throw and are already listed under exports that throw. Please change it to 13, as nikowolf123 pointed out.
  2. The constructors and destructors of the five new Transaction<...> instantiations return 0 without touching the object, so they belong under Silent stubs too, for example after the setResponseInformationOption sentence: "The constructors and destructors of the same five Transaction<...> instantiations succeed without keeping state".
  3. The new Unknown function info entry names a title ID. The debt docs must not name titles or title IDs (the bring-up discussion is the place for that). Please describe the importer generically, e.g. "imported by an Epic Online Services module whose dump ships no libSceNpCppWebApi.prx".

…title ID

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@DProkos

DProkos commented Oct 21, 2026

Copy link
Copy Markdown
Contributor Author

@oneandonlydean thanks, all three are in c12ca91:

  1. TransactionBase<...>::finish now reads 13 instantiations: the 8 on main and the 5 added here return 0; the InGameCatalog::V5 and TitleCloudStorage::V1 ones throw and stay under the exports that throw.
  2. Added to Silent stubs: "The constructors and destructors of the same five Transaction<...> instantiations succeed without keeping state".
  3. The Unknown function info entry no longer names a title: "imported by an Epic Online Services module whose dump ships no libSceNpCppWebApi.prx".

tools/check_conventions.py --base upstream/main passes.

🤖 Addressed by Claude Code

@oneandonlydean

Copy link
Copy Markdown
Collaborator

@DProkos thanks, all three read as described. A quick check of c12ca91ed is next, then full CI.

@github-actions github-actions Bot removed the needs rebase Conflicts with main, rebase needed label Oct 21, 2026
@oneandonlydean
oneandonlydean merged commit bc834a8 into boykopovar:main Oct 23, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build docs prx unblocks title Names a title ID on the Unblocks line

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants