FRDU:AddFriendWithApproach

From 3dbrew
Revision as of 22:33, 16 December 2024 by TimmSkiller (talk | contribs) (Created page with "=Request= {{IPC/Request}} {{IPC/RequestHeader|0x0034|1|6}} {{IPC/RequestEntry|? (unused)}} {{IPC/CopyHandle|1}} {{IPC/RequestEntry|Completion handle}} {{IPC/TranslateStaticBuf...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Request

Index Word Description
0
Header 0x00340046 Cmd 0x0034 Param 1 Xlat 6
1 ? (unused)
2 Descriptor for copying 1 handle
3 Completion handle
4 Descriptor for static buffer (id 3)
5 Input encrypted ApproachContext payload buffer
6 Descriptor for static buffer (id 4)
7 ? (unused, max. 0x600)

Response

Index Word Description
0
Header 0x00340040 Cmd 0x0034 Param 1 Xlat 0
1 Result code

Description

Decrypts the given encrypted ApproachContext payload, adds the target console locally, and then schedules an internal task to register the friend using the friends server. The approach context must contain a valid Mii (otherwise, error 0xE0E0C4E9). The console (of the caller) must not have IsShowPlayedMode set (otherwise, 0xD8A0C4FA), and must have a valid personal mii (otherwise, 0xD8A0C4F8). The first u8 value of the payload must not be zero (otherwise, 0xE0E0C4E9).

If adding the friend locally succeeds but registering the friend online fails, result code 0xC4E1 is returned (registering the friend online will be reattempted the next time the console goes online).