/*---------------------------------------------------------------------------* Copyright (C) 2012 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_CONST_H_ #define NN_BOSS_BOSS_CONST_H_ #include #ifdef __cplusplus namespace nn { namespace boss { /*! @addtogroup nn_boss @{ @defgroup nn_boss_const SpotPass (BOSS) Constant Definitions @brief A list of constant definitions in the SpotPass (BOSS) library. @{ */ /*! @brief Specifies service statuses for tasks. (The numeric value of each enumerator is shown at the start of its description.) */ enum TaskServiceStatus { SERVICE_UNKNOWN, //!< 0: Cannot yet confirm service status. SERVICE_AVAILABLE, //!< 1: Service is available. SERVICE_TERMINATED //!< 2: Service has terminated. }; /*! @brief Enumerates task states. (The numeric value of each enumerator is shown at the start of its description.) */ enum TaskState { TS_UNKNOWN = 0, //!< 0: Unknown state. STOP = 1, //!< 1: Stopped. STOP_BY_POLICYLIST = 2, //!< 2: Temporarily stopped because of the policy list. WAITING_TIME = 3, //!< 3: Waiting for the start time. WAITING_RUN = 4, //!< 4: Waiting in the queue to run. WAITING_RESUME = 5, //!< 5: Waiting in the resume state to run. RUNNING = 6, //!< 6: Running. FINISHED = 7 //!< 7: Execution has completed. }; /*! @brief Specifies the states within a task turn. (The numeric value of each enumerator is shown at the start of its description.) */ enum TaskTurnState { TTS_UNKNOWN = TS_UNKNOWN, //!< 0: Unknown state. TTS_STOPPED = STOP, //!< 1: Stopped. TTS_STOP_BY_POLICYLIST = STOP_BY_POLICYLIST, //!< 2: Temporarily stopped because of the policy list. TTS_WAITING_TIME = WAITING_TIME, //!< 3: Waiting for the start time. TTS_WAITING_RUN = WAITING_RUN, //!< 4: Waiting in the queue to run. TTS_WAITING_RESUME = WAITING_RESUME, //!< 5: Waiting in the resume state to run. TTS_RUNNING = RUNNING, //!< 6: Running. TTS_FINISHED = FINISHED, //!< 7: Execution has completed. TTS_SUCCESS = 16, //!< 16: Execution completed successfully. TTS_ERROR = 17, //!< 17: Execution completed with one or more errors. }; /*! @brief Specifies the running states for a task. (The numeric value of each enumerator is shown at the start of its description.) */ enum TaskRunningState { RS_NOT_RUN = 0, //!< 0: Not running. RS_PREPROCESSING = 1, //!< 1: Running (preprocessing). RS_RUNNING = 2 //!< 2: Running (actual process). }; /*! * @brief Specifies detailed results for a task. (The numeric value of each enumerator is shown at the start of its description.) */ enum TaskResultDefinition { TR_UNKNOWN, //!< 0: Unknown. TR_SUCCESS, //!< 1: The task succeeded. INVALID_TASKRECORD_VALUE, //!< 2: Task record information is invalid. TR_LIBRARY_NOT_INITIALIZE, //!< 3: The BOSS library is not initialized. TR_INVALID_PARAMETER, //!< 4: Invalid parameter. TR_INVALID_FORMAT, //!< 5: Invalid format. TR_INITIALIZED, //!< 6: Already initialized. TR_NOT_EXIST, //!< 7: Does not exist. TR_UNEXPECT_ERROR, //!< 8: Unexpected error. TR_CANCELED, //!< 9: The task was canceled. TR_FS_ERROR, //!< 10: The file system returned an error. TR_HTTP_ERROR, //!< 11: An error occurred in HTTP communication. TR_CANNOT_GET_NETWORK_TIME, //!< 12: The value for the network clock could not be retrieved. TR_CANNOT_READ_SYSTEM_CONFIG, //!< 13: System Settings information could not be read. TR_NOT_NETWORK_ACCOUNT, //!< 14: The registered task account is not a network account. (Includes cases when the registered account has not agreed to the EULA.) TR_RESTRICTED_BY_PARENTAL_CONTROL, //!< 15: The registered task account is restricted from operating BOSS by Parental Controls. // TaskSheet error. TASKSHEET_ERROR_HTTP, //!< 16: An HTTP error occurred while downloading the TaskSheet. (For more information about the HTTP error, see the sub-error.) TASKSHEET_ERROR_INVALID_FORMAT, //!< 17: An error has been detected in the TaskSheet format. TASKSHEET_ERROR_BUFFER_OVERFLOW, //!< 18: A buffer overflow was detected in downloading the TaskSheet. TASKSHEET_ERROR_INVALID_TITLE_ID, //!< 19: The TaskSheet title ID is different from the title ID that registered the task. TASKSHEET_ERROR_INVALID_TASK_ID, //!< 20: The TaskSheet task ID is different from the actual task ID. // NBDL task error. NBDL_ERROR_NSD_VERIFY_HASH, //!< 21: An error was detected in verifying the NS data hash. NBDL_ERROR_NSD_HASH_SIZE, //!< 22: An error was detected in the NS data hash size. NBDL_ERROR_NSD_INVALID_HEADER_FORMAT, //!< 23: An error was detected in the NS data header format. NBDL_ERROR_NSD_DECRYPT_INITIALIZE_FAILED, //!< 24: Initialization of NS data decryption failed. NBDL_ERROR_NSD_INVALID_DATA_SIZE, //!< 25: The size of the downloaded NS data does not match the Content-Length value. NBDL_ERROR_GET_NEWS_STORAGE_INFO, //!< 26: Failed to retrieve information about notifications for BOSS storage. (For more information about the FS error, see the sub-error.) NBDL_ERROR_PREPARE_BOSS_SAVEDATA_INFO, //!< 27: Failed to prepare save data management information for BOSS. (For more information about the FS error, see the sub-error.) NBDL_ERROR_PREPARE_BOSS_STORAGE_INFO, //!< 28: Failed to prepare management information for BOSS storage. (For more information about the FS error, see the sub-error.) NBDL_ERROR_CHECK_RESUME_FILE_EXIST, //!< 29: An error occurred while checking whether a resume file exists. (For more information about the FS error, see the sub-error.) NBDL_ERROR_CHECK_DOWNLOAD_TARGET, //!< 30: An error occurred while checking the file to download among TaskSheet files. (For more information about the FS error, see the sub-error.) NBDL_ERROR_CALCULATE_CONTENT_LENGTH, //!< 31: Failed to calculate Content-Length for the NBDL task. (For more information about the FS error, see the sub-error.) NBDL_ERROR_CHECK_BOSS_STORAGE_FILE_INFO, //!< 32: An error occurred while checking file management information for BOSS storage. (For more information about the FS error or NotExist error, see the sub-error.) NBDL_ERROR_CHECK_BOSS_STORAGE_REFERENCE_INFO, //!< 33: An error occurred while checking file reference information for BOSS storage. (For more information about the FS error or NotExist error, see the sub-error.) NBDL_ERROR_CHECK_MAX_FILE_TOTAL_SIZE, //!< 34: 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.) NBDL_ERROR_DELETABLE_FILE_INFO_NOT_EXIST, //!< 35: There is no file information for a deletable file in the file management information. NBDL_ERROR_DELETABLE_REFERENCE_INFO_NOT_EXIST, //!< 36: There is no file information for a deletable file in the file reference information. NBDL_ERROR_DOWNLOAD_FILE, //!< 37: FS operations for the download file failed. (For more information about the FS error, see the sub-error.) NBDL_ERROR_DOWNLOAD_HTTP, //!< 38: An HTTP communication error occurred during a download. (For more information about the HTTP error, see the sub-error.) NBDL_ERROR_GET_RESUME_FILE_INFO, //!< 39: Failed to get resume file information during a download. (For more information about the FS error, see the sub-error.) NBDL_ERROR_SET_RESUME_FILE_INFO, //!< 40: Failed to save resume file information during a download. NBDL_ERROR_UPDATE_BOSS_STORAGE_INFO, //!< 41: Failed to update BOSS storage management information. (For more information about the FS error, see the sub-error.) NBDL_ERROR_ROLLBACK_BOSS_STORAGE, //!< 42: An error occurred during rollback of BOSS storage. (For more information about the FS error, see the sub-error.) // New arrival flag error. TR_ERROR_SET_ACCOUNT_NEW_ARRIVAL_FLAG, //!< 43: Failed to set the account new arrival flag. (For more information about the FS error, see the sub-error.) TR_ERROR_SET_TITLE_NEW_ARRIVAL_FLAG, //!< 44: Failed to set the title new arrival flag. (For more information about the FS error, see the sub-error.) // Policy list error. TR_POLICYLIST_DOWNLOAD_ERROR, //!< 45: Cannot download the policy list. TR_POLICYLIST_INVALID_ERROR, //!< 46: The policy list content is invalid. TR_STOPPED, //!< 47: Processing was stopped. TR_FORBIDDEN_TO_SEND_INFORMATION_BY_CONFIG, //!< 48: Sending information is forbidden in System Settings. //API error. TR_MEMORY_ALLOCATE_ERROR, //!< 49: Failed to allocate memory. TR_INVALID_ACCOUNT, //!< 50: Invalid account. TR_INVALID_TITLE, //!< 51: Invalid title. TR_NO_SUPPORT, //!< 52: Unsupported error. TR_NOT_COMPLETED, //!< 53: Not completed error. TR_NOT_PERMITTED, //!< 54: Not permitted. TR_FULL, //!< 55: Maximum value reached. TR_FINISHED, //!< 56: Already finished. TR_STOPPED_BY_POLICYLIST, //!< 57: Stopped by the policy list. TR_ALREADY_EXIST, //!< 58: Already exists. TR_FAIL, //!< 59: This value indicates a generic failure. TR_RESTRICTED_BY_PARENTAL_CONTROL_TOTAL_ENABLE, //!< 60: Restricted by the enabled settings for the overall Parental Controls. TR_SERVICE_TERMINATED, //!< 61: Service has ended. TR_NOT_INITIALIZED, //!< 62: Not initialized. TR_INVALID, //!< 63: Invalid value. TR_NOT_CONNECT_NETWORK, //!< 64: Not connected to the infrastructure network. TR_DATASTORE_ERROR, //!< 65: Error on DataStore processing. TR_POLICYLIST_ORDER_VERSION_UP_ERROR, //!< 66: A system update has been indicated for the policy list, so you cannot execute tasks. TR_POLICYLIST_TEMPORARILY_UNAVAILABLE, //!< 67: The policy list is temporarily unavailable. This error occurs in situations such as when the policy list server is undergoing maintenance. TR_NOT_FOUND, //!< 68: Not found. }; /*! * @brief Specifies supplemental information about the detailed result of a task. (The numeric value of each enumerator is shown at the start of its description.) */ enum SubTaskResultDefinition { STR_NONE, //!< 0: No supplemental information. //FS error. BOSS_FS_ERROR_NOT_INIT, //!< 1: FS error: NOT_INIT. BOSS_FS_ERROR_BUSY, //!< 2: FS error: BUSY. BOSS_FS_ERROR_CANCELED, //!< 3: FS error: CANCELED. BOSS_FS_ERROR_END_OF_DIRECTORY, //!< 4: FS error: END_OF_DIRECTORY. BOSS_FS_ERROR_END_OF_FILE, //!< 5: FS error: END_OF_FILE. BOSS_FS_ERROR_MAX_MOUNTPOINTS, //!< 6: FS error: ERROR_MAX_MOUNTPOINTS. BOSS_FS_ERROR_MAX_VOLUMES, //!< 7: FS error: MAX_VOLUMES. BOSS_FS_ERROR_MAX_CLIENTS, //!< 8: FS error: MAX_CLIENTS. BOSS_FS_ERROR_MAX_FILES, //!< 9: FS error: MAX_FILES. BOSS_FS_ERROR_MAX_DIRS, //!< 10: FS error: MAX_DIRS. BOSS_FS_ERROR_ALREADY_OPEN, //!< 11: FS error: ALREADY_OPEN. BOSS_FS_ERROR_ALREADY_EXISTS, //!< 12: FS error: ALREADY_EXISTS. BOSS_FS_ERROR_NOT_FOUND, //!< 13: FS error: NOT_FOUND. BOSS_FS_ERROR_NOT_EMPTY, //!< 14: FS error: NOT_EMPTY. BOSS_FS_ERROR_ACCESS_ERROR, //!< 15: FS error: ACCESS_ERROR. BOSS_FS_ERROR_PERMISSION_ERROR, //!< 16: FS error: PERMISSION_ERROR. BOSS_FS_ERROR_DATA_CORRUPTED, //!< 17: FS error: DATA_CORRUPTED. BOSS_FS_ERROR_STORAGE_FULL, //!< 18: FS error: STORAGE_FULL. BOSS_FS_ERROR_JOURNAL_FULL, //!< 19: FS error: JOURNAL_FULL. BOSS_FS_ERROR_UNAVAILABLE_CMD, //!< 20: FS error: UNAVAILABLE_CMD. BOSS_FS_ERROR_UNSUPPORTED_CMD, //!< 21: FS error: UNSUPPORTED_CMD. BOSS_FS_ERROR_INVALID_PARAM, //!< 22: FS error: INVALID_PARAM. BOSS_FS_ERROR_INVALID_PATH, //!< 23: FS error: INVALID_PATH. BOSS_FS_ERROR_INVALID_BUFFER, //!< 24: FS error: INVALID_BUFFER. BOSS_FS_ERROR_INVALID_ALIGNMENT, //!< 25: FS error: INVALID_ALIGNMENT. BOSS_FS_ERROR_INVALID_CLIENT_HANDLE, //!< 26: FS error: INVALID_CLIENT_HANDLE. BOSS_FS_ERROR_INVALID_FILE_HANDLE, //!< 27: FS error: INVALID_FILE_HANDLE. BOSS_FS_ERROR_INVALID_DIR_HANDLE, //!< 28: FS error: INVALID_DIR_HANDLE. BOSS_FS_ERROR_NOT_FILE, //!< 29: FS error: NOT_FILE. BOSS_FS_ERROR_NOT_DIR, //!< 30: FS error: NOT_DIR. BOSS_FS_ERROR_FILE_TOO_BIG, //!< 31: FS error: FILE_TOO_BIG. BOSS_FS_ERROR_OUT_OF_RANGE, //!< 32: FS error: OUT_OF_RANGE. BOSS_FS_ERROR_OUT_OF_RESOURCES, //!< 33: FS error: OUT_OF_RESOURCES. BOSS_FS_ERROR_MEDIA_NOT_READY, //!< 34: FS error: MEDIA_NOT_READY. BOSS_FS_ERROR_MEDIA_ERROR, //!< 35: FS error: MEDIA_ERROR. BOSS_FS_ERROR_WRITE_PROTECTED, //!< 36: FS error: WRITE_PROTECTED. BOSS_FS_ERROR_UNKNOWN, //!< 37: FS error: UNKNOWN. //HTTP error. HTTP_ERROR_UNSUPPORTED_PROTOCOL, //!< 38: HTTP stack error: UNSUPPORTED_PROTOCOL. HTTP_ERROR_FAILED_INIT, //!< 39: HTTP stack error: FAILED_INIT. HTTP_ERROR_URL_MALFORMAT, //!< 40: HTTP stack error: URL_MALFORMAT. HTTP_ERROR_NOT_BUILT_IN, //!< 41: HTTP stack error: NOT_BUILT_IN. HTTP_ERROR_COULDNT_RESOLVE_PROXY, //!< 42: HTTP stack error: COULDNT_RESOLVE_PROXY. HTTP_ERROR_COULDNT_RESOLVE_HOST, //!< 43: HTTP stack error: COULDNT_RESOLVE_HOST. HTTP_ERROR_COULDNT_CONNECT, //!< 44: HTTP stack error: COULDNT_CONNECT. HTTP_ERROR_REMOTE_ACCESS_DENIED, //!< 45: HTTP stack error: REMOTE_ACCESS_DENIED. HTTP_ERROR_PARTIAL_FILE, //!< 46: HTTP stack error: PARTIAL_FILE. HTTP_ERROR_QUOTE_ERROR, //!< 47: HTTP stack error: QUOTE_ERROR. HTTP_ERROR_HTTP_RETURNED_ERROR, //!< 48: HTTP stack error: HTTP_RETURNED_ERROR. HTTP_ERROR_WRITE_ERROR, //!< 49: HTTP stack error: WRITE_ERROR. HTTP_ERROR_UPLOAD_FAILED, //!< 50: HTTP stack error: UPLOAD_FAILED. HTTP_ERROR_READ_ERROR, //!< 51: HTTP stack error: READ_ERROR. HTTP_ERROR_OUT_OF_MEMORY, //!< 52: HTTP stack error: OUT_OF_MEMORY. HTTP_ERROR_OPERATION_TIMEDOUT, //!< 53: HTTP stack error: OPERATION_TIMEDOUT. HTTP_ERROR_RANGE_ERROR, //!< 54: HTTP stack error: RANGE_ERROR. HTTP_ERROR_HTTP_POST_ERROR, //!< 55: HTTP stack error: HTTP_POST_ERROR. HTTP_ERROR_SSL_CONNECT_ERROR, //!< 56: HTTP stack error: SSL_CONNECT_ERROR. HTTP_ERROR_BAD_DOWNLOAD_RESUME, //!< 57: HTTP stack error: BAD_DOWNLOAD_RESUME. HTTP_ERROR_INTERFACE_FAILED, //!< 58: HTTP stack error: INTERFACE_FAILED. HTTP_ERROR_TOO_MANY_REDIRECTS, //!< 59: HTTP stack error: TOO_MANY_REDIRECTS. HTTP_ERROR_UNKNOWN_OPTION, //!< 60: HTTP stack error: UNKNOWN_OPTION. HTTP_ERROR_PEER_FAILED_VERIFICATION, //!< 61: HTTP stack error: PEER_FAILED_VERIFICATION. HTTP_ERROR_GOT_NOTHING, //!< 62: HTTP stack error: GOT_NOTHING. HTTP_ERROR_SSL_ENGINE_NOTFOUND, //!< 63: HTTP stack error: SSL_ENGINE_NOTFOUND. HTTP_ERROR_SSL_ENGINE_SETFAILED, //!< 64: HTTP stack error: SSL_ENGINE_SETFAILED. HTTP_ERROR_SEND_ERROR, //!< 65: HTTP stack error: SEND_ERROR. HTTP_ERROR_RECV_ERROR, //!< 66: HTTP stack error: RECV_ERROR. HTTP_ERROR_SSL_CERTPROBLEM, //!< 67: HTTP stack error: SSL_CERTPROBLEM. HTTP_ERROR_SSL_CIPHER, //!< 68: HTTP stack error: SSL_CIPHER. HTTP_ERROR_SSL_CACERT, //!< 69: HTTP stack error: SSL_CACERT. HTTP_ERROR_USE_SSL_FAILED, //!< 70: HTTP stack error: USE_SSL_FAILED. HTTP_ERROR_SEND_FAIL_REWIND, //!< 71: HTTP stack error: SEND_FAIL_REWIND. HTTP_ERROR_SSL_ENGINE_INITFAILED, //!< 72: HTTP stack error: SSL_ENGINE_INITFAILED. HTTP_ERROR_LOGIN_DENIED, //!< 73: HTTP stack error: LOGIN_DENIED. HTTP_ERROR_CONV_FAILED, //!< 74: HTTP stack error: CONV_FAILED. HTTP_ERROR_CONV_REQD, //!< 75: HTTP stack error: CONV_REQD. HTTP_ERROR_SSL_CACERT_BADFILE, //!< 76: HTTP stack error: SSL_CACERT_BADFILE. HTTP_ERROR_SSL_SHUTDOWN_FAILED, //!< 77: HTTP stack error: SSL_SHUTDOWN_FAILED. HTTP_ERROR_AGAIN, //!< 78: HTTP stack error: AGAIN. HTTP_ERROR_SSL_CRL_BADFILE, //!< 79: HTTP stack error: SSL_CRL_BADFILE. HTTP_ERROR_SSL_ISSUER_ERROR, //!< 80: HTTP stack error: SSL_ISSUER_ERROR. HTTP_ERROR_CHUNK_FAILED, //!< 81: HTTP stack error: CHUNK_FAILED. HTTP_ERROR_SSL_INVALID_NSSL_CTX, //!< 82: HTTP stack error: SSL_INVALID_NSSL_CTX. HTTP_ERROR_SSL_INVALID_CERTID, //!< 83: HTTP stack error: SSL_INVALID_CERTID. HTTP_ERROR_SSL_CERT_LIMIT, //!< 84: HTTP stack error: SSL_CERT_LIMIT. HTTP_ERROR_SSL_INVALID_NSSL_CONNECTION, //!< 85: HTTP stack error: SSL_INVALID_NSSL_CONNECTION. HTTP_ERROR_SSL_INVALID_CERT, //!< 86: HTTP stack error: SSL_INVALID_CERT. HTTP_ERROR_SSL_ZERO_RETURN, //!< 87: HTTP stack error: SSL_ZERO_RETURN. HTTP_ERROR_SSL_WANT_READ, //!< 88: HTTP stack error: SSL_WANT_READ. HTTP_ERROR_SSL_WANT_WRITE, //!< 89: HTTP stack error: SSL_WANT_WRITE. HTTP_ERROR_SSL_IO_ERROR, //!< 90: HTTP stack error: SSL_IO_ERROR. HTTP_ERROR_SSL_NSSLLIB_ERROR, //!< 91: HTTP stack error: SSL_NSSLLIB_ERROR. HTTP_ERROR_SSL_UNKNOWN, //!< 92: HTTP stack error: SSL_UNKNOWN. HTTP_ERROR_SSL_OUT_OF_MEMORY, //!< 93: HTTP stack error: SSL_OUT_OF_MEMORY. HTTP_ERROR_SSL_INVALID_STATE, //!< 94: HTTP stack error: SSL_INVALID_STATE. HTTP_ERROR_SSL_HANDSHAKE_ERROR, //!< 95: HTTP stack error: SSL_HANDSHAKE_ERROR. HTTP_ERROR_SSL_NO_CERT, //!< 96: HTTP stack error: SSL_NO_CERT. HTTP_ERROR_SSL_INVALID_FD, //!< 97: HTTP stack error: SSL_INVALID_FD. HTTP_ERROR_SSL_LIB_NOT_READY, //!< 98: HTTP stack error: SSL_LIB_NOT_READY. HTTP_ERROR_SSL_IPC_ERROR, //!< 99: HTTP stack error: SSL_IPC_ERROR. HTTP_ERROR_SSL_RESOURCE_LIMIT, //!< 100: HTTP stack error: SSL_RESOURCE_LIMIT. HTTP_ERROR_SSL_INVALID_HANDLE, //!< 101: HTTP stack error: SSL_INVALID_HANDLE. HTTP_ERROR_SSL_INVALID_CERT_TYPE, //!< 102: HTTP stack error: SSL_INVALID_CERT_TYPE. HTTP_ERROR_SSL_INVALID_KEY_TYPE, //!< 103: HTTP stack error: SSL_INVALID_KEY_TYPE. HTTP_ERROR_SSL_INVALID_SIZE, //!< 104: HTTP stack error: SSL_INVALID_SIZE. HTTP_ERROR_SSL_NO_PEER_CERT, //!< 105: HTTP stack error: SSL_NO_PEER_CERT. HTTP_ERROR_SSL_INSUFFICIENT_SIZE, //!< 106: HTTP stack error: SSL_INSUFFICIENT_SIZE. HTTP_ERROR_SSL_NO_CIPHER, //!< 107: HTTP stack error: SSL_NO_CIPHER. HTTP_ERROR_SSL_INVALID_ARG, //!< 108: HTTP stack error: SSL_INVALID_ARG. HTTP_ERROR_TIMEOUT, //!< 109: HTTP communication timeout. HTTP_ERROR_401_UNAUTHORIZED, //!< 110: Received status code 401 Unauthorized. HTTP_ERROR_403_FORBIDDEN, //!< 111: Received status code 403 Forbidden. HTTP_ERROR_404_NOT_FOUND, //!< 112: Received status code 404 Not Found. HTTP_ERROR_408_REQUEST_TIMEOUT, //!< 113: Received status code 408 Request Timeout. HTTP_ERROR_416_REQUESTED_RANGE_NOT_SATISFABLE, //!< 114: Received status code 416 Requested Range Not Satisfiable. HTTP_ERROR_500_INTERNAL_SERVER_ERROR, //!< 115: Received status code 500 Internal Server Error. HTTP_ERROR_502_BAD_GATEWAY, //!< 116: Received status code 502 Bad Gateway. HTTP_ERROR_503_SERVICE_UNAVAILABLE, //!< 117: Received status code 503 Service Unavailable. HTTP_ERROR_504_GATEWAY_TIMEOUT, //!< 118: Received status code 504 Gateway Timeout. HTTP_ERROR_505_VERSION_NOT_SUPPORTED, //!< 119: Received status code 505 Version Not Supported. HTTP_ERROR_UNSUPPORTED_STATUS, //!< 120: Received a 1xx, 3xx, 4xx, or 5xx error other than the previous errors during HTTP communication. HTTP_ERROR_DISCONNECTED, //!< 121: Loss of connection error. HTTP_ERROR_UNKNOWN, //!< 122: HTTP error, cause unknown. NOT_EXIST_FILE, //!< 123: NotExist. (The file does not exist.) NOT_EXIST_BOSSSTORAGE, //!< 124: NotExist. (BOSS storage does not exist.) NOT_EXIST_DB, //!< 125: NotExist. (The database does not exist.) NOT_EXIST_RECORD, //!< 126: NotExist. (The relevant record does not exist in the database.) HTTP_ERROR_NSSL_NO_CTX, //!< 127: HTTP stack error: NSSL_NO_CTX. HTTP_ERROR_READ_DEFAULT_PROXY, //!< 128: HTTP stack error: READ_DEFAULT_PROXY. HTTP_ERROR_DEFAULT_PROXY_NOT_READY, //!< 129: HTTP stack error: DEFAULT_PROXY_NOT_READY. HTTP_ERROR_INIT_INTERNAL_MUTEX, //!< 130: HTTP stack error: INIT_INTERNAL_MUTEX. HTTP_ERROR_UNEXPECTED_LAST_MODIFIED_TIME_CHANGED, //!< 131: LastModifiedTime changed, but was not expected to. HTTP_ERROR_UNEXPECTED_CONTENT_LENGTH_CHANGED, //!< 132: ContentLength changed, but was not expected to. HTTP_ERROR_TOO_BIG_CONTENT_LENGTH, //!< 133: ContentLength is larger than the expected maximum value. STR_NOT_FOUND_BOSS_STORAGE, //!< 134: BOSS storage could not be found. // DataStore error. DATASTORE_DNS, //!< 135: A DNS-related error occurred in DataStore communication. This error also occurs when the specified game server ID is invalid. DATASTORE_PROXY, //!< 136: An HTTP proxy-related error occurred in DataStore communication. DATASTORE_CONNECTION_RESET, //!< 137: The connection was lost during DataStore communication. DATASTORE_SERVER_REQUEST_ERROR, //!< 138: The access key specified for DataStore communication is invalid. DATASTORE_TEMPORARY_SERVER_ERROR, //!< 139: A temporary internal server error occurred in DataStore communication. DATASTORE_PERMANENT_SERVER_ERROR, //!< 140 : A permanent internal server error occurred in DataStore communication. DATASTORE_SERVICE_UNAVAILABLE, //!< 141: The service stopped because the DataStore communication server is temporarily overloaded or under maintenance. DATASTORE_CONNECTION_UNKNOWN, //!< 142 : A communication-related error other than those above occurred in DataStore communication. DATASTORE_VALIDATION_ERROR, //!< 143 : The password of the account for DataStore communication is invalid. DATASTORE_INTERNAL_ERROR, //!< 144 : An internal client error occurred in DataStore communication. DATASTORE_INVALID_ARGUMENT, //!< 143 : An invalid argument was passed in DataStore communication. DATASTORE_TIMEOUT, //!< 146: A timeout occurred in DataStore communication. DATASTORE_UNKNOWN, //!< 144 : Some other error occurred in DataStore communication. SIZE_FULL, //!< 148: The size is full. COUNT_FULL, //!< 149 : The count is full. // DataStore error 2. DATASTORE_NOT_CONNECTED_FRIEND_SERVER, //!< 150: Cannot start DataStore communication because the account that registered the task has never connected to the target friend server. DATASTORE_PERMISSION_DENIED, //!< 151: 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. DATASTORE_DATA_NOT_FOUND, //!< 152: The task is a DataStore upload task for updating data, but the data to be updated does not exist on the DataStore server. DATASTORE_DATA_UNDER_REVIEWING, //!< 153: The task is a DataStore upload task for updating data, but the DATA_FLAG_NEED_REVIEW flag is set on the data to be updated. DATASTORE_OPERATION_NOT_ALLOWED, //!< 154: The task is a DataStore upload task for updating data, but the data to be updated does not use the storage server. DATASTORE_INVALID_PASSWORD, //!< 155: 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. STR_MAXIMUM_LIMIT //!< Maximum boundary of the SubTaskResultDefinition enumerator. No enumerator with a greater value than this value exists. }; /*! @brief Specifies the states within a task turn. (The numeric value of each enumerator is shown at the start of its description.) */ enum TaskRegisterResult { TRR_SUCCESS = 0, //!< 0: Registered. TRR_FAILURE = 1 //!< 1: Registration failed. }; /*! @brief Specifies task priorities. (The numeric value of each enumerator is shown at the start of its description.) */ enum TaskPriority { PRIORITY_EXPEDITE = 35, //!< 35: Priority setting for the highest-priority tasks. PRIORITY_HIGH = 80, //!< 80: Priority setting for high-priority tasks. PRIORITY_MEDIUM = 125, //!< 125: Priority setting for medium-priority tasks. PRIORITY_LOW = 170, //!< 170: Priority setting for low-priority tasks. PRIORITY_LOWEST = 215, //!< 215: Priority setting for the lowest-priority tasks. PRIORITY_STOPPED = 255, //!< 255: Priority setting for tasks that have been stopped. PRIORITY_MAX_VALUE = (0x1u << 7) //!< (The enumerator used during internal processing. This enumerator cannot be used by applications.) }; /*! @brief Specifies states for BOSS as a whole. (The numeric value of each enumerator is shown at the start of its description.) */ enum BossState { BS_UNKNOWM, //!< 0: Unknown. BS_STOPPED, //!< 1: BOSS is not running. BS_INOPERABLE_BY_SYSTEM, //!< 2: BOSS operation is prohibited by the system. BS_INOPERABLE_WITHOUT_POLICYLIST, //!< 3: BOSS cannot be operated because the policy list cannot be obtained. BS_INOPERABLE_BY_POLICYLIST, //!< 4: BOSS operation is prohibited by the policy list. BS_INOPERABLE_FOR_OLD_VERSION, //!< 5: BOSS cannot be operated because the version is out of date. BS_OPERABLE_FG, //!< 6: BOSS can process only tasks while in the foreground. BS_OPERABLE_FG_BG, //!< 7: BOSS can process tasks while in the foreground and the background. BS_FATAL = 255 //!< 255: BOSS cannot operate because of a fatal error. }; /*! @brief Specifies HTTP protocols. (The numeric value of each enumerator is shown at the start of its description.) */ enum HttpProtocol { HTTP_GET, //!< 0: GET protocol. HTTP_POST, //!< 1: POST protocol. }; /*! @brief Specifies BOSS storage types. (The numeric value of each enumerator is shown at the start of its description.) */ enum StorageKind { BSKIND_NBDL = 0, //!< 0: NBDL storage. BSKIND_RAWDL = 1, //!< 1: RawDL type storage. BSKIND_DATASTORE = 2, //!< 2: DataStore type storage. BSKIND_NBDL_DATA_LIST = 3 //!< 3: NBDL data list storage. }; /*! @brief Specifies constants that represent the positions of file read/write operations. */ enum PositionBase { POSITION_BASE_BEGIN, //!< Specifies the starting position relative to the beginning of the file. POSITION_BASE_CURRENT, //!< Specifies the starting position relative to the current position in the file. POSITION_BASE_END //!< Specifies the starting position relative to the end of the file. }; /*! @brief Specifies the states of tasks that can wait. (The numeric value of each enumerator is shown at the start of its description.) */ enum TaskWaitState { TWS_DONE = 1, //!< 1: Task execution finished (with success or with errors.) }; /*! @brief Defines the state of a task immediately after calling the @ref Task::Cancel() function to cancel the running task. Passed as an argument to the @ref Task::Cancel() function. (The numeric value of each enumerator is shown at the start of its description.) */ enum CancelMode { CANCEL_TO_STOP = 1, //!< 1: Sets to the STOP state. The task execution result is an error as a scheduling mode. It transitions to a WAITING_TIME state. CANCEL_TO_RETRY = 2, //!< 2: Sets to a RETRY state. When the task enters an executable state, a retry is executed immediately. CANCEL_TO_RETRY_BACK_BURNER = 3, //!< 3: Enters a retry state, but places the task at the last position in the list of executable tasks. }; /*! @brief Defines the algorithm for calculating the hash value of the data. */ enum HashType { HT_SHA1 = 1 //!< SHA1 (160 bit) }; /*! @brief Specifies the size of a task setting record. */ static const size_t TASK_SETTING_RECORD_SIZE = 3072; /*! @brief Specifies the size of a task state record. */ static const size_t TASK_STATE_RECORD_SIZE = 1024; /*! @brief Specifies the size of a task record. */ static const size_t TASK_RECORD_SIZE = TASK_SETTING_RECORD_SIZE+TASK_STATE_RECORD_SIZE; /*! @brief Specifies the maximum length for file paths in BOSS storage. */ static const u32 FILEPATH_IN_BOSSSTORAGE_MAX_LENGTH = 128; /*! @brief Specifies the maximum length of file paths that BOSS can handle. */ static const u32 FILEFULLPATH_MAX_LENGTH_WITH_NULL = 512; /*! @brief Specifies the maximum number of directory hierarchy levels for file paths that BOSS can handle. */ static const u32 FILEPATH_MAX_DIRECTORY = 128; /*! @brief Specifies the maximum length for NS filenames in BOSS storage (including the terminating null character). */ static const u32 NSDATA_NAME_MAX_LENGTH_WITH_NULL = 32; /*! @brief Specifies the maximum length for directory names in BOSS storage (including the NULL terminating character). */ static const u32 BOSSSTORAGE_DIRECTORY_NAME_MAX_LENGTH_WITH_NULL = 8; /*! @brief Specifies the maximum length of task IDs (including the NULL terminating character). */ static const u32 TASK_ID_LENGTH_WITH_NULL = 8; /*! @brief Specifies the maximum URL length (including the NULL terminating character). */ static const u32 URL_MAX_LENGTH_WITH_NULL = 256; /*! @brief Specifies the maximum length for the LastModifiedTime string (including the NULL terminating character). */ static const u32 HTTP_LAST_MODIFIED_TIME_STR_MAX_LENGTH_WITH_NULL = 64; /*! @brief Specifies the maximum length for labels in HTTP request headers (including the NULL terminating character). */ static const u32 HTTP_REQUEST_HEADER_LABEL_MAX_LENGTH_WITH_NULL = 32; /*! @brief Specifies the maximum length of an HTTP request header (including the NULL terminating character). */ static const u32 HTTP_REQUEST_HEADER_VALUE_MAX_LENGTH_WITH_NULL = 64; /*! @brief Specifies the maximum number of custom HTTP request headers. */ static const u32 HTTP_REQUEST_PRIVATE_HEADER_MAX_COUNT = 3; /*! @brief Specifies the maximum number of custom HTTP request queries. */ static const u32 HTTP_PRIVATE_QUERY_MAX_COUNT = 3; /*! @brief Specifies the maximum number of custom CA certificates to use during HTTP communication. */ static const u32 HTTP_PRIVATE_CACERT_MAX_COUNT = 3; /*! @brief Specifies the maximum size of custom CA certificates to use during HTTP communication. */ static const size_t HTTP_PRIVATE_CACERT_MAX_SIZE = 4096; /*! @brief Specifies the maximum size of custom client certificates to use during HTTP communication. */ static const size_t HTTP_PRIVATE_CLIENTCERT_MAX_SIZE = 4096; /*! @brief Specifies the maximum size of custom client certificate keys to use during HTTP communication. */ static const size_t HTTP_PRIVATE_CLIENTCERTKEY_MAX_SIZE = 4096; /*! @brief Specifies the maximum number of custom internal CA certificates to use during HTTP communication. */ static const u32 HTTP_INTERNAL_CACERT_MAX_COUNT = 3; /*! @brief Specifies the maximum length for names of custom HTTP queries (including the NULL terminating character). */ static const u32 HTTP_PRIVATE_QUERY_NAME_MAX_LENGTH_WITH_NULL = 16; /*! @brief Specifies query types. (The numeric value of each enumerator is shown at the start of its description.) */ enum QueryKind { QK_NONE, //!< 0: None. QK_REGION, //!< 1: Regions. QK_SYSTEM_LANGUAGE, //!< 2: Language Setting (System). QK_SYSTEM_COUNTRY //!< 3: Country Setting (System). }; /*! @brief Specifies the maximum length for names of custom HTTP queries (including the NULL terminating character). */ static const u32 BOSS_CODE_MAX_LENGTH_WITH_NULL = 32; /*! @brief Specifies the service token size. */ static const u32 SERVICE_TOKEN_SIZE = 512; /*! @brief Specifies the maximum number of files that can be in the download directory for a single NBDL task. */ static const u32 NBDL_DATA_MAX_COUNT_IN_DOWNLOAD_DIRECTORY = 512; /*! @brief Specifies the maximum length for certificate names. */ static const u32 MAX_CERT_NAME_WITH_NULL = 16; /*! @brief Specifies the maximum number of accounts that can be on a system. */ static const u32 SYSTEM_MAX_ACOUNT_COUNT = 12; /*! @brief Specifies the default filename for RawDL tasks. */ static const char RAWDL_DEFAULT_FILE_NAME[] = "rawcontent.dat"; /*! @brief Specifies the size of a large HTTP request header label. */ static const u32 LARGE_HTTP_REQUEST_HEADER_LABEL_MAX_LENGTH_WITH_NULL = 32; /*! @brief Specifies the size of a large HTTP request header value. */ static const u32 LARGE_HTTP_REQUEST_HEADER_VALUE_MAX_LENGTH_WITH_NULL = 512; /*! @brief A legacy constant. Use the equivalent @ref LARGE_HTTP_REQUEST_HEADER_LABEL_MAX_LENGTH_WITH_NULL instead. Specifies the size of a large HTTP request header label for RawDL tasks. */ static const u32 RAWDL_LARGE_HTTP_REQUEST_HEADER_LABEL_MAX_LENGTH_WITH_NULL = LARGE_HTTP_REQUEST_HEADER_LABEL_MAX_LENGTH_WITH_NULL; /*! @brief A legacy constant. Use the equivalent @ref LARGE_HTTP_REQUEST_HEADER_VALUE_MAX_LENGTH_WITH_NULL instead. Specifies the size of a large HTTP request header value for RawDL tasks. */ static const u32 RAWDL_LARGE_HTTP_REQUEST_HEADER_VALUE_MAX_LENGTH_WITH_NULL = LARGE_HTTP_REQUEST_HEADER_VALUE_MAX_LENGTH_WITH_NULL; /*! @brief Specifies the default task interval, in seconds. */ static const u32 DEFAULT_TASK_INTERVAL_SEC = 8 * 60 * 60; //8 hours /*! @brief Specifies the default task execution time (lifetime), in seconds. */ static const u32 DEFAULT_TASK_LIFETIME_SEC = 90 * 24 * 60 * 60; //90 days /*! @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.)) */ static const u32 DEFAULT_TASK_HTTP_TIMEOUT_SEC = 2 * 60; //2 minutes /*! @brief Specifies a task ID that can only be used in an NBDL data list task. */ static const char NBDL_DATA_LIST_DEDICATED_TASK_ID[TASK_ID_LENGTH_WITH_NULL] = "#NDLIST"; /*! @} @} */ } // end of namespace boss } // end of namespace nn #endif /*__cplusplus*/ #endif /* NN_BOSS_BOSS_CONST_H_ */