1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
|
// 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
|