1 /*--------------------------------------------------------------------------
2   Project:  Horizon
3   File:     rdt_Misc.h
4 
5   Copyright (C)2010 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: 28630 $
14  *-------------------------------------------------------------------------*/
15 
16 ////#include <stdafx.h>
17 
18 #ifndef NN_RDT_MISC_H_
19 #define NN_RDT_MISC_H_
20 
21 
22 #include <nn/rdt/CTR/rdt_define.h>
23 
24 #include <nn/types.h>
25 #include <nn/Result.h>
26 
27 
28 namespace nn { namespace rdt { namespace CTR {
29 
30 /*
31     @brief ログをいっさい出力しないことを示す定数です。
32 */
33     const bit32 LOG_LEVEL_NONE = 0x00000000;
34 
35 /*
36     @brief 全てのログを出力することを示す定数です。
37 */
38     const bit32 LOG_LEVEL_ALL  = 0xffffffff;
39 
40 /*!
41     @brief  RDTライブラリのログ出力レベル設定を行います。
42 
43             デフォルトでは、RDTライブラリはログを出力しない設定にセットされています。
44             RDTライブラリの不具合などを調査する際に、事前に
45             nn::rdt::CTR::SetLogLevel(nn::rdt::CTR::LOG_LEVEL_ALL);
46             を呼び出し、ログ出力を有効にしておくと、RDTライブラリのデバッグに
47             役立てることができます。
48             現時点でのログ出力レベル設定は、「ログを一切出力しない」と
49             「ログを全て出力する」の2つしか設定できませんが、将来的には
50             ログ出力を細分化する可能性があります。
51 
52     @return 有効な引数を与えれば、@ref ResultSuccess が返ります。
53             無効な引数を与えた場合には、@ref ResultInvalidValue が返されます。
54  */
55     nn::Result SetLogLevel(bit32 level);
56 
57 
58 /*!
59     @brief  RDTライブラリに設定されているログ出力レベルを取得します。
60 
61             デフォルトでは、RDTライブラリはログを出力しない設定にセットされています。
62 
63     @return 現時点でのログ出力レベルが返されます。
64  */
65     bit32 GetLogLevel(void);
66 
67 
68 }}} // namespace nn::rdt::CTR
69 
70 #endif  // end of NN_RDT_MISC_H_
71