1 /*---------------------------------------------------------------------------* 2 Project: Horizon 3 File: ndm_Setup.cpp 4 5 Copyright (C)2009 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: 25531 $ 14 *---------------------------------------------------------------------------*/ 15 16 #include <nn/config.h> 17 #include <nn/ndm.h> 18 #include <nn/os.h> 19 20 namespace nn { 21 namespace ndm { 22 23 #define NN_NDM_TIMECHECK 24 SetupDaemonsDefault(void)25void SetupDaemonsDefault(void) 26 { 27 // 検証のため全デーモンを有効のままにする 28 #if 0 29 30 #ifdef NN_NDM_TIMECHECK 31 #ifndef NN_SWITCH_DISABLE_DEBUG_PRINT_FOR_SDK 32 nn::os::Tick tickStart = nn::os::Tick::GetSystemCurrent(); 33 #endif 34 #endif 35 36 Result result = nn::ndm::Initialize(); 37 NN_UTIL_PANIC_IF_FAILED(result); 38 39 #if 1 40 // すべてのデーモン・自律動作を停止。 41 result = nn::ndm::SuspendScheduler(true); 42 #else 43 // フレンドデーモンのみ停止。アクセスポイントやゾーンのスキャンは行う 44 result = nn::ndm::SuspendDaemons(); 45 #endif 46 if (result.IsFailure()) 47 { 48 NN_TLOG_("Failed to suspend daemons.\n"); 49 nn::dbg::PrintResult(result); 50 } 51 #ifdef NN_NDM_TIMECHECK 52 NN_TLOG_("All network daemons are disabled by default at this time. (took %lldms)\n", (nn::os::Tick::GetSystemCurrent() - tickStart).ToTimeSpan().GetMilliSeconds()); 53 #endif 54 55 #endif 56 } 57 58 } // end of namespace ndm 59 } // end of namespace nn 60