/*---------------------------------------------------------------------------* Project: Horizon File: ndm_Setup.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: 25531 $ *---------------------------------------------------------------------------*/ #include #include #include namespace nn { namespace ndm { #define NN_NDM_TIMECHECK void SetupDaemonsDefault(void) { // 検証のため全デーモンを有効のままにする #if 0 #ifdef NN_NDM_TIMECHECK #ifndef NN_SWITCH_DISABLE_DEBUG_PRINT_FOR_SDK nn::os::Tick tickStart = nn::os::Tick::GetSystemCurrent(); #endif #endif Result result = nn::ndm::Initialize(); NN_UTIL_PANIC_IF_FAILED(result); #if 1 // すべてのデーモン・自律動作を停止。 result = nn::ndm::SuspendScheduler(true); #else // フレンドデーモンのみ停止。アクセスポイントやゾーンのスキャンは行う result = nn::ndm::SuspendDaemons(); #endif if (result.IsFailure()) { NN_TLOG_("Failed to suspend daemons.\n"); nn::dbg::PrintResult(result); } #ifdef NN_NDM_TIMECHECK NN_TLOG_("All network daemons are disabled by default at this time. (took %lldms)\n", (nn::os::Tick::GetSystemCurrent() - tickStart).ToTimeSpan().GetMilliSeconds()); #endif #endif } } // end of namespace ndm } // end of namespace nn