BOSS Services: Difference between revisions
DaniElectra (talk | contribs) →PropertyIDs: Expand documentation |
DaniElectra (talk | contribs) |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 514: | Line 514: | ||
==NsDataHeaderInfo== | ==NsDataHeaderInfo== | ||
When the input type is not one of the below or when the specified output size doesn't match the expected size for this type, an error is returned | This type contains information about an NsData, the fields match exactly with the [[SpotPass#Payload_Content_Header|Payload Content Header]] without the hash and signature. When the input type is not one of the below or when the specified output size doesn't match the expected size for this type, an error is returned. | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! Type !! Size !! Description | |||
|- | |- | ||
| 0x0 || 0x8 || Program ID | |||
|- | |- | ||
| | | 0x1 || 0x4 || Unknown field | ||
| | |||
| | |||
| | |||
|- | |- | ||
| 0x2 || 0x4 || Content datatype | |||
|- | |- | ||
| | | 0x3 || 0x4 || Payload size | ||
| 0x4 | |||
| | |||
| | |||
|- | |- | ||
| 0x4 || 0x4 || NS Data ID | |||
| 0x4 | |||
| | |||
| | |||
|- | |- | ||
| 0x5 || 0x4 || Version | |||
|- | |- | ||
| | | 0x6 || 0x20 || Everything: | ||
| | |||
| | |||
| | |||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
! Offset !! Size !! Description | |||
|- | |- | ||
| 0x0 || 0x8 || Program ID | |||
|- | |- | ||
| | | 0x8 || 0x4 || Unknown field | ||
| 0x4 | |||
| | |||
|- | |- | ||
| 0xC || 0x4 || Content datatype | |||
|- | |- | ||
| | | 0x10 || 0x4 || Payload size | ||
| | |||
| | |||
|- | |- | ||
| | | 0x14 || 0x4 || NS Data ID | ||
| 0x4 | |||
| | |||
|- | |- | ||
| | | 0x18 || 0x4 || Version | ||
| 0x4 | |||
| | |||
|- | |- | ||
| | | 0x1C || 0x4 || Padding? | ||
| 0x4 | |} | ||
| | |||
| | |||
| | |||
|} | |} | ||
==PropertyIDs== | ==PropertyIDs== | ||
{| class="wikitable | {| class="wikitable" border="1" | ||
! ID !! Size !! Type !! Read !! Write !! Rewritable !! Description | ! ID !! Size !! Type !! Read !! Write !! Rewritable !! Description | ||
|- | |- | ||
| 0x0 || 0x1 || u8 || Yes || Yes || Yes || Priority. Represents the priority of a task | | 0x0 || 0x1 || u8 || Yes || Yes || Yes || [[#PriorityLevel|Priority]]. Represents the priority of a task | ||
|- | |- | ||
| 0x1 || 0x1 || u8 || Yes || Yes || Yes || SchedulingPolicy. Unknown purpose, the API on games force this to 1 | | 0x1 || 0x1 || u8 || Yes || Yes || Yes || SchedulingPolicy. Unknown purpose, the API on games force this to 1 | ||
| Line 646: | Line 567: | ||
| 0x5 || 0x1 || u8 || Yes || Yes || Yes || TaskPermission. Unknown purpose, the API on games require a value between 0 and 3 | | 0x5 || 0x1 || u8 || Yes || Yes || Yes || TaskPermission. Unknown purpose, the API on games require a value between 0 and 3 | ||
|- | |- | ||
| 0x6 || 0x1 || u8 || Yes || Yes || No || ActionCode. Represents the action that a task will perform | | 0x6 || 0x1 || u8 || Yes || Yes || No || [[#ActionCode|ActionCode]]. Represents the action that a task will perform | ||
|- | |- | ||
| 0x7 || 0x200 || char[512] || Yes || Yes || No || URL. Unused for DataStore actions | | 0x7 || 0x200 || char[512] || Yes || Yes || No || URL. Unused for DataStore actions | ||
| Line 660: | Line 581: | ||
| 0xC || 0x4 || Handle || Yes || Yes || No || Optional file handle with the data to send | | 0xC || 0x4 || Handle || Yes || Yes || No || Optional file handle with the data to send | ||
|- | |- | ||
| 0xD || 0x360 || | | 0xD || 0x360 || HeaderField[3] || Yes || Yes || No || HeaderFields. Additional headers to include in the request sent to the server. Structure: | ||
{| class="wikitable" border="1" | |||
|- | |||
! Offset !! Size !! Description | |||
|- | |||
| 0x0 || 0x20 || char[32] Header name | |||
|- | |||
| 0x20 || 0x100 || char[256] Header value | |||
|} | |||
|- | |- | ||
| 0xE || 0x4 || u32[1] || Yes || Yes || No || ClientCerts. List of [[HTTPC:SetClientCertDefault|cert IDs]] to use as client certs | | 0xE || 0x4 || u32[1] || Yes || Yes || No || ClientCerts. List of [[HTTPC:SetClientCertDefault|cert IDs]] to use as client certs | ||
| Line 670: | Line 599: | ||
| 0x11 || 0x1 || u8 || Yes || Yes || No || FSRootCA. If non-zero, enables the task root CA to be read from the filesystem. May be a bool? | | 0x11 || 0x1 || u8 || Yes || Yes || No || FSRootCA. If non-zero, enables the task root CA to be read from the filesystem. May be a bool? | ||
|- | |- | ||
| 0x12 || 0x1 || u8 || Yes || Yes || No || ApInfoType | | 0x12 || 0x1 || u8 || Yes || Yes || No || [[#ApInfoType|ApInfoType]] | ||
|- | |- | ||
| 0x13 || 0x4 || u32 || Yes || Yes || No || RootCaCount. Amount of root CAs stored in property 0xF | | 0x13 || 0x4 || u32 || Yes || Yes || No || RootCaCount. Amount of root CAs stored in property 0xF | ||
| Line 692: | Line 621: | ||
| 0x1C || 0x4 || || Yes || Yes || No || ? | | 0x1C || 0x4 || || Yes || Yes || No || ? | ||
|- | |- | ||
| 0x1D || 0x1 || u8 || Yes || No || No || | | 0x1D || 0x1 || u8 || Yes || No || No || [[#TaskStateCode|TaskStateCode]] | ||
|- | |- | ||
| 0x1E || 0x1 || || Yes || No || No || ? | | 0x1E || 0x1 || || Yes || No || No || ? | ||
| Line 700: | Line 629: | ||
| 0x20 || 0x1 || u8 || Yes || No || No || TaskResultCode. Unknown purpose | | 0x20 || 0x1 || u8 || Yes || No || No || TaskResultCode. Unknown purpose | ||
|- | |- | ||
| 0x21 || 0x1 || u8 || Yes || No || No || | | 0x21 || 0x1 || u8 || Yes || No || No || TaskServiceStatus. Unknown purpose | ||
|- | |- | ||
| 0x22 || 0x1 || || Yes || No || No || ? | | 0x22 || 0x1 || || Yes || No || No || ? | ||
|- | |- | ||
| 0x23 || 0x4 || u32 || Yes || No || No || CommErrorCode. | | 0x23 || 0x4 || u32 || Yes || No || No || CommErrorCode. Received HTTP status code when performing the task. Set to 0 for successful codes | ||
|- | |- | ||
| 0x24 || 0x1 || || Yes || No || No || ? | | 0x24 || 0x1 || || Yes || No || No || ? | ||
| Line 760: | Line 689: | ||
| 0x3E || 0x200 || || Yes || Yes || No || DataStoreDownloadActionData. Shares buffer with properties 0xA and 0xB | | 0x3E || 0x200 || || Yes || Yes || No || DataStoreDownloadActionData. Shares buffer with properties 0xA and 0xB | ||
|- | |- | ||
| 0x3F || 0x1 || u8 || Yes || Yes || No || CfgInfoType | | 0x3F || 0x1 || u8 || Yes || Yes || No || [[#CfgInfoType|CfgInfoType]] | ||
|} | |} | ||
The read column represents properties which can be obtained with [[BOSSU:ReceiveProperty|ReceiveProperty]], the write column represents properties which can be set with [[BOSSU:SendProperty|SendProperty]], and the rewritable column indicates properties which can be reassigned into an existing task with [[BOSSU:ReconfigureTask|ReconfigureTask]]. If the specified size for the command is larger than the property size, it will use the actual property size instead. When the specified size is less than the actual property size, all of the property data that won't be written to is cleared. | The official name for this type is "PropertyType". The read column represents properties which can be obtained with [[BOSSU:ReceiveProperty|ReceiveProperty]], the write column represents properties which can be set with [[BOSSU:SendProperty|SendProperty]], and the rewritable column indicates properties which can be reassigned into an existing task with [[BOSSU:ReconfigureTask|ReconfigureTask]]. If the specified size for the command is larger than the property size, it will use the actual property size instead. When the specified size is less than the actual property size, all of the property data that won't be written to is cleared. | ||
Trying to send a property which doesn't support being sent will give an error 0xC960F84D. Using reserved properties as an argument will give the same error. | Trying to send a property which doesn't support being sent will give an error 0xC960F84D. Using reserved properties as an argument will give the same error. | ||
== | ==TaskStateCode== | ||
{| class="wikitable" border="1" | {| class="wikitable" border="1" | ||
|- | |- | ||
| Line 790: | Line 719: | ||
This u8 is returned by [[BOSSU:GetTaskState]]. | This u8 is returned by [[BOSSU:GetTaskState]]. | ||
==PriorityLevel== | |||
{| class="wikitable" border="1" | |||
! Value !! Name !! Description | |||
|- | |||
| 0x0 || INVALID? || Probably represents an invalid value | |||
|- | |||
| 0x15 || EXPEDITE1 || | |||
|- | |||
| 0x16 || EXPEDITE2 || | |||
|- | |||
| 0x17 || EXPEDITE3 || | |||
|- | |||
| 0x18 || EXPEDITE4 || | |||
|- | |||
| 0x19 || EXPEDITE5 || | |||
|- | |||
| 0x1A || EXPEDITE6 || | |||
|- | |||
| 0x1B || EXPEDITE7 || | |||
|- | |||
| 0x1C || EXPEDITE8 || | |||
|- | |||
| 0x23 || EXPEDITE || | |||
|- | |||
| 0x50 || HIGH || | |||
|- | |||
| 0x7D || MEDIUM || This is the default value inside the games API | |||
|- | |||
| 0xAA || LOW || | |||
|- | |||
| 0xD7 || LOWEST || | |||
|- | |||
| 0xDD || LOWEST1 || | |||
|- | |||
| 0xDE || LOWEST2 || | |||
|- | |||
| 0xDF || LOWEST3 || | |||
|- | |||
| 0xE0 || LOWEST4 || | |||
|- | |||
| 0xE1 || LOWEST5 || | |||
|- | |||
| 0xE2 || LOWEST6 || | |||
|- | |||
| 0xE3 || LOWEST7 || | |||
|- | |||
| 0xE4 || LOWEST8 || | |||
|- | |||
| 0xFF || STOPPED || The task won't be run | |||
|} | |||
Represents the priority of a task. Any values outside the ones listed above are considered invalid. | |||
==ActionCode== | |||
{| class="wikitable" border="1" | |||
! Value !! Description | |||
|- | |||
| 0x1 || FileList? Action code used for listing files on the BOSS server. May be a generic raw download? | |||
|- | |||
| 0x2 || NsaDownload? Action code for downloading data from the given URL, principally an NsData | |||
|- | |||
| 0x3 || Upload? Action code for uploading data to the given URL | |||
|- | |||
| 0x4 || ? | |||
|- | |||
| 0x5 || ? | |||
|- | |||
| 0x6 || Action code used by task ID "pl" from the Home Menu | |||
|- | |||
| 0x7 || Action code used by task ID "phu" from the Home Menu | |||
|- | |||
| 0x8 || Action code used by task ID "tiu" from the Home Menu | |||
|- | |||
| 0x9 || Action code used by task ID "splu" from the Home Menu | |||
|- | |||
| 0xA || Action code used for downloading data from DataStore through an Hpp server. Stores notification data? | |||
|- | |||
| 0xB || Action code related to DataStore? | |||
|- | |||
| 0xC || Action code used for StreetPass Relay | |||
|- | |||
| 0xD || Action code used for downloading the title version list (versionList.dat) | |||
|} | |||
This represents the action that a task will perform. | |||
==ApInfoType== | |||
{| class="wikitable" border="1" | |||
! Flag !! Description | |||
|- | |||
| 0x1 || Adds the "apgroup" parameter to the query | |||
|- | |||
| 0x2 || Adds the "aparea" parameter to the query | |||
|- | |||
| 0x4 || Adds the "ap" parameter to the query | |||
|} | |||
This is a set of flags which add additional paramaters to the URL query with information about the access point the console is connected to. | |||
==CfgInfoType== | |||
{| class="wikitable" border="1" | |||
! Flag !! Description | |||
|- | |||
| 0x1 || Adds the "c" (two-letter country code) parameter to the query | |||
|- | |||
| 0x2 || Adds the "l" (two-letter language code) parameter to the query | |||
|- | |||
| 0x4 || Adds the "tm" ([[Cfg:GetSystemModel|target model]]) parameter to the query | |||
|} | |||
This is a set of flags which add additional paramaters to the URL query with information about the console configuration. | |||
==Errors== | ==Errors== | ||