nn::boss::RegisterTask Functionnn::Result RegisterTask( Task * pTask, TaskPolicy * pPolicy, TaskAction * pAction, const char * pFilePath, TaskOption * pOption = NULL, u8 taskStep = DEFAULT_STEP_ID );
| Name | Description | |
|---|---|---|
| in | pTask | Specifies a task by task ID. |
| in | pPolicy | Specifies a task policy. |
| in | pAction | Specifies a task action. (Currently, the only related tasks are in the NsaDownloadAction class.) |
| in | pFilePath | File path. |
| in | pOption | Specifies task options. (Can be omitted.) Note: This parameter is not currently supported because it is used with extended features. Do not specify it. |
| in | taskStep | Specifies a task step ID. (Can be omitted if there is only one task execution step.) Note: This parameter is for a feature extension and is currently not supported. Do not specify it. |
Result values. | Value | Description |
|---|---|
| Result::IsSuccess | Registration is successful. |
| ResultInvalidTaskId | The pTask parameter is NULL.Alternatively, the pTask parameter is uninitialized, or the pointer of the task ID specified by pTask is NULL or a zero-length string. |
| ResultInvalidPolicy | The pPolicy parameter is NULL. |
| ResultInvalidAction | The pAction parameter is NULL. |
| ResultInvalidTaskPriority | The task execution priority specification is out of range. Confirm that it is in the range of TaskPriority. |
| ResultTaskPermissionOutOfRange | The task permission condition specification is out-of-range. Confirm that it is in the range of TaskPermission. |
| ResultSchedulingPolicyOutOfRange | The scheduling policy is out of range. Confirm that it is in the range of SchedulingPolicy. |
| ResultInvalidTaskTargetDuration | The task duration is invalid. (This is for future extensibility.) |
| ResultActionCodeOutOfRange | The task action code is out of range. Confirm that it is in the range of Action. |
| ResultInvalidUrl | The URL string pointer is NULL or a zero-length string. |
| ResultApInfoTypeOutOfRange | The AP information type is out of range. Confirm that it is in the range of ApInfoType. |
| ResultCfgInfoTypeOutOfRange | The Cfg information type is out of range. Confirm that it is in the range of ApInfoType. |
| ResultInvalidFilePath | The file path string pointer is NULL or a zero-length string. |
| ResultInvalidOption | The pOption parameter is uninitialized or the option code is out of range. Confirm that it is in the range of ExecOption. |
| ResultStorageNotFound | Storage has not been registered for the corresponding application ID. |
| ResultTaskIdAlreadyExist | A task having the same task ID is already registered. |
| ResultIpcNotSessionInitialized | The session has not been initialized. This Result is returned if this function is called before the Initialize function. Always call the Initialize function before using the BOSS library. |
| ResultInvalidFilePath | The file path string pointer is NULL or a zero-length string. (Note: This is probably operationally impossible, but there is an escape if the specified file cannot be found.) |
| Any other value | Unexpected error. (For more information about this error, see boss_Result.h.) |
Registers a specified file to a task. Currently, you can only use this to register DataStore upload tasks.
CONFIDENTIAL