Switch 2: Chat services: Difference between revisions
| (6 intermediate revisions by the same user not shown) | |||
| Line 18: | Line 18: | ||
| 10 || | | 10 || | ||
|- | |- | ||
| 11 || | | 11 || [[#GetRoomInfo|GetRoomInfo]] | ||
|- | |- | ||
| 14 || | | 14 || GetLocalCameraImageProcessingMode | ||
|- | |- | ||
| 15 || | | 15 || SetLocalCameraZoomMagnification | ||
|- | |- | ||
| 16 || | | 16 || GetLocalCameraZoomMagnification | ||
|- | |- | ||
| 20 || | | 20 || | ||
|- | |- | ||
| 21 || | | 21 || SetScreenSharingDisallowList | ||
|- | |- | ||
| 22 || | | 22 || ClearScreenSharingDisallowList | ||
|- | |- | ||
| 23 || | | 23 || SetScreenSharingMode | ||
|- | |- | ||
| 40 || | | 40 || GetRealtimeAudioLevels | ||
|- | |- | ||
| 51 || | | 51 || CalculateRequiredAudioStreamWorkBufferSize | ||
|- | |- | ||
| 60 || | | 60 || SetSharingKey | ||
|- | |- | ||
| 61 || | | 61 || ClearSharingKey | ||
|- | |- | ||
| 70 || | | 70 || | ||
| Line 54: | Line 54: | ||
== Cmd2 == | == Cmd2 == | ||
No input, returns an [[#IUserLayoutCustomizationShimScopedObject|IUserLayoutCustomizationShimScopedObject]]. | No input, returns an [[#IUserLayoutCustomizationShimScopedObject|IUserLayoutCustomizationShimScopedObject]]. | ||
== Cmd10 == | |||
No input, returns an output u8. | |||
== GetRoomInfo == | |||
Takes a type-0x1A output buffer containing a [[#RoomInfo|RoomInfo]]. | |||
Official sw also exposes this as GetChattingUid, with data being extracted from the cmd output. | |||
== Cmd70 == | |||
Takes a 0x10-byte input struct, returns an output u8. | |||
Official sw uses this prior to launching the relevant applet with ForChatStart (applet is only launched if cmd output is non-zero). | |||
== Cmd71 == | |||
No input, returns an output u8. | |||
Official sw uses this prior to launching the relevant applet with ForCameraSharingGuide (applet is only launched if cmd output is non-zero). | |||
== Cmd72 == | |||
Takes an input u8, returns an output u8. | |||
Official sw uses this prior to launching the relevant applet with ForCameraConfiguration (applet is only launched if cmd output is non-zero). | |||
== IUserShimScopedObject == | == IUserShimScopedObject == | ||
| Line 64: | Line 87: | ||
| 1 || | | 1 || | ||
|- | |- | ||
| 2 || | | 2 || [[#AttachToRoomInfoChangedEvent|AttachToRoomInfoChangedEvent]] | ||
|- | |- | ||
| 3 || | | 3 || [[#AttachToLocalCameraImageProcessingModeChangedEvent|AttachToLocalCameraImageProcessingModeChangedEvent]] | ||
|- | |- | ||
| 4 || | | 4 || [[#AttachToLocalCameraZoomMagnificationChangedEvent|AttachToLocalCameraZoomMagnificationChangedEvent]] | ||
|- | |- | ||
| 10 || | | 10 || StartLocalCameraStreaming | ||
|- | |- | ||
| 11 || | | 11 || StopLocalCameraStreaming | ||
|- | |- | ||
| 20 || | | 20 || StartRemoteCameraStreaming | ||
|- | |- | ||
| 21 || | | 21 || StopRemoteCameraStreaming | ||
|- | |- | ||
| 30 || | | 30 || CreateAudioStreamWorkBuffer | ||
|- | |- | ||
| 31 || | | 31 || DestroyAudioStreamWorkBuffer | ||
|- | |- | ||
| 32 || | | 32 || GetAudioStreamCapacityFrameCount | ||
|- | |- | ||
| 33 || | | 33 || StartAudioStreamRecording | ||
|- | |- | ||
| 34 || | | 34 || StopAudioStreamRecording | ||
|- | |- | ||
| 35 || | | 35 || GetAudioStreamFreeFrameCount | ||
|- | |- | ||
| 36 || | | 36 || GetAudioStreamFilledFrameCount | ||
|- | |- | ||
| 37 || | | 37 || ReadAudioStream | ||
|} | |} | ||
=== Cmd1 === | |||
No input, returns an output Event handle with EventClearMode=0. | |||
This Event is used by official sw IsChatting. | |||
=== AttachToRoomInfoChangedEvent === | |||
No input, returns an output Event handle with EventClearMode=0. | |||
=== AttachToLocalCameraImageProcessingModeChangedEvent === | |||
No input, returns an output Event handle with EventClearMode=0. | |||
=== AttachToLocalCameraZoomMagnificationChangedEvent === | |||
No input, returns an output Event handle with EventClearMode=0. | |||
== IUserLayoutCustomizationShimScopedObject == | == IUserLayoutCustomizationShimScopedObject == | ||
This is "nn::chat::IUserLayoutCustomizationShimScopedObject". | This is "nn::chat::IUserLayoutCustomizationShimScopedObject". | ||
Official sw from BeginFullScreenWithLocalCameraAvailableSection uses cmd20 cmd10, cmd11, cmd13 (the exact cmds used depends on input). Depending on input, this may also launch the relevant applet with ForFullScreen. | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
| Line 102: | Line 141: | ||
! Cmd || Name | ! Cmd || Name | ||
|- | |- | ||
| 0 || | | 0 || [[#Initialize|Initialize]] | ||
|- | |- | ||
| 1 || | | 1 || | ||
| Line 110: | Line 149: | ||
| 11 || | | 11 || | ||
|- | |- | ||
| 12 || | | 12 || [[#EndFullScreenWithLocalCameraAvailableSection|EndFullScreenWithLocalCameraAvailableSection]] | ||
|- | |- | ||
| 13 || | | 13 || | ||
| Line 116: | Line 155: | ||
| 20 || | | 20 || | ||
|} | |} | ||
=== Initialize === | |||
Takes a PID, an input u64 pid_reserved, no output. | |||
=== Cmd1 === | |||
No input, returns an output Event handle with EventClearMode=0. | |||
Used by official sw immediately after [[#Initialize|Initialize]]. | |||
=== Cmd10 === | |||
No input/output. | |||
=== Cmd11 === | |||
No input, returns an output u64. | |||
=== EndFullScreenWithLocalCameraAvailableSection === | |||
No input/output. | |||
=== Cmd13 === | |||
No input, returns an output u8 and a 0x10-byte struct. | |||
=== Cmd20 === | |||
No input, returns an output u8. | |||
= chat:ps = | = chat:ps = | ||
| Line 176: | Line 238: | ||
= chat:set = | = chat:set = | ||
= RoomInfo = | |||
This is "nn::chat::RoomInfo". | |||
This is a 0xF0-byte struct. | |||
{| class="wikitable" border="1" | |||
|- | |||
! Offset | |||
! Size | |||
! Description | |||
|- | |||
| 0x0 || 0x18 || | |||
|- | |||
| 0x18 || 0x10 || ChattingUid | |||
|- | |||
| 0x28 || 0xC8 || | |||
|} | |||
[[Category:Services]] | [[Category:Services]] | ||
Latest revision as of 22:05, 9 April 2026
These services are S2-only.
chat:a
chat:u
This is "nn::chat::IUserService".
Official sw uses domains with this.
| Cmd | Name |
|---|---|
| 0 | |
| 2 | |
| 10 | |
| 11 | GetRoomInfo |
| 14 | GetLocalCameraImageProcessingMode |
| 15 | SetLocalCameraZoomMagnification |
| 16 | GetLocalCameraZoomMagnification |
| 20 | |
| 21 | SetScreenSharingDisallowList |
| 22 | ClearScreenSharingDisallowList |
| 23 | SetScreenSharingMode |
| 40 | GetRealtimeAudioLevels |
| 51 | CalculateRequiredAudioStreamWorkBufferSize |
| 60 | SetSharingKey |
| 61 | ClearSharingKey |
| 70 | |
| 71 | |
| 72 |
Cmd0
No input, returns an IUserShimScopedObject.
Cmd2
No input, returns an IUserLayoutCustomizationShimScopedObject.
Cmd10
No input, returns an output u8.
GetRoomInfo
Takes a type-0x1A output buffer containing a RoomInfo.
Official sw also exposes this as GetChattingUid, with data being extracted from the cmd output.
Cmd70
Takes a 0x10-byte input struct, returns an output u8.
Official sw uses this prior to launching the relevant applet with ForChatStart (applet is only launched if cmd output is non-zero).
Cmd71
No input, returns an output u8.
Official sw uses this prior to launching the relevant applet with ForCameraSharingGuide (applet is only launched if cmd output is non-zero).
Cmd72
Takes an input u8, returns an output u8.
Official sw uses this prior to launching the relevant applet with ForCameraConfiguration (applet is only launched if cmd output is non-zero).
IUserShimScopedObject
This is "nn::chat::IUserShimScopedObject".
| Cmd | Name |
|---|---|
| 1 | |
| 2 | AttachToRoomInfoChangedEvent |
| 3 | AttachToLocalCameraImageProcessingModeChangedEvent |
| 4 | AttachToLocalCameraZoomMagnificationChangedEvent |
| 10 | StartLocalCameraStreaming |
| 11 | StopLocalCameraStreaming |
| 20 | StartRemoteCameraStreaming |
| 21 | StopRemoteCameraStreaming |
| 30 | CreateAudioStreamWorkBuffer |
| 31 | DestroyAudioStreamWorkBuffer |
| 32 | GetAudioStreamCapacityFrameCount |
| 33 | StartAudioStreamRecording |
| 34 | StopAudioStreamRecording |
| 35 | GetAudioStreamFreeFrameCount |
| 36 | GetAudioStreamFilledFrameCount |
| 37 | ReadAudioStream |
Cmd1
No input, returns an output Event handle with EventClearMode=0.
This Event is used by official sw IsChatting.
AttachToRoomInfoChangedEvent
No input, returns an output Event handle with EventClearMode=0.
AttachToLocalCameraImageProcessingModeChangedEvent
No input, returns an output Event handle with EventClearMode=0.
AttachToLocalCameraZoomMagnificationChangedEvent
No input, returns an output Event handle with EventClearMode=0.
IUserLayoutCustomizationShimScopedObject
This is "nn::chat::IUserLayoutCustomizationShimScopedObject".
Official sw from BeginFullScreenWithLocalCameraAvailableSection uses cmd20 cmd10, cmd11, cmd13 (the exact cmds used depends on input). Depending on input, this may also launch the relevant applet with ForFullScreen.
| Cmd | Name |
|---|---|
| 0 | Initialize |
| 1 | |
| 10 | |
| 11 | |
| 12 | EndFullScreenWithLocalCameraAvailableSection |
| 13 | |
| 20 |
Initialize
Takes a PID, an input u64 pid_reserved, no output.
Cmd1
No input, returns an output Event handle with EventClearMode=0.
Used by official sw immediately after Initialize.
Cmd10
No input/output.
Cmd11
No input, returns an output u64.
EndFullScreenWithLocalCameraAvailableSection
No input/output.
Cmd13
No input, returns an output u8 and a 0x10-byte struct.
Cmd20
No input, returns an output u8.
chat:ps
chat:sp
chat:dbg
chat:wu
This is "nn::chat::IWebUserService".
| Cmd | Name |
|---|---|
| 1 |
Cmd1
No input. Returns an IWebUserShimScopedObject.
IWebUserShimScopedObject
This is "nn::chat::IWebUserShimScopedObject".
| Cmd | Name |
|---|---|
| 1 | |
| 2 | |
| 3 |
Cmd0
No input, returns an output u8.
Cmd1
No input, returns an output Event handle with EventClearMode=0.
Cmd2
No input, returns an output u32.
chat:sa
chat:ch
chat:ds
chat:alb
chat:con
chat:myp
chat:hdr
chat:nxs
chat:set
RoomInfo
This is "nn::chat::RoomInfo".
This is a 0xF0-byte struct.
| Offset | Size | Description |
|---|---|---|
| 0x0 | 0x18 | |
| 0x18 | 0x10 | ChattingUid |
| 0x28 | 0xC8 |