1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     applet_Wrapper.h
4 
5   Copyright (C)2009-2012 Nintendo Co., Ltd.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law.  They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Rev: 46347 $
14  *---------------------------------------------------------------------------*/
15 
16 #ifndef NN_APPLET_CTR_APPLET_WRAPPER_H_
17 #define NN_APPLET_CTR_APPLET_WRAPPER_H_
18 
19 #include <nn/os.h>
20 #include <nn/applet/CTR/applet_Parameters.h>
21 #include <nn/applet/CTR/applet_API.h>
22 
23 namespace nn {
24 namespace applet {
25 namespace CTR {
26 namespace detail {
27 
28     AppletWakeupState WaitForStarting( AppletId* pSenderId=NULL, u8* pParam=NULL, size_t paramSize=0, s32* pReadLen=NULL,
29                                        nn::Handle *pHandle=NULL, nn::fnd::TimeSpan span=NN_APPLET_WAIT_INFINITE );
30     bool ProcessHomeButton(void);
31 }
32 }
33 }
34 }
35 
36 namespace nn {
37 namespace applet {
38 namespace CTR {
39 /* Please see man pages for details
40 
41 
42  */
43     /* Please see man pages for details
44 
45 
46      */
47     AppletHomeButtonState GetHomeButtonState(void);
48 
49     /* Please see man pages for details
50 
51      */
52     void ClearHomeButtonState(void);
53 
54     /* Please see man pages for details
55 
56 
57      */
58     bool IsExpectedToProcessHomeButton(void);
59 
60     /* Please see man pages for details
61 
62 
63      */
ProcessHomeButton(void)64     inline bool ProcessHomeButton(void)
65     {
66         return detail::ProcessHomeButton();
67     }
68 
69     /* Please see man pages for details
70 
71      */
72     void ProcessHomeButtonAndWait();
73 /*
74 
75 */
76 
77 /* Please see man pages for details
78 
79 
80  */
81     /* Please see man pages for details
82 
83 
84      */
85     bool ProcessPowerButton(void);
86 
87     /* Please see man pages for details
88 
89      */
90     void ProcessPowerButtonAndWait();
91 /*
92 
93 */
94 
95 /* Please see man pages for details
96 
97 
98  */
99     /* Please see man pages for details
100 
101 
102      */
103     bool IsExpectedToReplySleepQuery(void);
104 
105     /* Please see man pages for details
106 
107 
108      */
109     void ReplySleepQuery( AppletQueryReply reply );
110 
111     /* Please see man pages for details
112 
113 
114      */
115     void EnableSleep( bool isSleepCheck=nn::applet::CTR::SLEEP_IF_SHELL_CLOSED );
116 
117     /* Please see man pages for details
118 
119 
120 
121      */
122     void DisableSleep( bool isReplyReject=nn::applet::CTR::REPLY_REJECT_IF_LATER );
123 
124     /* Please see man pages for details
125 
126 
127 
128 
129 
130 
131      */
132     bool IsEnableSleep();
133 /*
134 
135 */
136 
137 
138 /* Please see man pages for details
139 
140 
141  */
142     /* Please see man pages for details
143 
144 
145 
146      */
147     void SetHomeButtonCallback( AppletHomeButtonCallback callback, uptr arg=0 );
148 
149     /* Please see man pages for details
150 
151 
152 
153      */
154     void SetPowerButtonCallback( AppletPowerButtonCallback callback, uptr arg=0 );
155 
156     /* Please see man pages for details
157 
158 
159 
160      */
161     void SetSleepQueryCallback( AppletSleepQueryCallback callback, uptr arg=0 );
162 
163     /* Please see man pages for details
164 
165 
166 
167      */
168     void SetSleepCanceledCallback( AppletSleepCanceledCallback callback, uptr arg=0 );
169 
170     /* Please see man pages for details
171 
172 
173 
174      */
175     void SetAwakeCallback( AppletAwakeCallback callback, uptr arg=0 );
176 /*
177 
178 */
179 
180 /* Please see man pages for details
181 
182 
183  */
184     /* Please see man pages for details
185 
186 
187 
188 
189 
190 
191 
192 
193 
194 
195      */
196     inline AppletWakeupState WaitForStarting( AppletId* pSenderId=NULL, u8* pParam=NULL, size_t paramSize=0, s32* pReadLen=NULL,
197                                               nn::Handle *pHandle=NULL, nn::fnd::TimeSpan timeout=NN_APPLET_WAIT_INFINITE )
198     {
199         return detail::WaitForStarting( pSenderId, pParam, paramSize, pReadLen, pHandle, timeout );
200     }
201 /*
202 
203 */
204 
205 /* Please see man pages for details
206 
207 
208  */
209     /* Please see man pages for details
210 
211 
212 
213      */
214     bool IsAppletPreloaded( AppletId id );
215 
216     /* Please see man pages for details
217 
218 
219      */
220     void WaitForAppletPreloaded( AppletId id );
221 /*
222 
223 */
224 }
225 }
226 }
227 
228 #endif  // ifndef NN_APPLET_CTR_APPLET_WRAPPER_H_
229