1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     boss_TaskStatus.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_STATUS_H_
17 #define NN_BOSS_BOSS_TASK_STATUS_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 TaskStatus
32 {
33 public:
34 /*!
35   @brief        コンストラクタです。
36 */
37     explicit TaskStatus(void);
38 
39 /*!
40   @brief        デストラクタです。
41 */
42     virtual ~TaskStatus(void);
43 
44 /*!
45   @brief        クラス内のプロパティの値を取得します。
46                 ステータスを確認したいタイミングで、nn::boss::GetTaskStatus()を呼び出す必要があります。
47                 下記のプロパティを使用できます。\n
48         識別子              型 \n
49         TASK_STATE_CODE TaskStateCode \n
50         TASK_RESULT_CODE TaskResultCode \n
51         TASK_COMM_ERROR_CODE u32 \n
52         TASK_CURRENT_PRIORITY u32 \n
53         TASK_EXECUTE_COUNT u32 \n
54         TASK_PENDING_TIME u32 \n
55         TASK_REMAIN_TIME u32 \n
56         TASK_START_TIME s64 \n
57         TASK_PROGRESS u32 \n
58         TASK_DATA_SIZE u32 \n
59         TASK_SERVICE_TERMINATED bool \n
60         TASK_LAST_MODIFIED_TIME char lastModified[MAX_LASTMODIFIED_LENGTH] \n
61         TASK_CURRENT_STEP u8 \n
62         TASK_STEP_START_TIME s64 \n
63   @param[in]    type    プロパティの識別子を指定します。
64   @param[out]   pValue  値を指定します。
65   @param[in]    size    値のサイズを指定します。
66   @return       処理の結果が返ります。<BR>
67   @retval       Description== @ref ER_INVALID_PROPERTYVALUE 「プロパティ値のポインタがNULLです。」を表すエラー
68   @retval       Description== @ref ER_INVALID_PROPERTYTYPE  「プロパティタイプがサポート外です。」を表すエラー
69 */
70     Result GetProperty(PropertyType type, void* pValue, size_t size);
71 
72 protected:
73     friend class AccessConfig;
74     NN_PADDING4;
75     TaskStatusInfo      m_Status;
76 };
77 
78 
79 
80 
81 
82 } // end of namespace boss
83 } // end of namespace nn
84 
85 #endif // __cplusplus
86 
87 #endif /* NN_BOSS_BOSS_TASK_STATUS_H_ */
88 
89