/*---------------------------------------------------------------------------* Project: Horizon File: ndm_UserControl.cpp Copyright (C)2009 Nintendo Co., Ltd. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Rev: 23325 $ *---------------------------------------------------------------------------*/ #include #include #include #include #include #include #include namespace nn { namespace ndm { using namespace CTR; using namespace CTR::detail; State GetCurrentState( void ) { s32 s; NN_UTIL_PANIC_IF_FAILED(Interface::GetCurrentState(&s)); return static_cast(s); } State GetTargetState( void ) { s32 s; NN_UTIL_PANIC_IF_FAILED(Interface::GetTargetState(&s)); return static_cast(s); } void GetStateChangedEvent( nn::os::Event& event ) { Handle hEvent; NN_UTIL_PANIC_IF_FAILED(Interface::GetStateChangedEvent(&hEvent)); nn::os::HandleManager::AttachHandle(&event, hEvent); } IDaemon::Status GetDaemonStatus( DaemonName name ) { s32 s; NN_UTIL_PANIC_IF_FAILED(Interface::QueryStatus(name, &s)); return static_cast(s); } void GetDaemonDisableCount( DaemonName name, s32& count, s32& countTotal ) { NN_UTIL_PANIC_IF_FAILED(Interface::GetDaemonDisableCount(name, &count, &countTotal)); } void GetSchedulerDisableCount( s32& count, s32& countTotal ) { NN_UTIL_PANIC_IF_FAILED(Interface::GetSchedulerDisableCount(&count, &countTotal)); } s32 GetScanInterval( void ) { s32 interval; NN_UTIL_PANIC_IF_FAILED(Interface::GetScanInterval(&interval)); return interval; } void SetScanInterval( s32 interval ) { NN_UTIL_PANIC_IF_FAILED(Interface::SetScanInterval(interval)); } s32 GetRetryInterval( void ) { s32 interval; NN_UTIL_PANIC_IF_FAILED(Interface::GetRetryInterval(&interval)); return interval; } void SetRetryInterval( s32 interval ) { NN_UTIL_PANIC_IF_FAILED(Interface::SetRetryInterval(interval)); } } // end of namespace ndm } // end of namespace nn