1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: sleep.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:$ 14 *---------------------------------------------------------------------------*/ 15 16 #ifndef NN_SAMPLE_DEMOS_DEMO2_SLEEP_H_ 17 #define NN_SAMPLE_DEMOS_DEMO2_SLEEP_H_ 18 19 /*------------------------------------------------------------------------* 20 Processing concerning console sleep 21 *------------------------------------------------------------------------*/ 22 class SleepHandler 23 { 24 public: SleepHandler()25 SleepHandler() {} ~SleepHandler()26 ~SleepHandler() {} 27 28 static void Initialize( void ); 29 static void Finalize( void ); 30 static bool IsSleepRequested( void ); 31 static void SleepSystem( void ); 32 33 static AppletQueryReply SleepQueryCallback( uptr arg ); 34 static void AwakeCallback( uptr arg ); 35 36 private: 37 static nn::os::LightEvent s_AwakeEvent; 38 static bool s_IsInitialized; 39 }; 40 41 42 #endif // NN_SAMPLE_DEMOS_DEMO2_SLEEP_H_ 43