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_CONST_H_
14 #define NN_BOSS_BOSS_CONST_H_
15 
16 #include <nn/Result.h>
17 
18 #ifdef __cplusplus
19 
20 namespace nn {
21 namespace boss {
22 
23 /*!
24 @addtogroup  nn_boss
25     @{
26 
27 @defgroup nn_boss_const  SpotPass (BOSS) Constant Definitions
28 @brief  A list of constant definitions in the SpotPass (BOSS) library.
29     @{
30 */
31 
32 /*!
33 @brief  Specifies service statuses for tasks.
34 (The numeric value of each enumerator is shown at the start of its description.)
35 */
36 enum TaskServiceStatus
37 {
38     SERVICE_UNKNOWN,                               //!<  <tt>0</tt>: Cannot yet confirm service status.
39     SERVICE_AVAILABLE,                             //!<  <tt>1</tt>: Service is available.
40     SERVICE_TERMINATED                             //!<  <tt>2</tt>: Service has terminated.
41 };
42 
43 
44 
45 /*!
46 @brief  Enumerates task states.
47 (The numeric value of each enumerator is shown at the start of its description.)
48 */
49 enum TaskState
50 {
51     TS_UNKNOWN          = 0,               //!<  <tt>0</tt>: Unknown state.
52     STOP                = 1,               //!<  <tt>1</tt>: Stopped.
53     STOP_BY_POLICYLIST  = 2,               //!<  <tt>2</tt>: Temporarily stopped because of the policy list.
54     WAITING_TIME        = 3,               //!<  <tt>3</tt>: Waiting for the start time.
55     WAITING_RUN         = 4,               //!<  <tt>4</tt>: Waiting in the queue to run.
56     WAITING_RESUME      = 5,               //!<  <tt>5</tt>: Waiting in the resume state to run.
57     RUNNING             = 6,               //!<  <tt>6</tt>: Running.
58     FINISHED            = 7                //!<  <tt>7</tt>: Execution has completed.
59 };
60 
61 /*!
62 @brief  Specifies the states within a task turn.
63 (The numeric value of each enumerator is shown at the start of its description.)
64 */
65 enum TaskTurnState
66 {
67     TTS_UNKNOWN            = TS_UNKNOWN,             //!<  <tt>0</tt>: Unknown state.
68     TTS_STOPPED            = STOP,                   //!<  <tt>1</tt>: Stopped.
69     TTS_STOP_BY_POLICYLIST = STOP_BY_POLICYLIST,     //!<  <tt>2</tt>: Temporarily stopped because of the policy list.
70     TTS_WAITING_TIME       = WAITING_TIME,           //!<  <tt>3</tt>: Waiting for the start time.
71     TTS_WAITING_RUN        = WAITING_RUN,            //!<  <tt>4</tt>: Waiting in the queue to run.
72     TTS_WAITING_RESUME     = WAITING_RESUME,         //!<  <tt>5</tt>: Waiting in the resume state to run.
73     TTS_RUNNING            = RUNNING,                //!<  <tt>6</tt>: Running.
74     TTS_FINISHED           = FINISHED,               //!<  <tt>7</tt>: Execution has completed.
75     TTS_SUCCESS            = 16,                     //!<  <tt>16</tt>: Execution completed successfully.
76     TTS_ERROR              = 17,                     //!<  <tt>17</tt>: Execution completed with one or more errors.
77 };
78 
79 /*!
80 @brief  Specifies the running states for a task.
81 (The numeric value of each enumerator is shown at the start of its description.)
82 */
83 enum TaskRunningState
84 {
85     RS_NOT_RUN          = 0,               //!<  <tt>0</tt>: Not running.
86     RS_PREPROCESSING    = 1,               //!<  <tt>1</tt>: Running (preprocessing).
87     RS_RUNNING          = 2                //!<  <tt>2</tt>: Running (actual process).
88 };
89 
90 
91 /*!
92 * @brief  Specifies detailed results for a task.
93 (The numeric value of each enumerator is shown at the start of its description.)
94 */
95 enum TaskResultDefinition
96 {
97     TR_UNKNOWN,                                    //!<   <tt>0</tt>: Unknown.
98     TR_SUCCESS,                                    //!<   <tt>1</tt>: The task succeeded.
99     INVALID_TASKRECORD_VALUE,                      //!<   <tt>2</tt>: Task record information is invalid.
100     TR_LIBRARY_NOT_INITIALIZE,                     //!<   <tt>3</tt>: The BOSS library is not initialized.
101     TR_INVALID_PARAMETER,                          //!<   <tt>4</tt>: Invalid parameter.
102     TR_INVALID_FORMAT,                             //!<   <tt>5</tt>: Invalid format.
103     TR_INITIALIZED,                                //!<   <tt>6</tt>: Already initialized.
104     TR_NOT_EXIST,                                  //!<   <tt>7</tt>: Does not exist.
105     TR_UNEXPECT_ERROR,                             //!<   <tt>8</tt>: Unexpected error.
106 
107     TR_CANCELED,                                   //!<   <tt>9</tt>: The task was canceled.
108 
109     TR_FS_ERROR,                                   //!<  <tt>10</tt>: The file system returned an error.
110     TR_HTTP_ERROR,                                 //!<  <tt>11</tt>: An error occurred in HTTP communication.
111 
112     TR_CANNOT_GET_NETWORK_TIME,                    //!<  <tt>12</tt>: The value for the network clock could not be retrieved.
113 
114     TR_CANNOT_READ_SYSTEM_CONFIG,                  //!<  <tt>13</tt>: System Settings information could not be read.
115     TR_NOT_NETWORK_ACCOUNT,                        //!<  <tt>14</tt>: The registered task account is not a network account. (Includes cases when the registered account has not agreed to the EULA.)
116     TR_RESTRICTED_BY_PARENTAL_CONTROL,             //!<  <tt>15</tt>: The registered task account is restricted from operating BOSS by Parental Controls.
117 
118     // TaskSheet error.
119     TASKSHEET_ERROR_HTTP,                          //!<  <tt>16</tt>: An HTTP error occurred while downloading the <tt>TaskSheet</tt>. (For more information about the HTTP error, see the sub-error.)
120     TASKSHEET_ERROR_INVALID_FORMAT,                //!<  <tt>17</tt>: An error has been detected in the <tt>TaskSheet</tt> format.
121     TASKSHEET_ERROR_BUFFER_OVERFLOW,               //!<  <tt>18</tt>: A buffer overflow was detected in downloading the <tt>TaskSheet</tt>.
122     TASKSHEET_ERROR_INVALID_TITLE_ID,              //!<  <tt>19</tt>: The <tt>TaskSheet</tt> title ID is different from the title ID that registered the task.
123     TASKSHEET_ERROR_INVALID_TASK_ID,               //!<  <tt>20</tt>: The <tt>TaskSheet</tt> task ID is different from the actual task ID.
124 
125     // NBDL task error.
126     NBDL_ERROR_NSD_VERIFY_HASH,                    //!<  <tt>21</tt>: An error was detected in verifying the NS data hash.
127     NBDL_ERROR_NSD_HASH_SIZE,                      //!<  <tt>22</tt>: An error was detected in the NS data hash size.
128     NBDL_ERROR_NSD_INVALID_HEADER_FORMAT,          //!<  <tt>23</tt>: An error was detected in the NS data header format.
129     NBDL_ERROR_NSD_DECRYPT_INITIALIZE_FAILED,      //!<  <tt>24</tt>: Initialization of NS data decryption failed.
130     NBDL_ERROR_NSD_INVALID_DATA_SIZE,              //!<  <tt>25</tt>: The size of the downloaded NS data does not match the <tt>Content-Length</tt> value.
131     NBDL_ERROR_GET_NEWS_STORAGE_INFO,              //!<  <tt>26</tt>: Failed to retrieve information about notifications for BOSS storage. (For more information about the FS error, see the sub-error.)
132     NBDL_ERROR_PREPARE_BOSS_SAVEDATA_INFO,         //!<  <tt>27</tt>: Failed to prepare save data management information for BOSS. (For more information about the FS error, see the sub-error.)
133     NBDL_ERROR_PREPARE_BOSS_STORAGE_INFO,          //!<  <tt>28</tt>: Failed to prepare management information for BOSS storage. (For more information about the FS error, see the sub-error.)
134     NBDL_ERROR_CHECK_RESUME_FILE_EXIST,            //!<  <tt>29</tt>: An error occurred while checking whether a resume file exists. (For more information about the FS error, see the sub-error.)
135     NBDL_ERROR_CHECK_DOWNLOAD_TARGET,              //!<  <tt>30</tt>: An error occurred while checking the file to download among <tt>TaskSheet</tt> files. (For more information about the FS error, see the sub-error.)
136     NBDL_ERROR_CALCULATE_CONTENT_LENGTH,           //!<  <tt>31</tt>: Failed to calculate <tt>Content-Length</tt> for the NBDL task. (For more information about the FS error, see the sub-error.)
137     NBDL_ERROR_CHECK_BOSS_STORAGE_FILE_INFO,       //!<  <tt>32</tt>: An error occurred while checking file management information for BOSS storage. (For more information about the FS error or <tt>NotExist</tt> error, see the sub-error.)
138     NBDL_ERROR_CHECK_BOSS_STORAGE_REFERENCE_INFO,  //!<  <tt>33</tt>: An error occurred while checking file reference information for BOSS storage. (For more information about the FS error or <tt>NotExist</tt> error, see the sub-error.)
139     NBDL_ERROR_CHECK_MAX_FILE_TOTAL_SIZE,          //!<  <tt>34</tt>: An error occurred while checking the total size of files in an NBDL task directory. (For more information about the FS error, see the sub-error.)
140     NBDL_ERROR_DELETABLE_FILE_INFO_NOT_EXIST,      //!<  <tt>35</tt>: There is no file information for a deletable file in the file management information.
141     NBDL_ERROR_DELETABLE_REFERENCE_INFO_NOT_EXIST, //!<  <tt>36</tt>: There is no file information for a deletable file in the file reference information.
142     NBDL_ERROR_DOWNLOAD_FILE,                      //!<  <tt>37</tt>: FS operations for the download file failed. (For more information about the FS error, see the sub-error.)
143     NBDL_ERROR_DOWNLOAD_HTTP,                      //!<  <tt>38</tt>: An HTTP communication error occurred during a download. (For more information about the HTTP error, see the sub-error.)
144     NBDL_ERROR_GET_RESUME_FILE_INFO,               //!<  <tt>39</tt>: Failed to get resume file information during a download. (For more information about the FS error, see the sub-error.)
145     NBDL_ERROR_SET_RESUME_FILE_INFO,               //!<  <tt>40</tt>: Failed to save resume file information during a download.
146     NBDL_ERROR_UPDATE_BOSS_STORAGE_INFO,           //!<  <tt>41</tt>: Failed to update BOSS storage management information. (For more information about the FS error, see the sub-error.)
147     NBDL_ERROR_ROLLBACK_BOSS_STORAGE,              //!<  <tt>42</tt>: An error occurred during rollback of BOSS storage. (For more information about the FS error, see the sub-error.)
148 
149     // New arrival flag error.
150     TR_ERROR_SET_ACCOUNT_NEW_ARRIVAL_FLAG,         //!<  <tt>43</tt>: Failed to set the account new arrival flag. (For more information about the FS error, see the sub-error.)
151     TR_ERROR_SET_TITLE_NEW_ARRIVAL_FLAG,           //!<  <tt>44</tt>: Failed to set the title new arrival flag. (For more information about the FS error, see the sub-error.)
152 
153     // Policy list error.
154     TR_POLICYLIST_DOWNLOAD_ERROR,                  //!<  <tt>45</tt>: Cannot download the policy list.
155     TR_POLICYLIST_INVALID_ERROR,                   //!<  <tt>46</tt>: The policy list content is invalid.
156 
157     TR_STOPPED,                                    //!<  <tt>47</tt>: Processing was stopped.
158 
159     TR_FORBIDDEN_TO_SEND_INFORMATION_BY_CONFIG,    //!<  <tt>48</tt>: Sending information is forbidden in System Settings.
160 
161     //API error.
162     TR_MEMORY_ALLOCATE_ERROR,                     //!<   <tt>49</tt>: Failed to allocate memory.
163     TR_INVALID_ACCOUNT,                           //!<   <tt>50</tt>: Invalid account.
164     TR_INVALID_TITLE,                             //!<   <tt>51</tt>: Invalid title.
165     TR_NO_SUPPORT,                                //!<   <tt>52</tt>: Unsupported error.
166     TR_NOT_COMPLETED,                             //!<   <tt>53</tt>: Not completed error.
167     TR_NOT_PERMITTED,                             //!<   <tt>54</tt>: Not permitted.
168     TR_FULL,                                      //!<   <tt>55</tt>: Maximum value reached.
169     TR_FINISHED,                                  //!<   <tt>56</tt>: Already finished.
170     TR_STOPPED_BY_POLICYLIST,                     //!<   <tt>57</tt>: Stopped by the policy list.
171     TR_ALREADY_EXIST,                             //!<   <tt>58</tt>: Already exists.
172     TR_FAIL,                                      //!<   <tt>59</tt>: This value indicates a generic failure.
173 
174     TR_RESTRICTED_BY_PARENTAL_CONTROL_TOTAL_ENABLE,   //!<  <tt>60</tt>: Restricted by the enabled settings for the overall Parental Controls.
175     TR_SERVICE_TERMINATED,                        //!<  <tt>61</tt>: Service has ended.
176 
177     TR_NOT_INITIALIZED,                           //!<   <tt>62</tt>: Not initialized.
178     TR_INVALID,                                   //!<   <tt>63</tt>: Invalid value.
179     TR_NOT_CONNECT_NETWORK,                       //!<   <tt>64</tt>: Not connected to the infrastructure network.
180 
181     TR_DATASTORE_ERROR,                           //!<   <tt>65</tt>: Error on <tt>DataStore</tt> processing.
182 
183     TR_POLICYLIST_ORDER_VERSION_UP_ERROR,         //!<   <tt>66</tt>: A system update has been indicated for the policy list, so you cannot execute tasks.
184     TR_POLICYLIST_TEMPORARILY_UNAVAILABLE,        //!<   <tt>67</tt>: The policy list is temporarily unavailable. This error occurs in situations such as when the policy list server is undergoing maintenance.
185 
186     TR_NOT_FOUND,                                 //!<   <tt>68</tt>: Not found.
187 };
188 
189 /*!
190 * @brief  Specifies supplemental information about the detailed result of a task.
191 (The numeric value of each enumerator is shown at the start of its description.)
192 */
193 enum SubTaskResultDefinition
194 {
195     STR_NONE,                                      //!<   <tt>0</tt>: No supplemental information.
196 
197     //FS error.
198     BOSS_FS_ERROR_NOT_INIT,                             //!<   <tt>1</tt>: FS error: <tt>NOT_INIT</tt>.
199     BOSS_FS_ERROR_BUSY,                                 //!<   <tt>2</tt>: FS error: <tt>BUSY</tt>.
200     BOSS_FS_ERROR_CANCELED,                             //!<   <tt>3</tt>: FS error: <tt>CANCELED</tt>.
201     BOSS_FS_ERROR_END_OF_DIRECTORY,                     //!<   <tt>4</tt>: FS error: <tt>END_OF_DIRECTORY</tt>.
202     BOSS_FS_ERROR_END_OF_FILE,                          //!<   <tt>5</tt>: FS error: <tt>END_OF_FILE</tt>.
203     BOSS_FS_ERROR_MAX_MOUNTPOINTS,                      //!<   <tt>6</tt>: FS error: <tt>ERROR_MAX_MOUNTPOINTS</tt>.
204     BOSS_FS_ERROR_MAX_VOLUMES,                          //!<   <tt>7</tt>: FS error: <tt>MAX_VOLUMES</tt>.
205     BOSS_FS_ERROR_MAX_CLIENTS,                          //!<   <tt>8</tt>: FS error: <tt>MAX_CLIENTS</tt>.
206     BOSS_FS_ERROR_MAX_FILES,                            //!<   <tt>9</tt>: FS error: <tt>MAX_FILES</tt>.
207     BOSS_FS_ERROR_MAX_DIRS,                             //!<  <tt>10</tt>: FS error: <tt>MAX_DIRS</tt>.
208     BOSS_FS_ERROR_ALREADY_OPEN,                         //!<  <tt>11</tt>: FS error: <tt>ALREADY_OPEN</tt>.
209     BOSS_FS_ERROR_ALREADY_EXISTS,                       //!<  <tt>12</tt>: FS error: <tt>ALREADY_EXISTS</tt>.
210     BOSS_FS_ERROR_NOT_FOUND,                            //!<  <tt>13</tt>: FS error: <tt>NOT_FOUND</tt>.
211     BOSS_FS_ERROR_NOT_EMPTY,                            //!<  <tt>14</tt>: FS error: <tt>NOT_EMPTY</tt>.
212     BOSS_FS_ERROR_ACCESS_ERROR,                         //!<  <tt>15</tt>: FS error: <tt>ACCESS_ERROR</tt>.
213     BOSS_FS_ERROR_PERMISSION_ERROR,                     //!<  <tt>16</tt>: FS error: <tt>PERMISSION_ERROR</tt>.
214     BOSS_FS_ERROR_DATA_CORRUPTED,                       //!<  <tt>17</tt>: FS error: <tt>DATA_CORRUPTED</tt>.
215     BOSS_FS_ERROR_STORAGE_FULL,                         //!<  <tt>18</tt>: FS error: <tt>STORAGE_FULL</tt>.
216     BOSS_FS_ERROR_JOURNAL_FULL,                         //!<  <tt>19</tt>: FS error: <tt>JOURNAL_FULL</tt>.
217     BOSS_FS_ERROR_UNAVAILABLE_CMD,                      //!<  <tt>20</tt>: FS error: <tt>UNAVAILABLE_CMD</tt>.
218     BOSS_FS_ERROR_UNSUPPORTED_CMD,                      //!<  <tt>21</tt>: FS error: <tt>UNSUPPORTED_CMD</tt>.
219     BOSS_FS_ERROR_INVALID_PARAM,                        //!<  <tt>22</tt>: FS error: <tt>INVALID_PARAM</tt>.
220     BOSS_FS_ERROR_INVALID_PATH,                         //!<  <tt>23</tt>: FS error: <tt>INVALID_PATH</tt>.
221     BOSS_FS_ERROR_INVALID_BUFFER,                       //!<  <tt>24</tt>: FS error: <tt>INVALID_BUFFER</tt>.
222     BOSS_FS_ERROR_INVALID_ALIGNMENT,                    //!<  <tt>25</tt>: FS error: <tt>INVALID_ALIGNMENT</tt>.
223     BOSS_FS_ERROR_INVALID_CLIENT_HANDLE,                //!<  <tt>26</tt>: FS error: <tt>INVALID_CLIENT_HANDLE</tt>.
224     BOSS_FS_ERROR_INVALID_FILE_HANDLE,                  //!<  <tt>27</tt>: FS error: <tt>INVALID_FILE_HANDLE</tt>.
225     BOSS_FS_ERROR_INVALID_DIR_HANDLE,                   //!<  <tt>28</tt>: FS error: <tt>INVALID_DIR_HANDLE</tt>.
226     BOSS_FS_ERROR_NOT_FILE,                             //!<  <tt>29</tt>: FS error: <tt>NOT_FILE</tt>.
227     BOSS_FS_ERROR_NOT_DIR,                              //!<  <tt>30</tt>: FS error: <tt>NOT_DIR</tt>.
228     BOSS_FS_ERROR_FILE_TOO_BIG,                         //!<  <tt>31</tt>: FS error: <tt>FILE_TOO_BIG</tt>.
229     BOSS_FS_ERROR_OUT_OF_RANGE,                         //!<  <tt>32</tt>: FS error: <tt>OUT_OF_RANGE</tt>.
230     BOSS_FS_ERROR_OUT_OF_RESOURCES,                     //!<  <tt>33</tt>: FS error: <tt>OUT_OF_RESOURCES</tt>.
231     BOSS_FS_ERROR_MEDIA_NOT_READY,                      //!<  <tt>34</tt>: FS error: <tt>MEDIA_NOT_READY</tt>.
232     BOSS_FS_ERROR_MEDIA_ERROR,                          //!<  <tt>35</tt>: FS error: <tt>MEDIA_ERROR</tt>.
233     BOSS_FS_ERROR_WRITE_PROTECTED,                      //!<  <tt>36</tt>: FS error: <tt>WRITE_PROTECTED</tt>.
234     BOSS_FS_ERROR_UNKNOWN,                              //!<  <tt>37</tt>: FS error: <tt>UNKNOWN</tt>.
235 
236     //HTTP error.
237     HTTP_ERROR_UNSUPPORTED_PROTOCOL,               //!<  <tt>38</tt>: HTTP stack error: <tt>UNSUPPORTED_PROTOCOL</tt>.
238     HTTP_ERROR_FAILED_INIT,                        //!<  <tt>39</tt>: HTTP stack error: <tt>FAILED_INIT</tt>.
239     HTTP_ERROR_URL_MALFORMAT,                      //!<  <tt>40</tt>: HTTP stack error: <tt>URL_MALFORMAT</tt>.
240     HTTP_ERROR_NOT_BUILT_IN,                       //!<  <tt>41</tt>: HTTP stack error: <tt>NOT_BUILT_IN</tt>.
241     HTTP_ERROR_COULDNT_RESOLVE_PROXY,              //!<  <tt>42</tt>: HTTP stack error: <tt>COULDNT_RESOLVE_PROXY</tt>.
242     HTTP_ERROR_COULDNT_RESOLVE_HOST,               //!<  <tt>43</tt>: HTTP stack error: <tt>COULDNT_RESOLVE_HOST</tt>.
243     HTTP_ERROR_COULDNT_CONNECT,                    //!<  <tt>44</tt>: HTTP stack error: <tt>COULDNT_CONNECT</tt>.
244     HTTP_ERROR_REMOTE_ACCESS_DENIED,               //!<  <tt>45</tt>: HTTP stack error: <tt>REMOTE_ACCESS_DENIED</tt>.
245     HTTP_ERROR_PARTIAL_FILE,                       //!<  <tt>46</tt>: HTTP stack error: <tt>PARTIAL_FILE</tt>.
246     HTTP_ERROR_QUOTE_ERROR,                        //!<  <tt>47</tt>: HTTP stack error: <tt>QUOTE_ERROR</tt>.
247     HTTP_ERROR_HTTP_RETURNED_ERROR,                //!<  <tt>48</tt>: HTTP stack error: <tt>HTTP_RETURNED_ERROR</tt>.
248     HTTP_ERROR_WRITE_ERROR,                        //!<  <tt>49</tt>: HTTP stack error: <tt>WRITE_ERROR</tt>.
249     HTTP_ERROR_UPLOAD_FAILED,                      //!<  <tt>50</tt>: HTTP stack error: <tt>UPLOAD_FAILED</tt>.
250     HTTP_ERROR_READ_ERROR,                         //!<  <tt>51</tt>: HTTP stack error: <tt>READ_ERROR</tt>.
251     HTTP_ERROR_OUT_OF_MEMORY,                      //!<  <tt>52</tt>: HTTP stack error: <tt>OUT_OF_MEMORY</tt>.
252     HTTP_ERROR_OPERATION_TIMEDOUT,                 //!<  <tt>53</tt>: HTTP stack error: <tt>OPERATION_TIMEDOUT</tt>.
253     HTTP_ERROR_RANGE_ERROR,                        //!<  <tt>54</tt>: HTTP stack error: <tt>RANGE_ERROR</tt>.
254     HTTP_ERROR_HTTP_POST_ERROR,                    //!<  <tt>55</tt>: HTTP stack error: <tt>HTTP_POST_ERROR</tt>.
255     HTTP_ERROR_SSL_CONNECT_ERROR,                  //!<  <tt>56</tt>: HTTP stack error: <tt>SSL_CONNECT_ERROR</tt>.
256     HTTP_ERROR_BAD_DOWNLOAD_RESUME,                //!<  <tt>57</tt>: HTTP stack error: <tt>BAD_DOWNLOAD_RESUME</tt>.
257     HTTP_ERROR_INTERFACE_FAILED,                   //!<  <tt>58</tt>: HTTP stack error: <tt>INTERFACE_FAILED</tt>.
258     HTTP_ERROR_TOO_MANY_REDIRECTS,                 //!<  <tt>59</tt>: HTTP stack error: <tt>TOO_MANY_REDIRECTS</tt>.
259     HTTP_ERROR_UNKNOWN_OPTION,                     //!<  <tt>60</tt>: HTTP stack error: <tt>UNKNOWN_OPTION</tt>.
260     HTTP_ERROR_PEER_FAILED_VERIFICATION,           //!<  <tt>61</tt>: HTTP stack error: <tt>PEER_FAILED_VERIFICATION</tt>.
261     HTTP_ERROR_GOT_NOTHING,                        //!<  <tt>62</tt>: HTTP stack error: <tt>GOT_NOTHING</tt>.
262     HTTP_ERROR_SSL_ENGINE_NOTFOUND,                //!<  <tt>63</tt>: HTTP stack error: <tt>SSL_ENGINE_NOTFOUND</tt>.
263     HTTP_ERROR_SSL_ENGINE_SETFAILED,               //!<  <tt>64</tt>: HTTP stack error: <tt>SSL_ENGINE_SETFAILED</tt>.
264     HTTP_ERROR_SEND_ERROR,                         //!<  <tt>65</tt>: HTTP stack error: <tt>SEND_ERROR</tt>.
265     HTTP_ERROR_RECV_ERROR,                         //!<  <tt>66</tt>: HTTP stack error: <tt>RECV_ERROR</tt>.
266     HTTP_ERROR_SSL_CERTPROBLEM,                    //!<  <tt>67</tt>: HTTP stack error: <tt>SSL_CERTPROBLEM</tt>.
267     HTTP_ERROR_SSL_CIPHER,                         //!<  <tt>68</tt>: HTTP stack error: <tt>SSL_CIPHER</tt>.
268     HTTP_ERROR_SSL_CACERT,                         //!<  <tt>69</tt>: HTTP stack error: <tt>SSL_CACERT</tt>.
269     HTTP_ERROR_USE_SSL_FAILED,                     //!<  <tt>70</tt>: HTTP stack error: <tt>USE_SSL_FAILED</tt>.
270     HTTP_ERROR_SEND_FAIL_REWIND,                   //!<  <tt>71</tt>: HTTP stack error: <tt>SEND_FAIL_REWIND</tt>.
271     HTTP_ERROR_SSL_ENGINE_INITFAILED,              //!<  <tt>72</tt>: HTTP stack error: <tt>SSL_ENGINE_INITFAILED</tt>.
272     HTTP_ERROR_LOGIN_DENIED,                       //!<  <tt>73</tt>: HTTP stack error: <tt>LOGIN_DENIED</tt>.
273     HTTP_ERROR_CONV_FAILED,                        //!<  <tt>74</tt>: HTTP stack error: <tt>CONV_FAILED</tt>.
274     HTTP_ERROR_CONV_REQD,                          //!<  <tt>75</tt>: HTTP stack error: <tt>CONV_REQD</tt>.
275     HTTP_ERROR_SSL_CACERT_BADFILE,                 //!<  <tt>76</tt>: HTTP stack error: <tt>SSL_CACERT_BADFILE</tt>.
276     HTTP_ERROR_SSL_SHUTDOWN_FAILED,                //!<  <tt>77</tt>: HTTP stack error: <tt>SSL_SHUTDOWN_FAILED</tt>.
277     HTTP_ERROR_AGAIN,                              //!<  <tt>78</tt>:  HTTP stack error: <tt>AGAIN</tt>.
278     HTTP_ERROR_SSL_CRL_BADFILE,                    //!<  <tt>79</tt>: HTTP stack error: <tt>SSL_CRL_BADFILE</tt>.
279     HTTP_ERROR_SSL_ISSUER_ERROR,                   //!<  <tt>80</tt>: HTTP stack error: <tt>SSL_ISSUER_ERROR</tt>.
280     HTTP_ERROR_CHUNK_FAILED,                       //!<  <tt>81</tt>: HTTP stack error: <tt>CHUNK_FAILED</tt>.
281 
282     HTTP_ERROR_SSL_INVALID_NSSL_CTX,               //!<  <tt>82</tt>: HTTP stack error: <tt>SSL_INVALID_NSSL_CTX</tt>.
283     HTTP_ERROR_SSL_INVALID_CERTID,                 //!<  <tt>83</tt>: HTTP stack error: <tt>SSL_INVALID_CERTID</tt>.
284     HTTP_ERROR_SSL_CERT_LIMIT,                     //!<  <tt>84</tt>: HTTP stack error: <tt>SSL_CERT_LIMIT</tt>.
285     HTTP_ERROR_SSL_INVALID_NSSL_CONNECTION,        //!<  <tt>85</tt>: HTTP stack error: <tt>SSL_INVALID_NSSL_CONNECTION</tt>.
286     HTTP_ERROR_SSL_INVALID_CERT,                   //!<  <tt>86</tt>: HTTP stack error: <tt>SSL_INVALID_CERT</tt>.
287     HTTP_ERROR_SSL_ZERO_RETURN,                    //!<  <tt>87</tt>: HTTP stack error: <tt>SSL_ZERO_RETURN</tt>.
288     HTTP_ERROR_SSL_WANT_READ,                      //!<  <tt>88</tt>: HTTP stack error: <tt>SSL_WANT_READ</tt>.
289     HTTP_ERROR_SSL_WANT_WRITE,                     //!<  <tt>89</tt>: HTTP stack error: <tt>SSL_WANT_WRITE</tt>.
290     HTTP_ERROR_SSL_IO_ERROR,                       //!<  <tt>90</tt>: HTTP stack error: <tt>SSL_IO_ERROR</tt>.
291     HTTP_ERROR_SSL_NSSLLIB_ERROR,                  //!<  <tt>91</tt>: HTTP stack error: <tt>SSL_NSSLLIB_ERROR</tt>.
292     HTTP_ERROR_SSL_UNKNOWN,                        //!<  <tt>92</tt>: HTTP stack error: <tt>SSL_UNKNOWN</tt>.
293     HTTP_ERROR_SSL_OUT_OF_MEMORY,                  //!<  <tt>93</tt>: HTTP stack error: <tt>SSL_OUT_OF_MEMORY</tt>.
294     HTTP_ERROR_SSL_INVALID_STATE,                  //!<  <tt>94</tt>: HTTP stack error: <tt>SSL_INVALID_STATE</tt>.
295     HTTP_ERROR_SSL_HANDSHAKE_ERROR,                //!<  <tt>95</tt>: HTTP stack error: <tt>SSL_HANDSHAKE_ERROR</tt>.
296     HTTP_ERROR_SSL_NO_CERT,                        //!<  <tt>96</tt>: HTTP stack error: <tt>SSL_NO_CERT</tt>.
297     HTTP_ERROR_SSL_INVALID_FD,                     //!<  <tt>97</tt>: HTTP stack error: <tt>SSL_INVALID_FD</tt>.
298     HTTP_ERROR_SSL_LIB_NOT_READY,                  //!<  <tt>98</tt>: HTTP stack error: <tt>SSL_LIB_NOT_READY</tt>.
299     HTTP_ERROR_SSL_IPC_ERROR,                      //!<  <tt>99</tt>: HTTP stack error: <tt>SSL_IPC_ERROR</tt>.
300     HTTP_ERROR_SSL_RESOURCE_LIMIT,                 //!< <tt>100</tt>: HTTP stack error: <tt>SSL_RESOURCE_LIMIT</tt>.
301     HTTP_ERROR_SSL_INVALID_HANDLE,                 //!< <tt>101</tt>: HTTP stack error: <tt>SSL_INVALID_HANDLE</tt>.
302     HTTP_ERROR_SSL_INVALID_CERT_TYPE,              //!< <tt>102</tt>: HTTP stack error: <tt>SSL_INVALID_CERT_TYPE</tt>.
303     HTTP_ERROR_SSL_INVALID_KEY_TYPE,               //!< <tt>103</tt>: HTTP stack error: <tt>SSL_INVALID_KEY_TYPE</tt>.
304     HTTP_ERROR_SSL_INVALID_SIZE,                   //!< <tt>104</tt>: HTTP stack error: <tt>SSL_INVALID_SIZE</tt>.
305     HTTP_ERROR_SSL_NO_PEER_CERT,                   //!< <tt>105</tt>: HTTP stack error: <tt>SSL_NO_PEER_CERT</tt>.
306     HTTP_ERROR_SSL_INSUFFICIENT_SIZE,              //!< <tt>106</tt>: HTTP stack error: <tt>SSL_INSUFFICIENT_SIZE</tt>.
307     HTTP_ERROR_SSL_NO_CIPHER,                      //!< <tt>107</tt>: HTTP stack error: <tt>SSL_NO_CIPHER</tt>.
308     HTTP_ERROR_SSL_INVALID_ARG,                    //!< <tt>108</tt>: HTTP stack error: <tt>SSL_INVALID_ARG</tt>.
309 
310     HTTP_ERROR_TIMEOUT,                            //!< <tt>109</tt>: HTTP communication timeout.
311     HTTP_ERROR_401_UNAUTHORIZED,                   //!< <tt>110</tt>: Received status code 401 Unauthorized.
312     HTTP_ERROR_403_FORBIDDEN,                      //!< <tt>111</tt>: Received status code 403 Forbidden.
313     HTTP_ERROR_404_NOT_FOUND,                      //!< <tt>112</tt>: Received status code 404 Not Found.
314     HTTP_ERROR_408_REQUEST_TIMEOUT,                //!< <tt>113</tt>: Received status code 408 Request Timeout.
315     HTTP_ERROR_416_REQUESTED_RANGE_NOT_SATISFABLE, //!< <tt>114</tt>: Received status code 416 Requested Range Not Satisfiable.
316     HTTP_ERROR_500_INTERNAL_SERVER_ERROR,          //!< <tt>115</tt>: Received status code 500 Internal Server Error.
317     HTTP_ERROR_502_BAD_GATEWAY,                    //!< <tt>116</tt>: Received status code 502 Bad Gateway.
318     HTTP_ERROR_503_SERVICE_UNAVAILABLE,            //!< <tt>117</tt>: Received status code 503 Service Unavailable.
319     HTTP_ERROR_504_GATEWAY_TIMEOUT,                //!< <tt>118</tt>: Received status code 504 Gateway Timeout.
320     HTTP_ERROR_505_VERSION_NOT_SUPPORTED,          //!< <tt>119</tt>: Received status code 505 Version Not Supported.
321     HTTP_ERROR_UNSUPPORTED_STATUS,                 //!< <tt>120</tt>: Received a 1xx, 3xx, 4xx, or 5xx error other than the previous errors during HTTP communication.
322     HTTP_ERROR_DISCONNECTED,                       //!< <tt>121</tt>: Loss of connection error.
323     HTTP_ERROR_UNKNOWN,                            //!< <tt>122</tt>: HTTP error, cause unknown.
324 
325     NOT_EXIST_FILE,                                //!< <tt>123</tt>: <tt>NotExist</tt>. (The file does not exist.)
326     NOT_EXIST_BOSSSTORAGE,                         //!< <tt>124</tt>: <tt>NotExist</tt>. (BOSS storage does not exist.)
327     NOT_EXIST_DB,                                  //!< <tt>125</tt>: <tt>NotExist</tt>. (The database does not exist.)
328     NOT_EXIST_RECORD,                              //!< <tt>126</tt>: <tt>NotExist</tt>. (The relevant record does not exist in the database.)
329 
330     HTTP_ERROR_NSSL_NO_CTX,                        //!< <tt>127</tt>: HTTP stack error: <tt>NSSL_NO_CTX</tt>.
331     HTTP_ERROR_READ_DEFAULT_PROXY,                 //!< <tt>128</tt>: HTTP stack error: <tt>READ_DEFAULT_PROXY</tt>.
332     HTTP_ERROR_DEFAULT_PROXY_NOT_READY,            //!< <tt>129</tt>: HTTP stack error: <tt>DEFAULT_PROXY_NOT_READY</tt>.
333     HTTP_ERROR_INIT_INTERNAL_MUTEX,                //!< <tt>130</tt>: HTTP stack error: <tt>INIT_INTERNAL_MUTEX</tt>.
334 
335     HTTP_ERROR_UNEXPECTED_LAST_MODIFIED_TIME_CHANGED,  //!< <tt>131</tt>: <tt>LastModifiedTime</tt> changed, but was not expected to.
336     HTTP_ERROR_UNEXPECTED_CONTENT_LENGTH_CHANGED,      //!< <tt>132</tt>: <tt>ContentLength</tt> changed, but was not expected to.
337     HTTP_ERROR_TOO_BIG_CONTENT_LENGTH,                 //!< <tt>133</tt>: <tt>ContentLength</tt> is larger than the expected maximum value.
338 
339     STR_NOT_FOUND_BOSS_STORAGE,                     //!<   <tt>134</tt>: BOSS storage could not be found.
340 
341     // <tt>DataStore</tt> error.
342     DATASTORE_DNS,                                   //!< <tt>135</tt>:  A DNS-related error occurred in <tt>DataStore</tt> communication. This error also occurs when the specified game server ID is invalid.
343     DATASTORE_PROXY,                                 //!< <tt>136</tt>:  An HTTP proxy-related error occurred in <tt>DataStore</tt> communication.
344     DATASTORE_CONNECTION_RESET,                      //!< <tt>137</tt>:  The connection was lost during <tt>DataStore</tt> communication.
345     DATASTORE_SERVER_REQUEST_ERROR,                  //!< <tt>138</tt>: The access key specified for <tt>DataStore</tt> communication is invalid.
346     DATASTORE_TEMPORARY_SERVER_ERROR,                //!< <tt>139</tt>: A temporary internal server error occurred in <tt>DataStore</tt> communication.
347     DATASTORE_PERMANENT_SERVER_ERROR,                //!< <tt>140 </tt>: A permanent internal server error occurred in <tt>DataStore</tt> communication.
348     DATASTORE_SERVICE_UNAVAILABLE,                   //!< <tt>141</tt>: The service stopped because the <tt>DataStore</tt> communication server is temporarily overloaded or under maintenance.
349     DATASTORE_CONNECTION_UNKNOWN,                    //!< <tt>142 </tt>:  A communication-related error other than those above occurred in <tt>DataStore</tt> communication.
350     DATASTORE_VALIDATION_ERROR,                      //!< <tt>143 </tt>: The password of the account for <tt>DataStore</tt> communication is invalid.
351     DATASTORE_INTERNAL_ERROR,                        //!< <tt>144 </tt>: An internal client error occurred in <tt>DataStore</tt> communication.
352     DATASTORE_INVALID_ARGUMENT,                      //!< <tt>143 </tt>: An invalid argument was passed in <tt>DataStore</tt> communication.
353     DATASTORE_TIMEOUT,                               //!< <tt>146</tt>: A timeout occurred in <tt>DataStore</tt> communication.
354     DATASTORE_UNKNOWN,                               //!< <tt>144 </tt>: Some other error occurred in <tt>DataStore</tt> communication.
355 
356     SIZE_FULL,                                       //!< <tt>148</tt>: The size is full.
357     COUNT_FULL,                                      //!< <tt>149 </tt>: The count is full.
358 
359     // DataStore error 2.
360     DATASTORE_NOT_CONNECTED_FRIEND_SERVER,           //!< <tt>150</tt>: Cannot start DataStore communication because the account that registered the task has never connected to the target friend server.
361     DATASTORE_PERMISSION_DENIED,                     //!< <tt>151</tt>: The task is a DataStore upload task for updating data, but the account that registered the task does not have update permissions for the data to be updated.
362     DATASTORE_DATA_NOT_FOUND,                        //!< <tt>152</tt>: The task is a DataStore upload task for updating data, but the data to be updated does not exist on the DataStore server.
363     DATASTORE_DATA_UNDER_REVIEWING,                  //!< <tt>153</tt>: The task is a DataStore upload task for updating data, but the <tt>DATA_FLAG_NEED_REVIEW</tt> flag is set on the data to be updated.
364     DATASTORE_OPERATION_NOT_ALLOWED,                 //!< <tt>154</tt>: The task is a DataStore upload task for updating data, but the data to be updated does not use the storage server.
365     DATASTORE_INVALID_PASSWORD,                      //!< <tt>155</tt>: The task is a DataStore upload task for updating data, but the account that registered the task does not have update permissions for the data to be updated and the specified password is invalid.
366 
367     STR_MAXIMUM_LIMIT                              //!< Maximum boundary of the <tt>SubTaskResultDefinition</tt> enumerator. No enumerator with a greater value than this value exists.
368 };
369 
370 /*!
371 @brief  Specifies the states within a task turn.
372 (The numeric value of each enumerator is shown at the start of its description.)
373 */
374 enum TaskRegisterResult
375 {
376     TRR_SUCCESS     = 0,       //!<  <tt>0</tt>: Registered.
377     TRR_FAILURE     = 1        //!<  <tt>1</tt>: Registration failed.
378 };
379 
380 
381 /*!
382 @brief  Specifies task priorities.
383 (The numeric value of each enumerator is shown at the start of its description.)
384 */
385 enum TaskPriority
386 {
387     PRIORITY_EXPEDITE   = 35,       //!<  <tt>35</tt>: Priority setting for the highest-priority tasks.
388     PRIORITY_HIGH       = 80,       //!<  <tt>80</tt>: Priority setting for high-priority tasks.
389     PRIORITY_MEDIUM     = 125,      //!< <tt>125</tt>: Priority setting for medium-priority tasks.
390     PRIORITY_LOW        = 170,      //!< <tt>170</tt>: Priority setting for low-priority tasks.
391     PRIORITY_LOWEST     = 215,      //!< <tt>215</tt>: Priority setting for the lowest-priority tasks.
392     PRIORITY_STOPPED    = 255,      //!< <tt>255</tt>: Priority setting for tasks that have been stopped.
393     PRIORITY_MAX_VALUE = (0x1u << 7)    //!< (The enumerator used during internal processing. This enumerator cannot be used by applications.)
394 };
395 
396 
397 /*!
398 @brief  Specifies states for BOSS as a whole.
399 (The numeric value of each enumerator is shown at the start of its description.)
400 */
401 enum BossState
402 {
403     BS_UNKNOWM,                               //!<  <tt>0</tt>: Unknown.
404     BS_STOPPED,                               //!<  <tt>1</tt>: BOSS is not running.
405     BS_INOPERABLE_BY_SYSTEM,                  //!<  <tt>2</tt>: BOSS operation is prohibited by the system.
406     BS_INOPERABLE_WITHOUT_POLICYLIST,         //!<  <tt>3</tt>: BOSS cannot be operated because the policy list cannot be obtained.
407     BS_INOPERABLE_BY_POLICYLIST,              //!<  <tt>4</tt>: BOSS operation is prohibited by the policy list.
408     BS_INOPERABLE_FOR_OLD_VERSION,            //!<  <tt>5</tt>: BOSS cannot be operated because the version is out of date.
409     BS_OPERABLE_FG,                           //!<  <tt>6</tt>: BOSS can process only tasks while in the foreground.
410     BS_OPERABLE_FG_BG,                        //!<  <tt>7</tt>: BOSS can process tasks while in the foreground and the background.
411     BS_FATAL = 255                            //!<  <tt>255</tt>: BOSS cannot operate because of a fatal error.
412 };
413 
414 /*!
415 @brief  Specifies HTTP protocols.
416 (The numeric value of each enumerator is shown at the start of its description.)
417 */
418 enum HttpProtocol
419 {
420     HTTP_GET,                          //!<  <tt>0</tt>: GET protocol.
421     HTTP_POST,                         //!<  <tt>1</tt>: POST protocol.
422 };
423 
424 /*!
425 @brief  Specifies BOSS storage types.
426 (The numeric value of each enumerator is shown at the start of its description.)
427 */
428 enum StorageKind
429 {
430     BSKIND_NBDL = 0,                          //!<  <tt>0</tt>: NBDL storage.
431     BSKIND_RAWDL = 1,                         //!<  <tt>1</tt>: <tt>RawDL</tt> type storage.
432     BSKIND_DATASTORE = 2,                     //!<  <tt>2</tt>: <tt>DataStore</tt> type storage.
433     BSKIND_NBDL_DATA_LIST = 3                 //!<  <tt>3</tt>: NBDL data list storage.
434 };
435 
436 /*!
437 @brief  Specifies constants that represent the positions of file read/write operations.
438 */
439 enum PositionBase
440 {
441     POSITION_BASE_BEGIN,    //!< Specifies the starting position relative to the beginning of the file.
442     POSITION_BASE_CURRENT,  //!< Specifies the starting position relative to the current position in the file.
443     POSITION_BASE_END       //!< Specifies the starting position relative to the end of the file.
444 };
445 
446 /*!
447 @brief  Specifies the states of tasks that can wait.
448 (The numeric value of each enumerator is shown at the start of its description.)
449 */
450 enum TaskWaitState
451 {
452     TWS_DONE               = 1,             //!<  <tt>1</tt>: Task execution finished (with success or with errors.)
453 };
454 
455 /*!
456 @brief  Defines the state of a task immediately after calling the <tt>@ref Task::Cancel()</tt> function to cancel the running task. Passed as an argument to the <tt>@ref Task::Cancel()</tt> function.
457 (The numeric value of each enumerator is shown at the start of its description.)
458 */
459 enum CancelMode
460 {
461     CANCEL_TO_STOP                = 1,             //!<  <tt>1</tt>: Sets to the <tt>STOP</tt> state. The task execution result is an error as a scheduling mode. It transitions to a <tt>WAITING_TIME</tt> state.
462     CANCEL_TO_RETRY               = 2,             //!<  <tt>2</tt>: Sets to a <tt>RETRY</tt> state. When the task enters an executable state, a retry is executed immediately.
463     CANCEL_TO_RETRY_BACK_BURNER   = 3,             //!<  <tt>3</tt>: Enters a retry state, but places the task at the last position in the list of executable tasks.
464 };
465 
466 /*!
467 @brief  Defines the algorithm for calculating the hash value of the data.
468 */
469 enum HashType
470 {
471     HT_SHA1 = 1        //!< SHA1 (160 bit)
472 };
473 
474 /*!
475 @brief  Specifies the size of a task setting record.
476 */
477 static const size_t TASK_SETTING_RECORD_SIZE = 3072;
478 
479 /*!
480 @brief  Specifies the size of a task state record.
481 */
482 static const size_t TASK_STATE_RECORD_SIZE = 1024;
483 
484 /*!
485 @brief  Specifies the size of a task record.
486 */
487 static const size_t TASK_RECORD_SIZE = TASK_SETTING_RECORD_SIZE+TASK_STATE_RECORD_SIZE;
488 
489 
490 /*!
491 @brief  Specifies the maximum length for file paths in BOSS storage.
492 */
493 static const u32 FILEPATH_IN_BOSSSTORAGE_MAX_LENGTH = 128;
494 
495 /*!
496 @brief  Specifies the maximum length of file paths that BOSS can handle.
497 */
498 static const u32 FILEFULLPATH_MAX_LENGTH_WITH_NULL = 512;
499 
500 /*!
501 @brief  Specifies the maximum number of directory hierarchy levels for file paths that BOSS can handle.
502 */
503 static const u32 FILEPATH_MAX_DIRECTORY = 128;
504 
505 /*!
506 @brief  Specifies the maximum length for NS filenames in BOSS storage (including the terminating null character).
507 */
508 static const u32 NSDATA_NAME_MAX_LENGTH_WITH_NULL = 32;
509 
510 /*!
511 @brief  Specifies the maximum length for directory names in BOSS storage (including the <tt>NULL</tt> terminating character).
512 */
513 static const u32 BOSSSTORAGE_DIRECTORY_NAME_MAX_LENGTH_WITH_NULL = 8;
514 
515 /*!
516 @brief  Specifies the maximum length of task IDs (including the <tt>NULL</tt> terminating character).
517 */
518 static const u32 TASK_ID_LENGTH_WITH_NULL = 8;
519 
520 /*!
521 @brief  Specifies the maximum URL length (including the <tt>NULL</tt> terminating character).
522 */
523 static const u32 URL_MAX_LENGTH_WITH_NULL = 256;
524 
525 /*!
526 @brief  Specifies the maximum length for the <tt>LastModifiedTime</tt> string (including the <tt>NULL</tt> terminating character).
527 */
528 static const u32 HTTP_LAST_MODIFIED_TIME_STR_MAX_LENGTH_WITH_NULL = 64;
529 
530 /*!
531 @brief  Specifies the maximum length for labels in HTTP request headers (including the <tt>NULL</tt> terminating character).
532 */
533 static const u32 HTTP_REQUEST_HEADER_LABEL_MAX_LENGTH_WITH_NULL = 32;
534 
535 /*!
536 @brief  Specifies the maximum length of an HTTP request header (including the <tt>NULL</tt> terminating character).
537 */
538 static const u32 HTTP_REQUEST_HEADER_VALUE_MAX_LENGTH_WITH_NULL = 64;
539 
540 /*!
541 @brief  Specifies the maximum number of custom HTTP request headers.
542 */
543 static const u32 HTTP_REQUEST_PRIVATE_HEADER_MAX_COUNT = 3;
544 
545 /*!
546 @brief  Specifies the maximum number of custom HTTP request queries.
547 */
548 static const u32 HTTP_PRIVATE_QUERY_MAX_COUNT = 3;
549 
550 /*!
551 @brief  Specifies the maximum number of custom CA certificates to use during HTTP communication.
552 */
553 static const u32 HTTP_PRIVATE_CACERT_MAX_COUNT = 3;
554 
555 /*!
556 @brief  Specifies the maximum size of custom CA certificates to use during HTTP communication.
557 */
558 static const size_t HTTP_PRIVATE_CACERT_MAX_SIZE = 4096;
559 
560 /*!
561 @brief  Specifies the maximum size of custom client certificates to use during HTTP communication.
562 */
563 static const size_t HTTP_PRIVATE_CLIENTCERT_MAX_SIZE = 4096;
564 
565 /*!
566 @brief  Specifies the maximum size of custom client certificate keys to use during HTTP communication.
567 */
568 static const size_t HTTP_PRIVATE_CLIENTCERTKEY_MAX_SIZE = 4096;
569 
570 /*!
571 @brief  Specifies the maximum number of custom internal CA certificates to use during HTTP communication.
572 */
573 static const u32 HTTP_INTERNAL_CACERT_MAX_COUNT = 3;
574 
575 /*!
576 @brief  Specifies the maximum length for names of custom HTTP queries (including the <tt>NULL</tt> terminating character).
577 */
578 static const u32 HTTP_PRIVATE_QUERY_NAME_MAX_LENGTH_WITH_NULL = 16;
579 
580 /*!
581 @brief  Specifies query types.
582 (The numeric value of each enumerator is shown at the start of its description.)
583 */
584 enum QueryKind
585 {
586     QK_NONE,                          //!<  <tt>0</tt>: None.
587     QK_REGION,                        //!<  <tt>1</tt>: Regions.
588     QK_SYSTEM_LANGUAGE,               //!<  <tt>2</tt>: Language Setting (System).
589     QK_SYSTEM_COUNTRY                 //!<  <tt>3</tt>: Country Setting (System).
590 };
591 
592 /*!
593 @brief  Specifies the maximum length for names of custom HTTP queries (including the <tt>NULL</tt> terminating character).
594 */
595 static const u32 BOSS_CODE_MAX_LENGTH_WITH_NULL = 32;
596 
597 /*!
598 @brief  Specifies the service token size.
599 */
600 static const u32 SERVICE_TOKEN_SIZE = 512;
601 
602 /*!
603 @brief  Specifies the maximum number of files that can be in the download directory for a single NBDL task.
604 */
605 static const u32 NBDL_DATA_MAX_COUNT_IN_DOWNLOAD_DIRECTORY = 512;
606 
607 /*!
608 @brief  Specifies the maximum length for certificate names.
609 */
610 static const u32 MAX_CERT_NAME_WITH_NULL = 16;
611 
612 /*!
613 @brief  Specifies the maximum number of accounts that can be on a system.
614 */
615 static const u32 SYSTEM_MAX_ACOUNT_COUNT = 12;
616 
617 /*!
618 @brief  Specifies the default filename for <tt>RawDL</tt> tasks.
619 */
620 static const char RAWDL_DEFAULT_FILE_NAME[] = "rawcontent.dat";
621 
622 /*!
623 @brief  Specifies the size of a large HTTP request header label.
624 */
625 static const u32 LARGE_HTTP_REQUEST_HEADER_LABEL_MAX_LENGTH_WITH_NULL = 32;
626 
627 /*!
628 @brief  Specifies the size of a large HTTP request header value.
629 */
630 static const u32 LARGE_HTTP_REQUEST_HEADER_VALUE_MAX_LENGTH_WITH_NULL = 512;
631 
632 /*!
633 @brief  A legacy constant. Use the equivalent <tt>@ref LARGE_HTTP_REQUEST_HEADER_LABEL_MAX_LENGTH_WITH_NULL</tt> instead.
634 
635 Specifies the size of a large HTTP request header label for <tt>RawDL</tt> tasks.
636 */
637 static const u32 RAWDL_LARGE_HTTP_REQUEST_HEADER_LABEL_MAX_LENGTH_WITH_NULL = LARGE_HTTP_REQUEST_HEADER_LABEL_MAX_LENGTH_WITH_NULL;
638 
639 /*!
640 @brief  A legacy constant. Use the equivalent <tt>@ref LARGE_HTTP_REQUEST_HEADER_VALUE_MAX_LENGTH_WITH_NULL</tt> instead.
641 
642 Specifies the size of a large HTTP request header value for <tt>RawDL</tt> tasks.
643 */
644 static const u32 RAWDL_LARGE_HTTP_REQUEST_HEADER_VALUE_MAX_LENGTH_WITH_NULL = LARGE_HTTP_REQUEST_HEADER_VALUE_MAX_LENGTH_WITH_NULL;
645 
646 /*!
647 @brief  Specifies the default task interval, in seconds.
648 */
649 static const u32 DEFAULT_TASK_INTERVAL_SEC = 8 * 60 * 60; //8 hours
650 
651 /*!
652 @brief  Specifies the default task execution time (lifetime), in seconds.
653 */
654 static const u32 DEFAULT_TASK_LIFETIME_SEC = 90 * 24 * 60 * 60; //90 days
655 
656 /*!
657 @brief  Specifies the default task HTTP timeout, in seconds. (In HTTP communication performed when executing tasks, if no data is communicated for this length of time, the task results in a timeout error.))
658 */
659 static const u32 DEFAULT_TASK_HTTP_TIMEOUT_SEC = 2 * 60; //2 minutes
660 
661 /*!
662 @brief  Specifies a task ID that can only be used in an NBDL data list task.
663 */
664 static const char NBDL_DATA_LIST_DEDICATED_TASK_ID[TASK_ID_LENGTH_WITH_NULL] = "#NDLIST";
665 
666 /*!
667    @}
668    @}
669 */
670 
671 } // end of namespace boss
672 } // end of namespace nn
673 
674 
675 #endif /*__cplusplus*/
676 
677 #endif /* NN_BOSS_BOSS_CONST_H_ */
678