/*---------------------------------------------------------------------------* 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_DATASTOREDOWNLOADSETTING_H_ #define NN_BOSS_BOSS_DATASTOREDOWNLOADSETTING_H_ #include #include #include #include #include #ifdef __cplusplus namespace nn { namespace boss { /*! @addtogroup nn_boss_api @{ */ /*! @brief Represents settings for DataStore download tasks. Used when registering tasks (passed as an argument to @ref Task::Register). */ class DataStoreDownloadSetting : public NetTaskSetting { public: /*! @brief Instantiates an object. */ explicit DataStoreDownloadSetting(void); /*! @brief Destroys the object. */ virtual ~DataStoreDownloadSetting(void); /*! @brief Initializes settings for a DataStore download task. If initialization succeeds, you can register the information using the @ref Task::Register function. @param[in] gameId Specifies the ID for the game server. (For more information, see the documentation in the NEX library.) @param[in] accessKey Specifies the key for accessing the game server. (Specify no more than 8 characters. For more information, see the documentation in the NEX library.) @param[in] downloadDataMaxTotalCount Specifies the maximum count of all download data. BOSS controls the number of pieces of data, so it does not exceed this value. When a task is executed, if downloading new data would cause the total data count to exceed this value, the download does not take place. When this occurs, task execution results in a TR_FULL or COUNT_FULL error. Values from 1 to @ref datastore::DOWNLOAD_DATA_MAX_COUNT are valid. @param[in] downloadDataMaxTotalSize Specifies the maximum total size of all download data. BOSS controls the total size of all data so it does not exceed this value. When a task is executed, if downloading new data would cause the total size to exceed this value, the download does not take place. When this occurs, task execution results in a TR_FULL or SIZE_FULL error. If 0 is specified, BOSS skips this check. @param[in] enableNewArrivalFlag Specifies whether to set the new arrival flag when the new data is downloaded. When set to false (or omitted), the new arrival flag is not set. @param[in] enableLed Specifies whether to turn on the LED when new data is downloaded. When set to false (or omitted), the LED is not turned on. @param[in] directoryName Specifies the directory that stores the data. 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. @return Returns the execution result of the function. Returns one of the following Result values. @retval Result::IsSuccess Indicates successful retrieval. @retval ResultInvalidParameter Indicates an invalid parameter. */ nn::Result Initialize( u32 gameId, const wchar_t accessKey[], u32 downloadDataMaxTotalCount, u64 downloadDataMaxTotalSize, bool enableNewArrivalFlag = false, bool enableLed = false, const char* directoryName = NULL); /*! @brief Specifies the check token that is used during the initial download. @param[in] initialCheckToken Check token that is used for the initial download. */ void SetInitialCheckToken( u8 initialCheckToken[datastore::CHECK_TOKEN_SIZE] ); }; //! @} } // end of namespace boss } // end of namespace nn #endif // __cplusplus #endif /* NN_BOSS_BOSS_DATASTOREDOWNLOADSETTING_H_ */