/*---------------------------------------------------------------------------* Copyright (C) Nintendo. 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. *---------------------------------------------------------------------------*/ #ifndef NN_BOSS_BOSS_RAWDLTASKSETTING_H_ #define NN_BOSS_BOSS_RAWDLTASKSETTING_H_ #include #include #include #include #ifdef __cplusplus namespace nn { namespace boss { /*! @addtogroup nn_boss_api @{ */ /*! @brief Represents settings for RawDL tasks. Used when registering tasks (passed as an argument to @ref Task::Register). */ class RawDlTaskSetting : public NetTaskSetting { public: /*! @brief Instantiates an object. */ explicit RawDlTaskSetting(void); /*! @brief Destroys the object. */ virtual ~RawDlTaskSetting(void); /*! @brief Initializes settings for a RawDL task. If initialization succeeds, you can register the information using the @ref Task::Register function. @param[in] url Specifies the connection URL. @param[in] isNewArrivalFlagOn Specifies whether to set the "new arrival" flag when new data arrives. @param[in] isLedOn Specifies whether to turn on the LED when new data arrives. @param[in] fileName Specifies the name of the file to download. If omitted, the function uses the default filename. (Note: If the filename starts with a period ('.'), the @ref Storage::GetDataList function fails to retrieve the file, even if it exists. In this case, you can access the data by specifying the filename directly in the @ref NsData::Initialize function.) @param[in] directoryName Specifies the directory that stores the data. If omitted, the task name is used for the directory name. The @ref Storage class uses this directory name when retrieving a list of files. @return Returns the result of execution. Returns one of the following Result values. @retval Result::IsSuccess Indicates successful retrieval. @retval ResultInvalidParameter Indicates an invalid parameter. */ nn::Result Initialize(const char* url, bool isNewArrivalFlagOn = false, bool isLedOn = false, const char* fileName = RAWDL_DEFAULT_FILE_NAME, const char* directoryName = NULL); /*! @brief Adds the RawDL custom header to the request for sending by HTTP. This function can add headers to an HTTP request that are larger than the maximum value allowed by the AddHttpHeader function for ordinary custom headers (512 bytes). The maximum number that can be added is 1. @param[in] label Specifies the label string for the RawDL custom header being added. @param[in] value Specifies the value string for the RawDL custom header being added. @return Returns the result of execution. Returns one of the following Result values. @retval Result::IsSuccess Indicates successful retrieval. @retval ResultInvalidParameter Indicates an invalid parameter. @retval ResultAlreadyExist Indicates that a custom header has already been added. */ nn::Result AddLargeHttpHeader(const char* label, const char* value); /*! @brief Clears the RawDL custom header previously added to the HTTP request headers. */ void ClearLargeHttpHeader(void); }; //! @} } // end of namespace boss } // end of namespace nn #endif // __cplusplus #endif /* NN_BOSS_BOSS_RAWDLTASKSETTING_H_ */