Changes

233 bytes removed ,  17:36, 30 April 2018
ContentStorage + ContentManager
Line 198: Line 198:  
! Cmd || Name || Notes
 
! Cmd || Name || Notes
 
|-
 
|-
| 0 || CreatePlaceholderAndRegisteredDirectoriesForMediaId || Takes a [[Filesystem_services#StorageId|StorageID]].
+
| 0 || CreateContentStorage || Takes a [[Filesystem_services#StorageId|StorageID]].
 
|-
 
|-
| 1 || CreateSaveDataDirectoryForMediaId || Takes a [[Filesystem_services#StorageId|StorageID]].
+
| 1 || CreateContentMetaDatabase || Takes a [[Filesystem_services#StorageId|StorageID]].
 
|-
 
|-
| 2 || GetExistsPlaceholderAndRegisteredDirectoriesForMediaId || Takes a [[Filesystem_services#StorageId|StorageID]].
+
| 2 || VerifyContentStorage || Takes a [[Filesystem_services#StorageId|StorageID]].
 
|-
 
|-
| 3 || GetExistsSaveDataDirectoryForMediaId || Takes a [[Filesystem_services#StorageId|StorageID]].
+
| 3 || VerifyContentMetaDatabase || Takes a [[Filesystem_services#StorageId|StorageID]].
 
|-
 
|-
| 4 || GetIContentStorage || Takes a [[Filesystem_services#StorageId|StorageID]], [2.0.0+] Only returns a storage if one has previously been opened globally via OpenIContentStorage.
+
| 4 || OpenContentStorage || Takes a [[Filesystem_services#StorageId|StorageID]], [2.0.0+] Only returns a storage if one has previously been opened globally via OpenIContentStorage.
 
|-
 
|-
| 5 || GetIContentMetaDatabase || Takes a [[Filesystem_services#StorageId|StorageID]], [2.0.0+] Only returns a storage if one has previously been opened globally via OpenIContentStorage.
+
| 5 || OpenContentMetaDatabase || Takes a [[Filesystem_services#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 [[Filesystem_services#StorageId|StorageID]]. Calls IContentStorage->CloseAndFlushStorage().
 
| 6 || [1.0.0] CloseContentStorageForcibly || Takes a [[Filesystem_services#StorageId|StorageID]]. Calls IContentStorage->CloseAndFlushStorage().
Line 214: Line 214:  
| 7 || [1.0.0] CloseContentMetaDatabaseForcibly || Takes a [[Filesystem_services#StorageId|StorageID]].  Calls IContentMetaDatabase->CloseMetaDatabase().
 
| 7 || [1.0.0] CloseContentMetaDatabaseForcibly || Takes a [[Filesystem_services#StorageId|StorageID]].  Calls IContentMetaDatabase->CloseMetaDatabase().
 
|-
 
|-
| 8 || DeleteSaveDataForMediaId || Takes a [[Filesystem_services#StorageId|StorageID]], and deletes the associated savedata.
+
| 8 || CleanupContentMetaDatabase || Takes a [[Filesystem_services#StorageId|StorageID]], and deletes the associated savedata.
 
|-
 
|-
| 9 || [2.0.0+] OpenIContentStorage || Takes a [[Filesystem_services#StorageId|StorageID]], and opens an IContentStorage for the StorageID to be gotten with GetIContentStorage.
+
| 9 || [2.0.0+] OpenContentStorage2 || Takes a [[Filesystem_services#StorageId|StorageID]], and opens an IContentStorage for the StorageID to be gotten with GetIContentStorage. Note: Name is not official.
 
|-
 
|-
| 10 || [2.0.0+] CloseIContentStorage || Takes a [[Filesystem_services#StorageId|StorageID]], and closes the associated IContentStorage.
+
| 10 || [2.0.0+] CloseContentStorage || Takes a [[Filesystem_services#StorageId|StorageID]], and closes the associated IContentStorage. Note: Name is not official.
 
|-
 
|-
| 11 || [2.0.0+] OpenIContentMetaDatabase || Takes a [[Filesystem_services#StorageId|StorageID]], and opens an IContentMetaDatabase for the StorageID to be gotten with GetIContentMetaDatabase.
+
| 11 || [2.0.0+] OpenContentMetaDatabase2 || Takes a [[Filesystem_services#StorageId|StorageID]], and opens an IContentMetaDatabase for the StorageID to be gotten with GetIContentMetaDatabase. Note: Name is not official.
 
|-
 
|-
| 12 || [2.0.0+] CloseIContentMetaDatabase || Takes a [[Filesystem_services#StorageId|StorageID]], and closes the associated IContentMetaDatabase.
+
| 12 || [2.0.0+] CloseContentMetaDatabase || Takes a [[Filesystem_services#StorageId|StorageID]], and closes the associated IContentMetaDatabase. Note: Name is not official.
 
|}
 
|}
   Line 234: Line 234:  
| 0 || [[#GeneratePlaceHolderId]] || Returns a random UUID for the Content Storage.
 
| 0 || [[#GeneratePlaceHolderId]] || Returns a random UUID for the Content Storage.
 
|-
 
|-
| 1 || CreatePlaceholderEntryAndRegisteredDirectoryEntry || Takes two [[#NcaID]]s, and a u64 filesize.
+
| 1 || CreatePlaceHolder || Takes two [[#NcaID]]s, and a u64 filesize.
 
|-
 
|-
| 2 || DeletePlaceholderEntry || Takes a [[#NcaID]].
+
| 2 || DeletePlaceHolder || Takes a [[#NcaID]].
 
|-
 
|-
| 3 || DoesPlaceholderEntryExist ||  Takes a [[#NcaID]].
+
| 3 || HasPlaceHolder ||  Takes a [[#NcaID]].
 
|-
 
|-
| 4 || WritePlaceholderEntry || Takes a [[#NcaID]], a u64-offset, and type 5 buffer. Writes the buffer to the file for the NcaID's placeholder path at the specified offset.
+
| 4 || WritePlaceHolder || Takes a [[#NcaID]], a u64-offset, and type 5 buffer. Writes the buffer to the file for the NcaID's placeholder path at the specified offset.
 
|-
 
|-
| 5 || MovePlaceholderToRegistered || Takes two [[#NcaID]]s, moves the Placeholder NCA content to the registered NCA path.
+
| 5 || Register || Takes two [[#NcaID]]s, moves the Placeholder NCA content to the registered NCA path.
 
|-
 
|-
| 6 || DeleteRegisteredEntry || Takes a [[#NcaID]].
+
| 6 || Delete || Takes a [[#NcaID]].
 
|-
 
|-
| 7 || DoesRegisteredEntryExist || Takes a [[#NcaID]].
+
| 7 || Has || Takes a [[#NcaID]].
 
|-
 
|-
 
| 8 || GetPath || Takes a [[#NcaID]]. Returns a [[Filesystem_services#ContentPath|Content Path]].
 
| 8 || GetPath || Takes a [[#NcaID]]. Returns a [[Filesystem_services#ContentPath|Content Path]].
 
|-
 
|-
| 9 || GetPlaceholderPath || Takes a [[#NcaID]]. Returns a [[Filesystem_services#ContentPath|Content Path]].
+
| 9 || GetPlaceHolderPath || Takes a [[#NcaID]]. Returns a [[Filesystem_services#ContentPath|Content Path]].
 
|-
 
|-
| 10 || CleanPlaceholderDirectory || Deletes and re-creates the Placeholder directory.
+
| 10 || CleanupAllPlaceHolder || Deletes and re-creates the Placeholder directory.
 
|-
 
|-
| 11 || GetNumberOfPlacholderEntries || This is like [[#GetNumberOfRegisteredEntries]], but for the Placeholder directory.
+
| 11 || ListPlaceHolder || This is like [[#GetNumberOfRegisteredEntries]], but for the Placeholder directory.
 
|-
 
|-
| 12 || [[#GetNumberOfRegisteredEntries]] ||
+
| 12 || [[#GetContentCount]] ||
 
|-
 
|-
| 13 || [[#GetRegisteredEntries]] ||
+
| 13 || [[#ListContentId]] ||
 
|-
 
|-
| 14 || [[#GetRegisteredEntrySize]] ||  
+
| 14 || [[#GetSize]] ||  
 
|-
 
|-
| 15 || CloseAndFlushStorage || Closes/Flushes all resources for the storage, and causes all future IPC commands to the current session to return error 0xC805.
+
| 15 || DisableForcibly || Closes/Flushes all resources for the storage, and causes all future IPC commands to the current session to return error 0xC805.
 
|-
 
|-
| 16 || [2.0.0+] CreatePlaceholderEntryRegisteredEntryAndRegisteredDirectoryEntry || Takes three 0x10-sized [[#NcaID]]s. Creates the registered directory NCA path, and renames the placeholder path to the registered NCA path.
+
| 16 || [2.0.0+] RevertToPlaceHolder || Takes three 0x10-sized [[#NcaID]]s. Creates the registered directory NCA path, and renames the placeholder path to the registered NCA path.
 
|-
 
|-
| 17 || [2.0.0+] SetPlaceholderEntrySize || Takes a [[#NcaID]], and a u64 size
+
| 17 || [2.0.0+] SetPlaceHolderSize || Takes a [[#NcaID]], and a u64 size
 
|-
 
|-
| 18 || [2.0.0+] [[#ReadRegisteredEntryRaw]] ||
+
| 18 || [2.0.0+] [[#ReadContentIdFile]] ||
 
|-
 
|-
| 19 || [2.0.0+] GetPlaceholderEntryRightsID || Gets the Rights ID for the [[#NcaID]]'s placeholder path.
+
| 19 || [2.0.0+] GetRightsIdFromPlaceHolderId || Gets the Rights ID for the [[#NcaID]]'s placeholder path.
 
|-
 
|-
| 20 || [2.0.0+] GetRegisteredEntryRightsID || Gets the Rights ID for the [[#NcaID]]'s registered path
+
| 20 || [2.0.0+] GetRightsIdFromContentId || Gets the Rights ID for the [[#NcaID]]'s registered path
 
|-
 
|-
| 21 || [2.0.0+] WriteRegisteredPathForDebug || Takes a [[#NcaID]], a u64 offset, and a type 5 buffer. On debug units, writes the buffer to the NCA's registered path. On retail units, this just aborts.
+
| 21 || [2.0.0+] WriteContentForDebug || Takes a [[#NcaID]], a u64 offset, and a type 5 buffer. On debug units, writes the buffer to the NCA's registered path. On retail units, this just aborts.
 
|-
 
|-
| 22 || [2.0.0+] GetFreeSpace || Gets free space for the storage.
+
| 22 || [2.0.0+] GetFreeSpaceSize || Gets free space for the storage.
 
|-
 
|-
| 23 || [2.0.0+] GetTotalSpace || Gets total space for the storage.
+
| 23 || [2.0.0+] GetTotalSpaceSize || Gets total space for the storage.
 
|-
 
|-
 
| 24 || [3.0.0+] FlushStorage || Flushes resources for the storage without closing it.
 
| 24 || [3.0.0+] FlushStorage || Flushes resources for the storage without closing it.
Line 292: Line 292:  
Calls nn::util::GenerateUuid(), which internally calls nn::os::GenerateRandomBytes(16);
 
Calls nn::util::GenerateUuid(), which internally calls nn::os::GenerateRandomBytes(16);
   −
==== GetNumberOfRegisteredEntries ====
+
==== GetContentCount ====
 
Writes the total number of entries which can be read by GetEntries, to cmdreply <SFCO_offset>+0x10.
 
Writes the total number of entries which can be read by GetEntries, to cmdreply <SFCO_offset>+0x10.
   −
==== GetRegisteredEntries ====
+
==== ListContentId====
 
Takes an output buffer, u32 offset and gets all entries starting at that offset.
 
Takes an output buffer, u32 offset and gets all entries starting at that offset.
 
Returns number of entries read.
 
Returns number of entries read.
Line 303: Line 303:  
The total read entries is exactly the same as the number of "<hex>.nca" directories in the storage FS(or at least under the "registered" directory?).
 
The total read entries is exactly the same as the number of "<hex>.nca" directories in the storage FS(or at least under the "registered" directory?).
   −
==== GetRegisteredEntrySize ====
+
==== GetSize ====
 
Takes a [[#NcaID]] as input.
 
Takes a [[#NcaID]] as input.
    
Returns the total size readable by ReadEntryRaw. This is the same as the size-field in the [[NAX0]] "<NcaID>.nca/00" file.
 
Returns the total size readable by ReadEntryRaw. This is the same as the size-field in the [[NAX0]] "<NcaID>.nca/00" file.
   −
==== ReadRegisteredEntryRaw ====
+
==== ReadContentIdFile ====
 
Takes an output buffer, a [[#NcaID]] as input, and a u64 file offset.
 
Takes an output buffer, a [[#NcaID]] as input, and a u64 file offset.