Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
The primary management class for the XGameSave wrapper.
Syntax
class Provider
Methods
| Method | Description |
|---|---|
| Initialize | Intializes the save game wrapper, and synchronizes all of the containers for the specified user. |
| QueryContainers | Returns a vector of container names that match the supplied name prefix. |
| QueryContainerBlobs | Returns a vector of BlobInfo objects that identify the blobs (files) in the specified container. |
| Load | Loads the data from the given blob (file), from within the specified container. |
| Save | Saves data to the specified blob (file) within the specified container. |
| GetQuota | Returns the amount of data available to store using the save game wrapper. |
| Delete(std::string&) | Deletes a container along with all of its blobs (files). |
| Delete(std::string&, std::string&) | Deletes the specified blobs (files) from the specified container. |
| Delete(std::string&, BlobNames&) | Deletes one or more blobs (files) from the specified container. |
Remarks
The XGameSave simplified wrapper is a set of API's that enable reading and writing data on behalf of a user, to be persisted across game sessions, and to seemlessly sync with the cloud across multiple devices. The wrapper APIs fall into three catagories:
Providers
gs_provider_t is the handle that binds a user context to a game save. It's required for API interactions. Each provider can contain multiple containers, and each provider has a default quota of 256 MB. Provider operations include:
- Quota information
- Container management
- Provider Metadata (Service Configuration ID, UserContext)
Containers
You can use containers to logically correlate data into a group that can be written to, updated, and read from atomically. Container operations include:
- Queries on container info, and container status
- Queries on container contents
- Atomic updates to container data
Binary large objects (blobs)
Blobs contain the data contained within a container. The maximum amount of data that a blob can contain is 16 MB.
- Blob update and delete operations are designed to be atomic, so that a set of changes can be committed in one operation. If any portion fails, then the entire update fails.
Requirements
Header: xgamesavewrappers.hpp
Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles
See also
Microsoft.Xbox.Wrappers.XGameSave.Provider
XGameSave wrapper members
Game saves simplified wrapper
Observer Design Pattern