Used to communicated with the ConnectedStorage (save data) system on Xbox One.
delete ( storage_id, container ) : integerDeletes the specified container from the storage space.
|
storage_id : | integer | The ID of the storage space to delete from. |
container : | string | The container in the storage space to delete. |
integer |
An ID that can be used to track the status of the operation using status(). |
This is an async operation, use status() to track progress. You must call finish() when you are done with the task.
finish ( read_id )Releases all the resources from an operation.
|
read_id : | integer | The ID of the operation you are done with. |
This function does not return any values. |
You should call this exactly once for each operation call (regardless of whether that call completed successfully or not).
get_storage_space ( user_id ) : integerGets the storage space for the specified user.
|
user_id : | integer | The user whose storage space we are querying. |
integer |
An ID identifying the storage space. |
This is an async operation. You can check its status with status() You can use the storage space when the operation has completed. When you are done with the storage space you should call finish() to free all resources with the storage space.
query ( storage_id, container_prefix ) : integerRequests information about all containers with the specified prefix.
|
storage_id : | integer | The ID of the storage space to read from. |
container_prefix : | string? | Optional prefix for containers to search for. If not specified, will return all coontainers. The ? notation indicates that this type is optional: there may be zero or one instances of it. |
integer |
An ID that can be used to track the progress of the operation. |
If no prefix is specified, returns information about all containters.
query_result ( query_id ) : tableCall this after a query() has completed successfully to get the result of the query operation.
|
query_id : | integer | The ID of the read operation (returned by query()). |
table |
A table with the result of the query operation. The returned table has a table with data for each container with the fields "display_name", "name", "needs_sync" and "total_size". |
The data is only available until you call finish().
read ( storage_id, container, reads ) : integerReads data from a storage container.
|
storage_id : | integer | The ID of the storage space to read from. |
container : | string | The name of the container to read from. |
reads : | table | A table of strings with the keys that should be read from the container. |
integer |
An ID that can be used to track the progress of the operation. |
get_storage_space() must have completed for the storage_id before you call this function.
This is an async operation. Use status() to track the progress of the operation. When you are done you should call finish() to complete the operation.
read_result ( read_id ) : tableCall this after a read() has completed successfully to get the result of the read operation.
|
read_id : | integer | The ID of the read operation (returned by read()). |
table |
A table with the result of the read operation. |
The data is only available until you call finish();
status ( id ) : integerReturns the current status of the operation.
|
id : | integer | The ID of the async operation. |
integer |
The status (UNKNOWN, STARTED, COMPLETED, CANCELED, ERROR) of the operation. |
submit ( storage_id, container, display_name, writes, deletes ) : integerWrites data to a container in the storage space.
|
storage_id : | integer | The ID of the storage space to write data to. |
container : | string | The container in the storage space to write to. |
display_name : | string | The display name that will be shown for the container. |
writes : | table | A table with keys (strings) and values (strings) to write to the container. This can be nil if you just want to delete data. |
deletes : | table | A table with names of keys to delete from the container. This can be nil if you just want to write data. |
integer |
An ID that can be used to track the status of the operation using status(). |
A number of values are written under the specified keys. Keys can also be deleted using this function. You can only call this function if get_storage_space() has completed successfully for the storage space.
This is an async operation, use status() to track progress. You must call finish() when you are done with the task.
CANCELED : integerThe operation was cancelled by the user.
|
COMPLETED : integerThe operation has completed successfully.
|
ERROR : integerAn error occurred while performing the operation.
|
STARTED : integerThe operations is in progress.
|
It has been started but not yet completed.
UNKNOWN : integerThe operation is unknown to the system, either because it has never been started or because it has been finished.
|