diff options
Diffstat (limited to 'src/core/hle/service/ndm/ndm.h')
-rw-r--r-- | src/core/hle/service/ndm/ndm.h | 216 |
1 files changed, 210 insertions, 6 deletions
diff --git a/src/core/hle/service/ndm/ndm.h b/src/core/hle/service/ndm/ndm.h index 734730f8c..5c2b968dc 100644 --- a/src/core/hle/service/ndm/ndm.h +++ b/src/core/hle/service/ndm/ndm.h @@ -12,10 +12,91 @@ class Interface; namespace NDM { +enum class Daemon : u32 { + Cec = 0, + Boss = 1, + Nim = 2, + Friend = 3 +}; + +enum class DaemonMask : u32 { + None = 0, + Cec = (1 << static_cast<u32>(Daemon::Cec)), + Boss = (1 << static_cast<u32>(Daemon::Boss)), + Nim = (1 << static_cast<u32>(Daemon::Nim)), + Friend = (1 << static_cast<u32>(Daemon::Friend)), + Default = Cec | Friend, + All = Cec | Boss | Nim | Friend +}; + +enum class DaemonStatus : u32 { + Busy = 0, + Idle = 1, + Suspending = 2, + Suspended = 3 +}; + +enum class ExclusiveState : u32 { + None = 0, + Infrastructure = 1, + LocalCommunications = 2, + Streetpass = 3, + StreetpassData = 4, +}; + +/** + * NDM::EnterExclusiveState service function + * Inputs: + * 0 : Header code [0x00010042] + * 1 : Exclusive State + * 2 : 0x20 + * Outputs: + * 1 : Result, 0 on success, otherwise error code + */ +void EnterExclusiveState(Service::Interface* self); + +/** + * NDM::LeaveExclusiveState service function + * Inputs: + * 0 : Header code [0x00020002] + * 1 : 0x20 + * Outputs: + * 1 : Result, 0 on success, otherwise error code + */ +void LeaveExclusiveState(Service::Interface* self); + +/** + * NDM::QueryExclusiveMode service function + * Inputs: + * 0 : Header code [0x00030000] + * Outputs: + * 1 : Result, 0 on success, otherwise error code + * 2 : Current Exclusive State + */ +void QueryExclusiveMode(Service::Interface* self); + +/** + * NDM::LockState service function + * Inputs: + * 0 : Header code [0x00040002] + * Outputs: + * 1 : Result, 0 on success, otherwise error code + */ +void LockState(Service::Interface* self); + +/** + * NDM::UnlockState service function + * Inputs: + * 0 : Header code [0x00050002] + * Outputs: + * 1 : Result, 0 on success, otherwise error code + */ +void UnlockState(Service::Interface* self); + /** - * SuspendDaemons + * NDM::SuspendDaemons service function * Inputs: - * 0 : Command header (0x00020082) + * 0 : Header code [0x00060040] * 1 : Daemon bit mask * Outputs: * 1 : Result, 0 on success, otherwise error code @@ -23,9 +104,9 @@ namespace NDM { void SuspendDaemons(Service::Interface* self); /** - * ResumeDaemons + * NDM::ResumeDaemons service function * Inputs: - * 0 : Command header (0x00020082) + * 0 : Header code [0x00070040] * 1 : Daemon bit mask * Outputs: * 1 : Result, 0 on success, otherwise error code @@ -33,15 +114,138 @@ void SuspendDaemons(Service::Interface* self); void ResumeDaemons(Service::Interface* self); /** - * OverrideDefaultDaemons + * NDM::SuspendScheduler service function * Inputs: - * 0 : Command header (0x00020082) + * 0 : Header code [0x00080040] + * Outputs: + * 1 : Result, 0 on success, otherwise error code + */ +void SuspendScheduler(Service::Interface* self); + +/** + * NDM::ResumeScheduler service function + * Inputs: + * 0 : Header code [0x00090000] + * Outputs: + * 1 : Result, 0 on success, otherwise error code + */ +void ResumeScheduler(Service::Interface* self); + +/** + * NDM::QueryStatus service function + * Inputs: + * 0 : Header code [0x000D0040] + * 1 : Daemon + * Outputs: + * 1 : Result, 0 on success, otherwise error code + * 2 : Daemon status + */ +void QueryStatus(Service::Interface* self); + +/** + * NDM::GetDaemonDisableCount service function + * Inputs: + * 0 : Header code [0x000E0040] + * 1 : Daemon + * Outputs: + * 1 : Result, 0 on success, otherwise error code + * 2 : Current process disable count + * 3 : Total disable count + */ +void GetDaemonDisableCount(Service::Interface* self); + +/** + * NDM::GetSchedulerDisableCount service function + * Inputs: + * 0 : Header code [0x000F0000] + * Outputs: + * 1 : Result, 0 on success, otherwise error code + * 2 : Current process disable count + * 3 : Total disable count + */ +void GetSchedulerDisableCount(Service::Interface* self); + +/** + * NDM::SetScanInterval service function + * Inputs: + * 0 : Header code [0x00100040] + * 1 : Interval (default = 30) + * Outputs: + * 1 : Result, 0 on success, otherwise error code + */ +void SetScanInterval(Service::Interface* self); + +/** + * NDM::GetScanInterval service function + * Inputs: + * 0 : Header code [0x00110000] + * Outputs: + * 1 : Result, 0 on success, otherwise error code + * 2 : Interval (default = 30) + */ +void GetScanInterval(Service::Interface* self); + +/** + * NDM::SetRetryInterval service function + * Inputs: + * 0 : Header code [0x00120040] + * 1 : Interval (default = 10) + * Outputs: + * 1 : Result, 0 on success, otherwise error code + */ +void SetRetryInterval(Service::Interface* self); + +/** + * NDM::GetRetryInterval service function + * Inputs: + * 0 : Header code [0x00130000] + * Outputs: + * 1 : Result, 0 on success, otherwise error code + * 2 : Interval (default = 10) + */ +void GetRetryInterval(Service::Interface* self); + + +/** + * NDM::OverrideDefaultDaemons service function + * Inputs: + * 0 : Header code [0x00140040] * 1 : Daemon bit mask * Outputs: * 1 : Result, 0 on success, otherwise error code */ void OverrideDefaultDaemons(Service::Interface* self); +/** + * NDM::ResetDefaultDaemons service function + * Inputs: + * 0 : Header code [0x00150000] + * Outputs: + * 1 : Result, 0 on success, otherwise error code + */ +void ResetDefaultDaemons(Service::Interface* self); + +/** + * NDM::GetDefaultDaemons service function + * Inputs: + * 0 : Header code [0x00160000] + * Outputs: + * 1 : Result, 0 on success, otherwise error code + * 2 : Daemon bit mask + * Note: + * Gets the current default daemon bit mask. The default value is (DAEMONMASK_CEC | DAEMONMASK_FRIENDS) + */ +void GetDefaultDaemons(Service::Interface* self); + +/** + * NDM::ClearHalfAwakeMacFilter service function + * Inputs: + * 0 : Header code [0x00170000] + * Outputs: + * 1 : Result, 0 on success, otherwise error code + */ +void ClearHalfAwakeMacFilter(Service::Interface* self); + /// Initialize NDM service void Init(); |