aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/hle/service/apt/apt.h
diff options
context:
space:
mode:
authorGravatar Subv <subv2112@gmail.com>2015-05-25 23:30:20 -0500
committerGravatar Subv <subv2112@gmail.com>2015-07-11 21:47:22 -0500
commit2a6ebadf66051362cdcf07d722f7e2d3cee14c82 (patch)
treef016b2ee81df95aabccc426762c42073d645803c /src/core/hle/service/apt/apt.h
parentb0d72e3de1ec2350716300c86bc02930893e9e23 (diff)
HLE/APT: Initial HLE support for applets.
Currently only the SWKBD is emulated, and there's currently no way to ask the user for input, so it always returns "Subv" as the text.
Diffstat (limited to 'src/core/hle/service/apt/apt.h')
-rw-r--r--src/core/hle/service/apt/apt.h49
1 files changed, 48 insertions, 1 deletions
diff --git a/src/core/hle/service/apt/apt.h b/src/core/hle/service/apt/apt.h
index a03e1712..510193cc 100644
--- a/src/core/hle/service/apt/apt.h
+++ b/src/core/hle/service/apt/apt.h
@@ -11,6 +11,23 @@
namespace Service {
namespace APT {
+/// Holds information about the parameters used in Send/Glance/ReceiveParameter
+struct MessageParameter {
+ u32 sender_id = 0;
+ u32 destination_id = 0;
+ u32 signal = 0;
+ u32 buffer_size = 0;
+ Kernel::SharedPtr<Kernel::Object> object = nullptr;
+ u8* data = nullptr;
+};
+
+/// Holds information about the parameters used in StartLibraryApplet
+struct AppletStartupParameter {
+ u32 buffer_size = 0;
+ Kernel::SharedPtr<Kernel::Object> object = nullptr;
+ u8* data = nullptr;
+};
+
/// Signals used by APT functions
enum class SignalType : u32 {
None = 0x0,
@@ -23,7 +40,7 @@ enum class SignalType : u32 {
};
/// App Id's used by APT functions
-enum class AppID : u32 {
+enum class AppletId : u32 {
HomeMenu = 0x101,
AlternateMenu = 0x103,
Camera = 0x110,
@@ -45,6 +62,9 @@ enum class AppID : u32 {
SoftwareKeyboard2 = 0x401,
};
+/// Send a parameter to the currently-running application, which will read it via ReceiveParameter
+void SendParameter(MessageParameter const& parameter);
+
/**
* APT::Initialize service function
* Service function that initializes the APT process for the running application
@@ -249,6 +269,33 @@ void SetAppCpuTimeLimit(Service::Interface* self);
*/
void GetAppCpuTimeLimit(Service::Interface* self);
+/**
+ * APT::PrepareToStartLibraryApplet service function
+ * Inputs:
+ * 0 : Command header [0x00180040]
+ * 1 : Id of the applet to start
+ * Outputs:
+ * 0 : Return header
+ * 1 : Result of function, 0 on success, otherwise error code
+ */
+void PrepareToStartLibraryApplet(Service::Interface* self);
+
+/**
+ * APT::StartLibraryApplet service function
+ * Inputs:
+ * 0 : Command header [0x001E0084]
+ * 1 : Id of the applet to start
+ * 2 : Buffer size
+ * 3 : Always 0?
+ * 4 : Handle passed to the applet
+ * 5 : (Size << 14) | 2
+ * 6 : Input buffer virtual address
+ * Outputs:
+ * 0 : Return header
+ * 1 : Result of function, 0 on success, otherwise error code
+ */
+void StartLibraryApplet(Service::Interface* self);
+
/// Initialize the APT service
void Init();