Difference between revisions of "FRDU:AddFriendWithApproach"

From 3dbrew
Jump to navigation Jump to search
(Created page with "=Request= {{IPC/Request}} {{IPC/RequestHeader|0x0034|1|6}} {{IPC/RequestEntry|? (unused)}} {{IPC/CopyHandle|1}} {{IPC/RequestEntry|Completion handle}} {{IPC/TranslateStaticBuf...")
 
 
Line 4: Line 4:
 
{{IPC/RequestEntry|? (unused)}}
 
{{IPC/RequestEntry|? (unused)}}
 
{{IPC/CopyHandle|1}}
 
{{IPC/CopyHandle|1}}
{{IPC/RequestEntry|Completion handle}}
+
{{IPC/CopyHandleEntry|Completion handle}}
 
{{IPC/TranslateStaticBuffer|Input [[Friend_Services#Encrypted_ApproachContext_Payload|encrypted ApproachContext payload]] buffer|3}}
 
{{IPC/TranslateStaticBuffer|Input [[Friend_Services#Encrypted_ApproachContext_Payload|encrypted ApproachContext payload]] buffer|3}}
 
{{IPC/TranslateStaticBuffer|? (unused, max. 0x600)|4}}
 
{{IPC/TranslateStaticBuffer|? (unused, max. 0x600)|4}}

Latest revision as of 14:43, 18 December 2024

Request[edit]

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[edit]

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

Description[edit]

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).