Difference between revisions of "MyPage Applet"

From Nintendo Switch Brew
Jump to navigation Jump to search
Line 31: Line 31:
 
| 0x68 || 0x48 || [[Friend_services|InAppScreenName]]
 
| 0x68 || 0x48 || [[Friend_services|InAppScreenName]]
 
|-
 
|-
| 0xB0 || 0xFF8 || Unknown.
+
| 0xB0 || 0xFF8 || See below.
 
|}
 
|}
  
Line 37: Line 37:
  
 
The fields following the userID are only set for [[#Type]] ShowUserDetailInfo/StartSendingFriendRequest, for everything else (besides the [9.0.0+] types) these are cleared.
 
The fields following the userID are only set for [[#Type]] ShowUserDetailInfo/StartSendingFriendRequest, for everything else (besides the [9.0.0+] types) these are cleared.
 +
 +
The layout of the data following the userID with the [9.0.0+] types depends on what type is being used:
 +
 +
StartFriendInvitation:
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Offset
 +
!  Size
 +
!  Description
 +
|-
 +
| 0x18 || 0x4 || s32 NetworkServiceAccountId_count. Must be 1-15.
 +
|-
 +
| 0x1C || 0x4 || Padding.
 +
|-
 +
| 0x20 || 0x8 || User-data size, must be <=0x400.
 +
|-
 +
| 0x28 || 0x400 || Arbitrary user-data, see above size.
 +
|-
 +
| 0x428 || 0xC00 || [[Friend_services|FriendInvitationGameModeDescription]]
 +
|}
 +
 +
StartSendingFriendInvitation:
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Offset
 +
!  Size
 +
!  Description
 +
|-
 +
| 0x18 || 0x4 || s32 NetworkServiceAccountId_count. Must be 1-15.
 +
|-
 +
| 0x1C || 0x4 || Padding.
 +
|-
 +
| 0x20 || 0x8*NetworkServiceAccountId_count || [[Account_services|NetworkServiceAccountId]] list.
 +
|-
 +
| 0xA0 || 0x8 || User-data size, must be <=0x400.
 +
|-
 +
| 0xA8 || 0x400 || Arbitrary user-data, see above size.
 +
|-
 +
| 0x4A8 || 0xC00 || [[Friend_services|FriendInvitationGameModeDescription]]
 +
|}
 +
 +
ShowReceivedInvitationDetail:
 +
 +
{| class="wikitable" border="1"
 +
|-
 +
!  Offset
 +
!  Size
 +
!  Description
 +
|-
 +
| 0x18 || 0x8 || [[Friend_services|FriendInvitationId]]
 +
|-
 +
| 0x20 || 0x8 || [[Friend_services|FriendInvitationGroupId]]
 +
|}
  
 
== Type ==
 
== Type ==
Line 69: Line 124:
  
 
== Usage ==
 
== Usage ==
User-processes should push a common arguments struct as well as an [[#Arg]] struct. See [[#Type]] for the commonargs PlayStartupSound flag value. After starting the applet, official sw immediately closes it (no output storage is handled) - except for StartSendingFriendRequest/StartFriendInvitation,/StartSendingFriendInvitation which returns an output storage containing the Result.
+
User-processes should push a common arguments struct as well as an [[#Arg]] struct. See [[#Type]] for the commonargs PlayStartupSound flag value. After starting the applet, official sw immediately closes it (no output storage is handled) - except for StartSendingFriendRequest/StartFriendInvitation/StartSendingFriendInvitation which returns an output storage containing the Result.
  
 
[[Category:Library Applets]]
 
[[Category:Library Applets]]

Revision as of 04:12, 11 November 2019

This is the MyPage applet launched by Home Menu. Official sw uses this under nn::friends. See AM_services#Library_Applets.

Library Applet Versions

System Version Value
[1.0.0+] 0x1
[9.0.0+] 0x10000

Arg

Offset Size Description
0x0 0x4 #Type
0x4 0x4 Padding
0x8 0x10 u128 userID
0x18 0x8 NetworkServiceAccountId for the other account.
0x20 0x48 InAppScreenName
0x68 0x48 InAppScreenName
0xB0 0xFF8 See below.

The is the 0xB0-byte (0x10A8-byte with version 0x10000) struct pushed for the input storage.

The fields following the userID are only set for #Type ShowUserDetailInfo/StartSendingFriendRequest, for everything else (besides the [9.0.0+] types) these are cleared.

The layout of the data following the userID with the [9.0.0+] types depends on what type is being used:

StartFriendInvitation:

Offset Size Description
0x18 0x4 s32 NetworkServiceAccountId_count. Must be 1-15.
0x1C 0x4 Padding.
0x20 0x8 User-data size, must be <=0x400.
0x28 0x400 Arbitrary user-data, see above size.
0x428 0xC00 FriendInvitationGameModeDescription

StartSendingFriendInvitation:

Offset Size Description
0x18 0x4 s32 NetworkServiceAccountId_count. Must be 1-15.
0x1C 0x4 Padding.
0x20 0x8*NetworkServiceAccountId_count NetworkServiceAccountId list.
0xA0 0x8 User-data size, must be <=0x400.
0xA8 0x400 Arbitrary user-data, see above size.
0x4A8 0xC00 FriendInvitationGameModeDescription

ShowReceivedInvitationDetail:

Offset Size Description
0x18 0x8 FriendInvitationId
0x20 0x8 FriendInvitationGroupId

Type

Name Type value PlayStartupSound Description
ShowFriendList 0 false Launches the applet with the "Friend List" menu initially selected.
ShowUserDetailInfo 1 false
StartSendingFriendRequest 2 false
ShowMethodsOfSendingFriendRequest 3 false Launches the applet with the "Add Friend" menu initially selected.
StartFacedFriendRequest 4 false Launches the applet where the "Search for Local Users" menu is initially shown. Returning from this menu will exit the applet.
ShowReceivedFriendRequestList 5 false Launches the applet where the "Received Friend Requests" menu is initially shown. Returning from this menu will exit the applet.
ShowBlockedUserList 6 false Launches the applet where the "Blocked-User List" menu is initially shown. Returning from this menu will exit the applet.
ShowMyProfile 7 false Launches the applet with the "Profile" menu initially selected.
ShowMyProfileForHomeMenu 7 true Identical to ShowMyProfile except for PlayStartupSound.
[9.0.0+] StartFriendInvitation 8 false
[9.0.0+] StartSendingFriendInvitation 9 false
[9.0.0+] ShowReceivedInvitationDetail 10 false

Usage

User-processes should push a common arguments struct as well as an #Arg struct. See #Type for the commonargs PlayStartupSound flag value. After starting the applet, official sw immediately closes it (no output storage is handled) - except for StartSendingFriendRequest/StartFriendInvitation/StartSendingFriendInvitation which returns an output storage containing the Result.