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: 26265 $
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   @return       処理の結果が返ります。<BR>
47 */
48     nn::Result Initialize(void);
49 
50 /*!
51   @brief        タスクの実行制御オプションの設定を行います。(将来の拡張機能です)
52   @param[in]    exec     タスクの実行制御オプションを指定します。
53   @return       処理の結果が返ります。<BR>
54 */
55     nn::Result Initialize(ExecOption exec);
56 
57 /*!
58   @brief        タスクの実行制御オプションに対するパラメータ設定を行います。
59   @param[in]    target      実行制御変更後のタスクステップIDを指定します。
60   @param[in]    param1      制御パラメータ1を指定します。
61   @param[in]    param2      制御パラメータ2を指定します。
62   @return       処理の結果が返ります。<BR>
63 */
64     nn::Result SetConditional(u8 target, u32 param1, u32 param2);
65 
66 
67 /*!
68   @brief        クラス内のプロパティの値を設定します。
69                 下記のプロパティを使用できます。\n
70         識別子                  型 \n
71         TASK_EXEC_OPTION        ExecOption \n
72         TASK_STEP               u8 \n
73         TASK_OPTION_TARGET_STEP u8 \n
74         TASK_OPTION_PARAM1      u32 \n
75         TASK_OPTION_PARAM2      u32 \n
76   @param[in]    type    プロパティの識別子を指定します。
77   @param[in]    pValue  値を指定します。
78   @param[in]    size    値のサイズを指定します。
79   @return       処理の結果が返ります。<BR>
80   @retval       Description== @ref ER_INVALID_PROPERTYVALUE 「プロパティ値のポインタがNULLです。」を表すエラー
81   @retval       Description== @ref ER_INVALID_PROPERTYTYPE  「プロパティタイプがサポート外です。」を表すエラー
82 */
83     nn::Result SetProperty(PropertyType type, void* pValue, size_t size);
84 
85 /*!
86   @brief        クラス内のプロパティの値を取得します。
87                 下記のプロパティを使用できます。\n
88         識別子                  型 \n
89         TASK_EXEC_OPTION        ExecOption \n
90         TASK_STEP               u8 \n
91         TASK_OPTION_TARGET_STEP u8 \n
92         TASK_OPTION_PARAM1      u32 \n
93         TASK_OPTION_PARAM2      u32 \n
94   @param[in]    type    プロパティの識別子を指定します。
95   @param[out]   pValue  値を指定します。
96   @param[in]    size    値のサイズを指定します。
97   @return       処理の結果が返ります。<BR>
98   @retval       Description== @ref ER_INVALID_PROPERTYVALUE 「プロパティ値のポインタがNULLです。」を表すエラー
99   @retval       Description== @ref ER_INVALID_PROPERTYTYPE  「プロパティタイプがサポート外です。」を表すエラー
100 */
101     nn::Result GetProperty(PropertyType type, void* pValue, size_t size);
102 
103 protected:
104     friend class AccessConfig;
105     TaskOptionConfig m_Option;
106 };
107 
108 } // end of namespace boss
109 } // end of namespace nn
110 
111 #endif // __cplusplus
112 
113 #endif /* NN_BOSS_BOSS_TASK_OPTION_H_ */
114