Difference between revisions of "Capmtp services"

From Nintendo Switch Brew
Jump to navigation Jump to search
Line 19: Line 19:
 
! Cmd || Name || Notes
 
! Cmd || Name || Notes
 
|-
 
|-
| 0 || ||
+
| 0 || || Takes a u32 max folder count, a u32 max image count, a u32 max video count, a transfer memory handle + u32 size and a type-0x5 buffer translated "Other" string.
 
|-
 
|-
 
| 1 || || No input or output.
 
| 1 || || No input or output.
Line 41: Line 41:
 
== Notes ==
 
== Notes ==
 
Only operation calls 0x1001-0x100A are available.
 
Only operation calls 0x1001-0x100A are available.
 +
 +
While this has access to [[Filesystem_services#fsp-srv|fsp-srv]] it remains unused.
 +
Images and Videos are loaded with [[Capture_services#caps:a|caps:a]].
 +
 +
Program names are loaded with [[NS_Services|ns]] using the transfer memory from Cmd0.

Revision as of 17:58, 1 December 2020

This implements the MTP PTP protocol[1].

capmtp

This is "nn::capmtp::ICapmtpRootSession".

Cmd Name Notes
0 No input. Returns a session of #ICapmtpInterface

ICapmtpInterface

This is "nn::capmtp::ICapmtpInterface".

Cmd Name Notes
0 Takes a u32 max folder count, a u32 max image count, a u32 max video count, a transfer memory handle + u32 size and a type-0x5 buffer translated "Other" string.
1 No input or output.
2 No input or output. Starts MTP command handler "nn.capmtp.CapmtpCommandLoop".
3 No input or output. Stops "nn.capmtp.CapmtpCommandLoop".
4 No input. Returns true if "nn.capmtp.CapmtpCommandLoop" is running.
5 No input. Returns readable event handle.
6 No input. Returns a boolean.
7 No input. Returns readable event handle.
8 No input or output.

Notes

Only operation calls 0x1001-0x100A are available.

While this has access to fsp-srv it remains unused. Images and Videos are loaded with caps:a.

Program names are loaded with ns using the transfer memory from Cmd0.