/*---------------------------------------------------------------------------* Project: Horizon File: boss_TaskAction.h Copyright (C)2009 Nintendo Co., Ltd. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. $Rev: 26265 $ *---------------------------------------------------------------------------*/ #ifndef NN_BOSS_BOSS_TASK_ACTION_H_ #define NN_BOSS_BOSS_TASK_ACTION_H_ #include #include #include #include #include #include #ifdef __cplusplus namespace nn { namespace boss { /*! @brief タスクアクションの基底となるクラスです。アプリケーションが直接インスタンス化しての用途はありません。 */ class TaskActionBase { protected: /*! @brief コンストラクタです。 */ explicit TaskActionBase(void); /*! @brief デストラクタです。 */ virtual ~TaskActionBase(void); public: /*! @brief 登録した独自ルート証明書の使用を設定します。 内臓されているルート証明書と併用できます。 @return 処理の結果が返ります。
*/ nn::Result SetPrivateRootCa(void); /*! @brief 機器に内蔵されているルート証明書の使用を設定します。 独自ルート証明書と併用できます。 @param[in] certStoreName 証明書ストア名を指定します。 @return 処理の結果が返ります。
@retval Description== @ref ER_INVALID_MAX_ROOT_CA 「ルートCAの最大設定数を超えました。」を表すエラー */ nn::Result SetRootCa(const nn::http::InternalCaCertId inCaCertName); /*! @brief 登録した独自クライアント証明書の使用を設定します。 独自ルート証明書のみが使用されます。 @return 処理の結果が返ります。
*/ nn::Result SetPrivateClientCert(void); /*! @brief 機器に内蔵されているクライアント証明書の使用を設定します。 指定された機器内蔵クライアント証明書1枚のみが使用されます。 @param[in] certStoreName 証明書ストア名を指定します。 @return 処理の結果が返ります。
@retval Description== @ref ER_INVALID_MAX_CLIENT_CERT 「ClientCertの最大設定数を超えました。」を表すエラー */ nn::Result SetClientCert(const nn::http::InternalClientCertId inClientCertName); /*! @brief アクセスポイント情報を付加します。 @param[in] info アクセスポイント情報を指定します。 @return 処理の結果が返ります。
*/ nn::Result SetApInfo(ApInfoType info); /*! @brief httpヘッダ部にヘッダ追加を設定します。 @param[in] pLabel ヘッダ名を指定します。 @param[in] pValue ヘッダ値を指定します。 @return 処理の結果が返ります。
@retval Description== @ref ER_HTTP_REQUEST_HEADER_POINTER_NULL 「HTTPリクエストヘッダのポインタがNULLです。」を表すエラー @retval Description== @ref ER_INVALID_MAX_HTTP_REQUEST_HEADER 「HTTPリクエストヘッダの登録数が最大数を超えました。」を表すエラー */ nn::Result AddHeaderField(const char* pLabel, const char* pValue); /*! @brief LastModifiedTimeの初期値を設定します。 @param[in] pLastModifiedTime 設定するLastModifiedTime文字列(この文字列が、そのままHTTPリクエストのIf-Modified-Sinceヘッダフィールドに設定されます。) @return 処理の結果が返ります。
@retval Description== @ref ER_INVALID_PROPERTYVALUE 「プロパティ値のポインタがNULLです。」を表すエラー */ nn::Result SetLastModifiedTime(const char* pLastModifiedTime); protected: /*! @brief クラス内のプロパティの値を設定します。 下記のプロパティを使用できます。\n 識別子 型 \n ACTION_HTTP_HEADER struct httpRequestHeader[MAX_HTTP_HEADER] \n ACTION_CLIENT_CERT nn::http::InternalClientCertId clientCert[MAX_CLIENT_CERT] \n ACTION_ROOT_CA nn::http::InternalCaCertId rootCA[MAX_ROOT_CA] \n ACTION_AP_INFO ApInfoType \n ACTION_PRIVATE_ROOT_CA u8 \n ACTION_PRIVATE_CLIENT_CERT u8 \n ACTION_LAST_MODIFIED_TIME lastModified[MAX_LASTMODIFIED_LENGTH] \n @param[in] type プロパティの識別子を指定します。 @param[in] pValue 値を指定します。 @param[in] size 値のサイズを指定します。 @return 処理の結果が返ります。
*/ nn::Result SetHttpProperty(PropertyType type, void* pValue, size_t size) ; /*! @brief クラス内のプロパティの値を取得します。 下記のプロパティを使用できます。\n 識別子 型 \n ACTION_HTTP_HEADER struct httpRequestHeader[MAX_HTTP_HEADER] \n ACTION_CLIENT_CERT nn::http::InternalClientCertId clientCert[MAX_CLIENT_CERT] \n ACTION_ROOT_CA nn::http::InternalCaCertId rootCA[MAX_ROOT_CA] \n ACTION_AP_INFO ApInfoType \n ACTION_PRIVATE_ROOT_CA u8 \n ACTION_PRIVATE_CLIENT_CERT u8 \n @param[in] type プロパティの識別子を指定します。 @param[out] pValue 値を指定します。 @param[in] size 値のサイズを指定します。 @return 処理の結果が返ります。
*/ nn::Result GetHttpProperty(PropertyType type, void* pValue, size_t size) ; nn::Result SetFileProperty(PropertyType type, void* pValue, size_t size) ; nn::Result GetFileProperty(PropertyType type, void* pValue, size_t size) ; friend class AccessConfig; TaskActionConfig m_Action; }; /*! @brief タスクアクションを表すクラスです。NADLタスクなど、具体的なタスクアクションクラスの基底クラスとなります。また特定タスクのタスクアクション情報を取得する際には、直接インスタンス化して利用します。 */ class TaskAction : public TaskActionBase { public: /*! @brief コンストラクタです。 */ explicit TaskAction(void); /*! @brief デストラクタです。 */ virtual ~TaskAction(void); /*! @brief クラス内のプロパティの値を取得します。 下記のプロパティを使用できます。\n 識別子 型 \n ACTION_URL char url[MAX_URL_LENGTH] \n ACTION_OFFSET u32 \n ACTION_FILEPATH char filepath [MAX_FILEPATH_LENGTH] \n ACTION_FILEPATH_W wchar_t filePathW[MAX_FILEPATH_LENGTH] \n ACTION_FILE_HANDLE nn::Handle \n ACTION_HTTP_HEADER struct httpRequestHeader[MAX_HTTP_HEADER] \n ACTION_CLIENT_CERT u8 \n ACTION_ROOT_CA u8 \n ACTION_AP_INFO ApInfoType \n SIGNAL_TASK_EVENT nn::os::Event* \n @param[in] PropertyType type プロパティの識別子を指定します。 @param[in] void* pValue 値を指定します。 @param[in] size_t size 値のサイズを指定します。 @return 処理の結果が返ります。
@retval Description== @ref ER_INVALID_PROPERTYVALUE 「プロパティ値のポインタがNULLです。」を表すエラー @retval Description== @ref ER_INVALID_PROPERTYTYPE 「プロパティタイプがサポート外です。」を表すエラー */ nn::Result virtual GetProperty(PropertyType type, void* pValue, size_t size); }; } // end of namespace boss } // end of namespace nn #endif // __cplusplus #endif /* NN_BOSS_BOSS_TASK_ACTION_H_ */