| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256 |
- // Copyright 2016 Citra Emulator Project
- // Licensed under GPLv2 or any later version
- // Refer to the license.txt file included.
- #pragma once
- #include "common/common_types.h"
- namespace Service {
- 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);
- /**
- * NDM::SuspendDaemons service function
- * Inputs:
- * 0 : Header code [0x00060040]
- * 1 : Daemon bit mask
- * Outputs:
- * 1 : Result, 0 on success, otherwise error code
- */
- void SuspendDaemons(Service::Interface* self);
- /**
- * NDM::ResumeDaemons service function
- * Inputs:
- * 0 : Header code [0x00070040]
- * 1 : Daemon bit mask
- * Outputs:
- * 1 : Result, 0 on success, otherwise error code
- */
- void ResumeDaemons(Service::Interface* self);
- /**
- * NDM::SuspendScheduler service function
- * Inputs:
- * 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();
- /// Shutdown NDM service
- void Shutdown();
- }// namespace NDM
- }// namespace Service
|