/*---------------------------------------------------------------------------* Project: Horizon File: ndm_IDaemon.h 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: 22530 $ *---------------------------------------------------------------------------*/ #ifndef NN_NDM_IDAEMON_H_ #define NN_NDM_IDAEMON_H_ #include #include #ifdef __cplusplus namespace nn{ namespace ndm{ class IDaemon { public: enum Status { STATUS_WORKING, STATUS_IDLE, STATUS_SUSPENDING, STATUS_SUSPENDED }; virtual Result Attach(nn::os::Event& event) = 0; virtual Result Detach(void) = 0; // デーモンの動作を許可する。 // 動作を許可されたデーモンは無線などのネットワーク機能を使い始めることができる。 virtual Result Resume(void) = 0; // デーモンの動作を停止する。 // デーモンは要求を受け付けたら処理を返す前に状態を STATUS_SUSPENDING にする。 // 完全に通信処理が終わったら状態を STATUS_SUSPENDED にする。 virtual Result SuspendAsync(bool bImmediate) = 0; virtual Result QueryStatus(Status& status) = 0; virtual Result QueryIsHalfAwakeTriggered(bool& bTriggered) { bTriggered = false; return ResultSuccess(); } }; } } #endif // __cplusplus #endif // NN_NDM_IDAEMON_H_