1 /*---------------------------------------------------------------------------*
2 
3   Copyright (C) Nintendo.  All rights reserved.
4 
5   These coded instructions, statements, and computer programs contain
6   proprietary information of Nintendo of America Inc. and/or Nintendo
7   Company Ltd., and are protected by Federal copyright law.  They may
8   not be disclosed to third parties or copied or duplicated in any form,
9   in whole or in part, without the prior written consent of Nintendo.
10 
11  *---------------------------------------------------------------------------*/
12 
13 #ifndef NN_BOSS_BOSS_NBDLTASKSETTING_H_
14 #define NN_BOSS_BOSS_NBDLTASKSETTING_H_
15 
16 #include <nn/boss/boss_Const.h>
17 #include <nn/boss/boss_Result.h>
18 #include <nn/boss/boss_Types.h>
19 #include <nn/boss/boss_NetTaskSetting.h>
20 
21 #ifdef __cplusplus
22 
23 namespace nn {
24 namespace boss {
25 
26 /*!
27 @addtogroup  nn_boss_api
28   @{
29 */
30 
31 /*!
32     @brief  Represents settings for <tt>NBDL</tt> tasks. Used when registering tasks (passed as an argument to <tt>@ref Task::Register</tt>).
33 */
34 class NbdlTaskSetting : public NetTaskSetting
35 {
36 public:
37 /*!
38     @brief  Instantiates an object.
39 */
40     explicit NbdlTaskSetting(void);
41 
42 /*!
43     @brief  Destroys the object.
44 */
45     virtual ~NbdlTaskSetting(void);
46 
47 /*!
48 @brief  Initializes NBDL task settings. If initialization succeeds, you can register the information using the <tt>@ref Task::Register</tt> function.
49 
50 @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.))
51 @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.)
52 Specify <tt>0</tt> if you are only distributing notifications, and not distributing any DLC for the title.
53 @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 <tt>@ref Storage</tt> class uses this directory name when retrieving a list of files. If you omit the directory name, specify the task ID in the <tt>@ref Storage</tt> class. (There are special cases where this argument must be specified explicitly. For more information, see the BOSS Programming Manual.))
54 @return  Returns the result of execution. Returns one of the following <tt>Result</tt> values.
55 @retval Result::IsSuccess  Successfully retrieved.
56 @retval ResultInvalidParameter  A parameter is invalid. (For example, <var>bossCode</var> is <tt>NULL</tt> or an empty string.)
57 */
58     nn::Result Initialize(const char* bossCode, s64 directoryMaxFileTotalSize, const char* directoryName = NULL);
59 
60 /*!
61 @brief  Sets the name of the file to download. Use this method only to download a specific file.
62 
63 @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 <tt>NULL</tt> terminator) is <tt>@ref NSDATA_NAME_MAX_LENGTH_WITH_NULL</tt>.
64 @return  Returns the result of execution. Returns one of the following <tt>Result</tt> values.
65 @retval Result::IsSuccess  Successfully retrieved.
66 @retval ResultInvalidParameter  A parameter is invalid. (For example, <var>fileName</var> is <tt>NULL</tt>.)
67 */
68     nn::Result SetFileName(const char* fileName);
69 
70 //! @}
71 
72 };
73 
74 } // end of namespace boss
75 } // end of namespace nn
76 
77 #endif // __cplusplus
78 
79 #endif /* NN_BOSS_BOSS_NBDLTASKSETTING_H_ */
80