/*---------------------------------------------------------------------------* 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_NBDLTASKSETTING_H_ #define NN_BOSS_BOSS_NBDLTASKSETTING_H_ #include #include #include #include #ifdef __cplusplus namespace nn { namespace boss { /*! @addtogroup nn_boss_api @{ */ /*! @brief Represents settings for NBDL tasks. Used when registering tasks (passed as an argument to @ref Task::Register). */ class NbdlTaskSetting : public NetTaskSetting { public: /*! @brief Instantiates an object. */ explicit NbdlTaskSetting(void); /*! @brief Destroys the object. */ virtual ~NbdlTaskSetting(void); /*! @brief Initializes NBDL task settings. If initialization succeeds, you can register the information using the @ref Task::Register function. @param[in] bossCode Specifies the BOSS code. (The code that is assigned to each application that uses NBDL. You can check this code from the BOSS data server management tool after your application for use of NBDL tasks has been approved by Nintendo.)) @param[in] directoryMaxFileTotalSize Specifies the maximum total size of files in a directory. (BOSS controls the total file size by automatically deleting old files if this size will be exceeded when new data is downloaded.) Specify 0 if you are only distributing notifications, and not distributing any DLC for the title. @param[in] directoryName The name of the directory that stores the data. Normally, you can omit this setting. When omitted, the task ID is used for the directory name. The @ref Storage class uses this directory name when retrieving a list of files. If you omit the directory name, specify the task ID in the @ref Storage class. (There are special cases where this argument must be specified explicitly. For more information, see the BOSS Programming Manual.)) @return Returns the result of execution. Returns one of the following Result values. @retval Result::IsSuccess Successfully retrieved. @retval ResultInvalidParameter A parameter is invalid. (For example, bossCode is NULL or an empty string.) */ nn::Result Initialize(const char* bossCode, s64 directoryMaxFileTotalSize, const char* directoryName = NULL); /*! @brief Sets the name of the file to download. Use this method only to download a specific file. @param[in] fileName Specifies the name of the file to download. The maximum length of the strings that can be specified for filenames (including the NULL terminator) is @ref NSDATA_NAME_MAX_LENGTH_WITH_NULL. @return Returns the result of execution. Returns one of the following Result values. @retval Result::IsSuccess Successfully retrieved. @retval ResultInvalidParameter A parameter is invalid. (For example, fileName is NULL.) */ nn::Result SetFileName(const char* fileName); //! @} }; } // end of namespace boss } // end of namespace nn #endif // __cplusplus #endif /* NN_BOSS_BOSS_NBDLTASKSETTING_H_ */