NCM services: Difference between revisions
→Content Manager services: whoops |
"whoops part 2, electric boogaloo" |
||
Line 9: | Line 9: | ||
! Cmd || Name || Arguments || Notes | ! Cmd || Name || Arguments || Notes | ||
|- | |- | ||
| 0 || OpenLocationResolver || [[ | | 0 || OpenLocationResolver || [[#StorageId|StorageID]] || | ||
|- | |- | ||
| 1 || OpenRegisteredLocationResolver || None || | | 1 || OpenRegisteredLocationResolver || None || | ||
|- | |- | ||
| 2 || RefreshLocationResolver || [[ | | 2 || RefreshLocationResolver || [[#StorageId|StorageID]] || | ||
|- | |- | ||
| 3 || [2.0.0+] OpenAddOnContentLocationResolver || None || | | 3 || [2.0.0+] OpenAddOnContentLocationResolver || None || | ||
Line 68: | Line 68: | ||
|} | |} | ||
If the supplied [[ | If the supplied [[#StorageId|StorageID]] is 1 (Host), a different set of internal functions is used to handle these commands. In this more restricted set of functions, GetControlNcaPath is stubbed and only returns error 0x608. | ||
The Get* commands load the [[Filesystem_services|ContentPath]] from linked-lists' [[#Location_List_Entry|entries]] in memory using the input TitleID. When the command fails to find an entry for the specified TitleID, 0x408 is returned for GetProgramNcaPath and 0xA08 is returned for the rest. | The Get* commands load the [[Filesystem_services|ContentPath]] from linked-lists' [[#Location_List_Entry|entries]] in memory using the input TitleID. When the command fails to find an entry for the specified TitleID, 0x408 is returned for GetProgramNcaPath and 0xA08 is returned for the rest. | ||
Line 209: | Line 209: | ||
| 0 || ResolveAddOnContentPath || u64 TitleID + C descriptor || | | 0 || ResolveAddOnContentPath || u64 TitleID + C descriptor || | ||
|- | |- | ||
| 1 || RegisterAddOnContentStorage || [[ | | 1 || RegisterAddOnContentStorage || [[#StorageId|StorageID]] + u64 TitleID [9.0.0+] Now takes an additional u64 TitleID for the owner application. || | ||
|- | |- | ||
| 2 || UnregisterAllAddOnContentPath || None || Clears all registered titles here. | | 2 || UnregisterAllAddOnContentPath || None || Clears all registered titles here. | ||
Line 252: | Line 252: | ||
! Cmd || Name || Notes | ! Cmd || Name || Notes | ||
|- | |- | ||
| 0 || CreateContentStorage || Takes a [[ | | 0 || CreateContentStorage || Takes a [[#StorageId|StorageID]]. | ||
|- | |- | ||
| 1 || CreateContentMetaDatabase || Takes a [[ | | 1 || CreateContentMetaDatabase || Takes a [[#StorageId|StorageID]]. | ||
|- | |- | ||
| 2 || VerifyContentStorage || Takes a [[ | | 2 || VerifyContentStorage || Takes a [[#StorageId|StorageID]]. | ||
|- | |- | ||
| 3 || VerifyContentMetaDatabase || Takes a [[ | | 3 || VerifyContentMetaDatabase || Takes a [[#StorageId|StorageID]]. | ||
|- | |- | ||
| 4 || OpenContentStorage || Takes a [[ | | 4 || OpenContentStorage || Takes a [[#StorageId|StorageID]], [2.0.0+] Only returns a storage if one has previously been opened globally via OpenIContentStorage. | ||
|- | |- | ||
| 5 || OpenContentMetaDatabase || Takes a [[ | | 5 || OpenContentMetaDatabase || Takes a [[#StorageId|StorageID]], [2.0.0+] Only returns a storage if one has previously been opened globally via OpenIContentStorage. | ||
|- | |- | ||
| 6 || [1.0.0] CloseContentStorageForcibly || Takes a [[ | | 6 || [1.0.0] CloseContentStorageForcibly || Takes a [[#StorageId|StorageID]]. Calls IContentStorage->CloseAndFlushStorage(). | ||
|- | |- | ||
| 7 || [1.0.0] CloseContentMetaDatabaseForcibly || Takes a [[ | | 7 || [1.0.0] CloseContentMetaDatabaseForcibly || Takes a [[#StorageId|StorageID]]. Calls IContentMetaDatabase->CloseMetaDatabase(). | ||
|- | |- | ||
| 8 || CleanupContentMetaDatabase || Takes a [[ | | 8 || CleanupContentMetaDatabase || Takes a [[#StorageId|StorageID]], and deletes the associated savedata. | ||
|- | |- | ||
| 9 || [2.0.0+] ActivateContentStorage || Takes a [[ | | 9 || [2.0.0+] ActivateContentStorage || Takes a [[#StorageId|StorageID]], and opens an IContentStorage for the StorageID to be gotten with GetIContentStorage. Note: Name is not official. | ||
|- | |- | ||
| 10 || [2.0.0+] InactivateContentStorage || Takes a [[ | | 10 || [2.0.0+] InactivateContentStorage || Takes a [[#StorageId|StorageID]], and closes the associated IContentStorage. Note: Name is not official. | ||
|- | |- | ||
| 11 || [2.0.0+] ActivateContentMetaDatabase || Takes a [[ | | 11 || [2.0.0+] ActivateContentMetaDatabase || Takes a [[#StorageId|StorageID]], and opens an IContentMetaDatabase for the StorageID to be gotten with GetIContentMetaDatabase. Note: Name is not official. | ||
|- | |- | ||
| 12 || [2.0.0+] InactivateContentMetaDatabase || Takes a [[ | | 12 || [2.0.0+] InactivateContentMetaDatabase || Takes a [[#StorageId|StorageID]], and closes the associated IContentMetaDatabase. Note: Name is not official. | ||
|- | |- | ||
| 13 || [9.0.0+] InvalidateRightsIdCache || | | 13 || [9.0.0+] InvalidateRightsIdCache || | ||
Line 601: | Line 601: | ||
| 0x0 || 0x8 || titleID | | 0x0 || 0x8 || titleID | ||
|- | |- | ||
| 0x8 || 0x1 || [[ | | 0x8 || 0x1 || [[#StorageId|storageID]] | ||
|- | |- | ||
| 0x9 || 0x7 || Padding | | 0x9 || 0x7 || Padding |