diff options
| author | 2014-04-13 16:33:45 -0400 | |
|---|---|---|
| committer | 2014-04-13 16:33:45 -0400 | |
| commit | 9f4d677cdf1fcc937d2e68cae3f52f53c24582f8 (patch) | |
| tree | 8d92dbc0b8e568dd67649511c070b31e7ca5d125 /src/core/hle/service/apt.h | |
| parent | renamed class Interface_SRV to SRV (diff) | |
| download | yuzu-9f4d677cdf1fcc937d2e68cae3f52f53c24582f8.tar.gz yuzu-9f4d677cdf1fcc937d2e68cae3f52f53c24582f8.tar.xz yuzu-9f4d677cdf1fcc937d2e68cae3f52f53c24582f8.zip | |
added framework for APT service (application and title launching service)
Diffstat (limited to 'src/core/hle/service/apt.h')
| -rw-r--r-- | src/core/hle/service/apt.h | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/src/core/hle/service/apt.h b/src/core/hle/service/apt.h new file mode 100644 index 000000000..05c544378 --- /dev/null +++ b/src/core/hle/service/apt.h | |||
| @@ -0,0 +1,71 @@ | |||
| 1 | // Copyright 2014 Citra Emulator Project | ||
| 2 | // Licensed under GPLv2 | ||
| 3 | // Refer to the license.txt file included. | ||
| 4 | |||
| 5 | #pragma once | ||
| 6 | |||
| 7 | #include "core/hle/service/service.h" | ||
| 8 | |||
| 9 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 10 | // Namespace Service | ||
| 11 | |||
| 12 | namespace Service { | ||
| 13 | |||
| 14 | // Application and title launching service. These services handle signaling for home/power button as | ||
| 15 | // well. Only one session for either APT service can be open at a time, normally processes close the | ||
| 16 | // service handle immediately once finished using the service. The commands for APT:U and APT:S are | ||
| 17 | // exactly the same, however certain commands are only accessible with APT:S(NS module will call | ||
| 18 | // svcBreak when the command isn't accessible). See http://3dbrew.org/wiki/NS#APT_Services. | ||
| 19 | |||
| 20 | class APT : public Interface { | ||
| 21 | public: | ||
| 22 | |||
| 23 | APT() { | ||
| 24 | } | ||
| 25 | |||
| 26 | ~APT() { | ||
| 27 | } | ||
| 28 | |||
| 29 | enum { | ||
| 30 | CMD_OFFSET = 0x00000080, | ||
| 31 | |||
| 32 | CMD_HEADER_INIT = 0x00020080, ///< Initialize service | ||
| 33 | CMD_HEADER_GET_LOCK_HANDLE = 0x00010040, ///< Get service Mutex | ||
| 34 | CMD_HEADER_ENABLE = 0x00030040, ///< Enable service | ||
| 35 | CMD_HEADER_INQUIRE_NOTIFICATION = 0x000B0040, ///< Inquire notification | ||
| 36 | CMD_HEADER_PREPARE_TO_JUMP_TO_HOME_MENU = 0x002B0000, ///< Prepare to jump to home menu | ||
| 37 | CMD_HEADER_JUMP_TO_HOME_MENU = 0x002C0044, ///< Jump to home menu | ||
| 38 | CMD_HEADER_NOTIFY_TO_WAIT = 0x00430040, ///< Notify to wait | ||
| 39 | CMD_HEADER_APPLET_UTILITY = 0x004B00C2, ///< Applet utility | ||
| 40 | CMD_HEADER_GLANCE_PARAMETER = 0x000E0080, ///< Glance parameter | ||
| 41 | CMD_HEADER_RECEIVE_PARAMETER = 0x000D0080, ///< Receive parameter | ||
| 42 | CMD_HEADER_REPLY_SLEEP_QUERY = 0x003E0080, ///< Reply sleep query | ||
| 43 | CMD_HEADER_PREPARE_TO_CLOSE_APP = 0x00220040, ///< Prepare to close application | ||
| 44 | CMD_HEADER_CLOSE_APP = 0x00270044, ///< Close application | ||
| 45 | }; | ||
| 46 | |||
| 47 | /** | ||
| 48 | * Gets the string name used by CTROS for the APT service | ||
| 49 | * @return String name of service | ||
| 50 | */ | ||
| 51 | std::string GetName() const { | ||
| 52 | return "APT"; | ||
| 53 | } | ||
| 54 | |||
| 55 | /** | ||
| 56 | * Gets the string port name used by CTROS for the APT service | ||
| 57 | * @return Port name of service | ||
| 58 | */ | ||
| 59 | std::string GetPortName() const { | ||
| 60 | return "APT:U"; | ||
| 61 | } | ||
| 62 | |||
| 63 | /** | ||
| 64 | * Called when svcSendSyncRequest is called, loads command buffer and executes comand | ||
| 65 | * @return Return result of svcSendSyncRequest passed back to user app | ||
| 66 | */ | ||
| 67 | virtual Syscall::Result Sync(); | ||
| 68 | |||
| 69 | }; | ||
| 70 | |||
| 71 | } // namespace | ||