1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     cfg_Api.h
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: 26389 $
14  *---------------------------------------------------------------------------*/
15 
16 #ifndef NN_CFG_CTR_CFG_API_H_
17 #define NN_CFG_CTR_CFG_API_H_
18 
19 /*! @file
20     @brief    本体設定に関するAPIの宣言
21 
22     :include nn/cfg.h
23 */
24 
25 #include <nn/cfg/CTR/cfg_UserInfo.h>
26 #include <nn/cfg/CTR/cfg_LanguageCode.h>
27 #include <nn/cfg/CTR/cfg_CountryCode.h>
28 #include <nn/cfg/CTR/cfg_RegionCode.h>
29 #include <nn/cfg/CTR/cfg_Sound.h>
30 #include <nn/Result.h>
31 
32 #ifdef __cplusplus
33 
34 namespace nn {
35 namespace cfg {
36 namespace CTR {
37 
38 /*!
39     @brief        設定ライブラリを初期化します。
40 
41     @return       なし。
42 */
43 void Initialize(void);
44 
45 /*!
46     @brief        設定ライブラリを終了します。
47 
48     @return       なし。
49 */
50 void Finalize(void);
51 
52 /*!
53     @brief        ユーザ名を取得します。
54 
55     @param[out]   pUserName 取得したユーザ名と NG ワードフラグが格納されます。
56 
57     @return       なし。
58 */
59 void GetUserName(UserName* pUserName);
60 
61 /*!
62     @brief        誕生日を取得します。
63 
64     @param[out]   pBirthday 取得した誕生日が格納されます。
65 
66     @return       なし。
67 */
68 void GetBirthday(Birthday* pBirthday);
69 
70 /*!
71     @brief        国および地域コードを取得します。
72 
73     @return       取得結果が返ります。
74 */
75 CfgCountryCode GetCountry(void);
76 
77 /*!
78     @brief        国および地域コードを ISO 3166-1 alpha-2 に変換します。
79 
80     @param[in]    cfgCountryCode    国および地域コードを指定します。
81 
82     @return       国および地域コードに対応する文字列へのポインタが返ります。
83                   対応する文字列がない場合は 0 が返ります。
84 */
85 const char* GetCountryCodeA2(CfgCountryCode cfgCountryCode);
86 
87 /*!
88     @brief        言語コードを取得します。
89 
90     @return       取得した言語コードが返ります。
91 */
92 CfgLanguageCode GetLanguage(void);
93 
94 /*!
95     @brief        言語コードを ISO 639-1 alpha-2 に変換します。
96 
97     @param[in]    cfgLanguageCode   言語コードを指定します。
98 
99     @return       言語コードに対応する文字列へのポインタが返ります。
100                   対応する文字列がない場合は 0 が返ります。
101 */
102 const char* GetLanguageCodeA2(CfgLanguageCode cfgLanguageCode);
103 
104 /*!
105     @brief        アドレス情報を取得します。
106 
107     @param[out]   pSimpleAddress    取得したアドレス情報が格納されます。
108 */
109 void GetSimpleAddress(SimpleAddress* pSimpleAddress);
110 
111 /*!
112     @brief        本体仕向地のリージョンコードを取得します。
113 
114     @return       取得したリージョンコードが返ります。
115 */
116 CfgRegionCode GetRegion(void);
117 
118 /*!
119     @brief        本体仕向地のリージョンコードを対応する 3 文字の文字列に変換します。
120 
121     @param[in]    cfgRegionCode リージョンコードを指定します。
122 
123     @return       リージョンコードに対応する文字列へのポインタが返ります。
124                   対応する文字列がない場合は 0 が返ります。
125 */
126 const char* GetRegionCodeA3(CfgRegionCode cfgRegionCode);
127 
128 /*!
129     @brief   サウンド出力モードを取得します。
130 
131     @return  本体設定で設定したサウンド出力モードが返ります。
132 */
133 CfgSoundOutputMode GetSoundOutputMode(void);
134 
135 /*!
136     @brief   RTC改変オフセット情報を取得します。
137 
138              RTCオフセット値とは、エンドユーザーがRTCの日付・時刻を変更した際にどれだけ未来に進めたか、
139              もしくは過去へ戻したかを保存しておくオフセット値です。
140 
141              アプリケーションでは起動の都度このオフセット値を確認することで、エンドユーザーが行なった時間の改変を知ることができます。
142 
143     @return  本体に保存されているRTCオフセット値を取得します。
144 */
145 nn::fnd::TimeSpan GetUserTimeOffset();
146 
147 } // namespace CTR {
148 } // namespace cfg {
149 } // namespace nn {
150 
151 #endif
152 
153 #endif //   #ifndef NN_CFG_CTR_CFG_API_H_
154