1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     boss_NsDataIdList.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: 34430 $
14  *---------------------------------------------------------------------------*/
15 
16 #ifndef NN_BOSS_BOSS_NSDATA_ID_LIST_H_
17 #define NN_BOSS_BOSS_NSDATA_ID_LIST_H_
18 
19 #include <nn/boss/boss_Const.h>
20 #include <nn/boss/boss_Result.h>
21 #include <nn/boss/boss_Types.h>
22 
23 #ifdef __cplusplus
24 
25 namespace nn {
26 namespace boss {
27 
28 const u32 INVALID_SERIAL_ID = (0xffffffff);     // indexが範囲外のためSERIALID取得ができない。
29 
30 
31 /*!
32   @brief        NSデータのIDリストを表すクラスです。処理を行うNSデータのリストを取得するためなどに利用します。
33 */
34 class NsDataIdList
35 {
36 public:
37 /*!
38   @brief        コンストラクタです。
39 
40   @param[in]    pSerial     リストを格納する領域のポインタを指定します。
41                             pSerialの領域はGetNsDataIdList()などNsDataIdListクラスを使用するAPI
42                             においてNSデータを格納しますので、アプリで領域を確保し続けて下さい。
43   @param[in]    size        領域の要素数を指定します。
44 */
45     explicit NsDataIdList(u32* pSerial, u16 size);
46 
47 /*!
48   @brief        デストラクタです。
49 */
50     virtual ~NsDataIdList(void);
51 
52 /*!
53   @brief        初期化関数です。(一度使用したインスタンスであっても、本関数を実行することで再度使用可能となります。)
54 */
55     void Initialize(void);
56 
57 
58 /*!
59   @brief        一覧内のNSデータID個数を返します。
60 
61   @return 一覧の個数が返ります。<BR>
62 */
63     u16 GetSize(void);
64 
65 /*!
66   @brief        指定した位置のNSデータIDを返します。
67 
68   @param[in]    index   一覧内の位置を指定します。
69   @return NSデータIDが返ります。<BR>
70 */
71     u32 GetNsDataId(u16 index);
72 
73 protected:
74     friend class AccessConfig;
75     NsDataIdInfoList    m_Nsdata;
76 };
77 
78 
79 } // end of namespace boss
80 } // end of namespace nn
81 
82 #endif // __cplusplus
83 
84 #endif /* NN_BOSS_BOSS_NSDATA_ID_LIST_H_ */
85