1 /*---------------------------------------------------------------------------*
2   Project:  Horizon
3   File:     boss_TaskError.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: 31623 $
14  *---------------------------------------------------------------------------*/
15 
16 #ifndef NN_BOSS_BOSS_TASK_ERROR_H_
17 #define NN_BOSS_BOSS_TASK_ERROR_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 /*!
30   @brief        タスクのエラーを表すクラスです。タスクのエラー情報を取得する際に利用します。
31 */
32 class TaskError
33 {
34 public:
35 /*!
36   @brief        コンストラクタです。
37 */
38     explicit TaskError(void);
39 
40 /*!
41   @brief        デストラクタです。
42 */
43     virtual ~TaskError(void);
44 
45 /*!
46   @brief        クラス内のプロパティの値を取得します。説明部のデータ型の領域を確保した後、呼び出してください。
47                 下記のプロパティを使用できます。\n
48         識別子                     説明 \n
49         TASK_ERROR_RESULT_CODE     タスク実行結果コード。データの型は、TaskResultCode です。 \n
50         TASK_ERROR_CODE            タスク実行時の通信エラーコード。データの型は、u32 です。 \n
51   @param[in]    type    プロパティの識別子を指定します。
52   @param[out]   pValue  値を指定します。
53   @param[in]    size    値のサイズを指定します。
54   @return       関数の実行結果を返します。以下に挙げる Result を返します。
55   @retval       ResultSuccess               取得に成功しました。
56   @retval       ResultInvalidPropertyValue  プロパティ値のポインタがNULLです。
57   @retval       ResultInvalidPropertyType   プロパティタイプがサポート外です。
58   @retval       上記以外                    想定外のエラー(エラー内容については、@ref boss_Result.h を参照)。
59 */
60     nn::Result GetProperty(PropertyType type, void* pValue, size_t size);
61 
62 protected:
63     friend class AccessConfig;
64     TaskErrorInfo       m_Error;
65 };
66 
67 } // end of namespace boss
68 } // end of namespace nn
69 
70 #endif // __cplusplus
71 
72 #endif /* NN_BOSS_BOSS_TASK_ERROR_H_ */
73