1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     boss_TaskOption.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_TASK_OPTION_H_
17 #define NN_BOSS_BOSS_TASK_OPTION_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 /*!
29   @brief        タスクオプションを表すクラスです。タスクを登録する際のオプション情報設定などに利用します。(ただし現時点では、タスクオプション機能は未対応です。)
30 */
31 class TaskOption
32 {
33 public:
34 /*!
35   @brief        コンストラクタです。
36 */
37     explicit TaskOption(void);
38 
39 /*!
40   @brief        デストラクタです。
41 */
42     virtual ~TaskOption(void);
43 
44 /*!
45   @brief        タスクオプションの初期設定を行います。この初期化にとってオブジェクトの再利用が可能になります。
46 
47   @return       関数の実行結果を返します。以下に挙げる Result を返します。
48   @retval       ResultSuccess               初期化に成功しました。
49   @retval       上記以外                    想定外のエラー(エラー内容については、@ref boss_Result.h を参照)。
50 */
51     nn::Result Initialize(void);
52 
53 /*!
54   @brief        タスクの実行制御オプションの設定を行います。(将来の拡張機能です)
55 
56   @param[in]    exec     タスクの実行制御オプションを指定します。
57   @return       関数の実行結果を返します。以下に挙げる Result を返します。
58   @retval       ResultSuccess               初期化に成功しました。
59   @retval       上記以外                    想定外のエラー(エラー内容については、@ref boss_Result.h を参照)。
60 */
61     nn::Result Initialize(ExecOption exec);
62 
63 /*!
64   @brief        タスクの実行制御オプションに対するパラメータ設定を行います。(将来の拡張機能です)
65 
66   @param[in]    target      実行制御変更後のタスクステップIDを指定します。
67   @param[in]    param1      制御パラメータ1を指定します。
68   @param[in]    param2      制御パラメータ2を指定します。
69   @return       関数の実行結果を返します。以下に挙げる Result を返します。
70   @retval       ResultSuccess               設定に成功しました。
71   @retval       上記以外                    想定外のエラー(エラー内容については、@ref boss_Result.h を参照)。
72 */
73     nn::Result SetConditional(u8 target, u32 param1, u32 param2);
74 
75 
76 /*!
77   @brief        クラス内のプロパティの値を設定します。
78 
79         下記のプロパティを使用できます。 説明部のデータ型の領域を確保した後、呼び出してください。\n
80         識別子                     説明 \n
81         TASK_STEP                  タスクステップのID番号。データの型は、u8 です。 \n
82 
83   @param[in]    type    プロパティの識別子を指定します。
84   @param[in]    pValue  値を指定します。
85   @param[in]    size    値のサイズを指定します。
86   @return       関数の実行結果を返します。以下に挙げる Result を返します。
87   @retval       ResultSuccess               設定に成功しました。
88   @retval       ResultInvalidPropertyValue  プロパティ値のポインタがNULLです。
89   @retval       ResultInvalidPropertyType   プロパティタイプがサポート外です。
90   @retval       上記以外                    想定外のエラー(エラー内容については、@ref boss_Result.h を参照)。
91 */
92     nn::Result SetProperty(PropertyType type, const void* pValue, size_t size);
93 
94 /*!
95   @brief        クラス内のプロパティの値を取得します。
96 
97         下記のプロパティを使用できます。 説明部のデータ型の領域を確保した後、呼び出してください。\n
98         識別子                     説明 \n
99         TASK_EXEC_OPTION           タスク実行オプション。データの型は、ExecOption です。 \n
100         TASK_STEP                  タスクステップのID番号。データの型は、u8 です。 \n
101 
102   @param[in]    type    プロパティの識別子を指定します。
103   @param[out]   pValue  値を指定します。
104   @param[in]    size    値のサイズを指定します。
105   @return       関数の実行結果を返します。以下に挙げる Result を返します。
106   @retval       ResultSuccess               取得に成功しました。
107   @retval       ResultInvalidPropertyValue  プロパティ値のポインタがNULLです。
108   @retval       ResultInvalidPropertyType   プロパティタイプがサポート外です。
109   @retval       上記以外                    想定外のエラー(エラー内容については、@ref boss_Result.h を参照)。
110 */
111     nn::Result GetProperty(PropertyType type, void* pValue, size_t size);
112 
113 protected:
114     friend class AccessConfig;
115     TaskOptionConfig m_Option;
116 };
117 
118 } // end of namespace boss
119 } // end of namespace nn
120 
121 #endif // __cplusplus
122 
123 #endif /* NN_BOSS_BOSS_TASK_OPTION_H_ */
124