Play Games Services Snapshots
Native API for Play Games Services Snapshots.
Summary
Enumerations |
|
|---|---|
PgsSnapshotConflictPolicy
|
enum |
Typedefs |
|
|---|---|
PgsSnapshot
|
typedefstruct PgsSnapshot
An opaque handle to a Snapshot. |
PgsSnapshotConflict
|
typedefstruct PgsSnapshotConflict
An opaque handle to a Snapshot Conflict. |
PgsSnapshotContents
|
typedefstruct PgsSnapshotContents
An opaque handle to Snapshot Contents. |
PgsSnapshotsClient_CommitAndCloseCallback)(PgsStatusCode status_code, PgsSnapshotMetadata *metadata, void *user_data)
|
typedefvoid(*
Callback for PgsSnapshotsClient_commitAndClose. |
PgsSnapshotsClient_DeleteCallback)(PgsStatusCode status_code, const char *snapshot_id, void *user_data)
|
typedefvoid(*
Callback for PgsSnapshotsClient_delete. |
PgsSnapshotsClient_DiscardAndCloseCallback)(PgsStatusCode status_code, void *user_data)
|
typedefvoid(*
Callback for PgsSnapshotsClient_discardAndClose. |
PgsSnapshotsClient_GetMaxCoverImageSizeCallback)(PgsStatusCode status_code, int32_t max_size, void *user_data)
|
typedefvoid(*
Callback for PgsSnapshotsClient_getMaxCoverImageSize. |
PgsSnapshotsClient_GetMaxDataSizeCallback)(PgsStatusCode status_code, int32_t max_size, void *user_data)
|
typedefvoid(*
Callback for PgsSnapshotsClient_getMaxDataSize. |
PgsSnapshotsClient_LoadCallback)(PgsStatusCode status_code, PgsSnapshotMetadata *snapshots_array, size_t snapshots_count, void *user_data)
|
typedefvoid(*
Callback for PgsSnapshotsClient_load. |
PgsSnapshotsClient_OpenCallback)(PgsStatusCode status_code, PgsSnapshot *snapshot, PgsSnapshotConflict *conflict, void *user_data)
|
typedefvoid(*
Callback for PgsSnapshotsClient_open and PgsSnapshotsClient_resolveConflict. |
PgsSnapshotsClient_ShowSelectSnapshotUICallback)(PgsStatusCode status_code, void *user_data)
|
typedefvoid(*
Callback for PgsSnapshotsClient_showSelectSnapshotUI. |
Functions |
|
|---|---|
PgsSnapshotConflict_destroy(PgsSnapshotConflict *conflict)
|
void
Destroys a PgsSnapshotConflict instance.
|
PgsSnapshotContents_destroy(PgsSnapshotContents *contents)
|
void
Destroys a PgsSnapshotContents instance.
|
PgsSnapshot_destroy(PgsSnapshot *snapshot)
|
void
Destroys a PgsSnapshot instance.
|
PgsSnapshotsClient_commitAndClose(PgsSnapshotsClient *snapshots_client, PgsSnapshot *snapshot, PgsSnapshotMetadataChange *metadata_change, const uint8_t *data, size_t data_size, PgsSnapshotsClient_CommitAndCloseCallback callback, void *user_data)
|
void
Asynchronously commits and closes a snapshot.
|
PgsSnapshotsClient_delete(PgsSnapshotsClient *snapshots_client, PgsSnapshot *snapshot, PgsSnapshotsClient_DeleteCallback callback, void *user_data)
|
void
Asynchronously deletes a snapshot.
|
PgsSnapshotsClient_discardAndClose(PgsSnapshotsClient *snapshots_client, PgsSnapshot *snapshot, PgsSnapshotsClient_DiscardAndCloseCallback callback, void *user_data)
|
void
Asynchronously discards and closes a snapshot.
|
PgsSnapshotsClient_getMaxCoverImageSize(PgsSnapshotsClient *snapshots_client, PgsSnapshotsClient_GetMaxCoverImageSizeCallback callback, void *user_data)
|
void
Asynchronously loads the maximum size of snapshot cover image in bytes.
|
PgsSnapshotsClient_getMaxDataSize(PgsSnapshotsClient *snapshots_client, PgsSnapshotsClient_GetMaxDataSizeCallback callback, void *user_data)
|
void
Asynchronously loads the maximum size of snapshot data.
|
PgsSnapshotsClient_load(PgsSnapshotsClient *snapshots_client, bool force_reload, PgsSnapshotsClient_LoadCallback callback, void *user_data)
|
void
Asynchronously loads snapshot data for the currently signed-in player for this application, invoking a callback upon completion.
|
PgsSnapshotsClient_open(PgsSnapshotsClient *snapshots_client, const char *file_name, bool create_if_not_found, enum PgsSnapshotConflictPolicy conflict_policy, PgsSnapshotsClient_OpenCallback callback, void *user_data)
|
void
Asynchronously opens a snapshot with given file name.
|
PgsSnapshotsClient_openFromMetadata(PgsSnapshotsClient *snapshots_client, PgsSnapshotMetadata *metadata, PgsSnapshotsClient_OpenCallback callback, void *user_data)
|
void
Asynchronously opens a snapshot from metadata with default conflict policy (manual).
|
PgsSnapshotsClient_openFromMetadataWithPolicy(PgsSnapshotsClient *snapshots_client, PgsSnapshotMetadata *metadata, enum PgsSnapshotConflictPolicy conflict_policy, PgsSnapshotsClient_OpenCallback callback, void *user_data)
|
void
Asynchronously opens a snapshot from metadata with given conflict policy.
|
PgsSnapshotsClient_openWithDefaultPolicy(PgsSnapshotsClient *snapshots_client, const char *file_name, bool create_if_not_found, PgsSnapshotsClient_OpenCallback callback, void *user_data)
|
void
Asynchronously opens a snapshot with given file name and default conflict policy (manual).
|
PgsSnapshotsClient_resolveConflict(PgsSnapshotsClient *snapshots_client, const char *conflict_id, const char *snapshot_id, PgsSnapshotMetadataChange *metadata_change, PgsSnapshotContents *contents, PgsSnapshotsClient_OpenCallback callback, void *user_data)
|
void
Asynchronously resolves a snapshot conflict.
|
PgsSnapshotsClient_showSelectSnapshotUI(PgsSnapshotsClient *snapshots_client, jobject activity, const char *title, bool allow_add_button, bool allow_delete_button, int max_snapshots, PgsSnapshotsClient_ShowSelectSnapshotUICallback callback, void *user_data)
|
void
Asynchronously shows the snapshot selection UI.
|
Enumerations
PgsSnapshotConflictPolicy
PgsSnapshotConflictPolicy
Typedefs
PgsSnapshot
struct PgsSnapshot PgsSnapshot
An opaque handle to a Snapshot.
PgsSnapshotConflict
struct PgsSnapshotConflict PgsSnapshotConflict
An opaque handle to a Snapshot Conflict.
PgsSnapshotContents
struct PgsSnapshotContents PgsSnapshotContents
An opaque handle to Snapshot Contents.
PgsSnapshotsClient_CommitAndCloseCallback
void(* PgsSnapshotsClient_CommitAndCloseCallback)(PgsStatusCode status_code, PgsSnapshotMetadata *metadata, void *user_data)
Callback for PgsSnapshotsClient_commitAndClose.
This is invoked after the asynchronous operation to commit and close completes or fails.
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters |
|
PgsSnapshotsClient_DeleteCallback
void(* PgsSnapshotsClient_DeleteCallback)(PgsStatusCode status_code, const char *snapshot_id, void *user_data)
Callback for PgsSnapshotsClient_delete.
This is invoked after the asynchronous operation to delete completes or fails.
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters |
|
PgsSnapshotsClient_DiscardAndCloseCallback
void(* PgsSnapshotsClient_DiscardAndCloseCallback)(PgsStatusCode status_code, void *user_data)
Callback for PgsSnapshotsClient_discardAndClose.
This is invoked after the asynchronous operation to discard and close completes or fails.
| Details | |||||
|---|---|---|---|---|---|
| Parameters |
|
PgsSnapshotsClient_GetMaxCoverImageSizeCallback
void(* PgsSnapshotsClient_GetMaxCoverImageSizeCallback)(PgsStatusCode status_code, int32_t max_size, void *user_data)
Callback for PgsSnapshotsClient_getMaxCoverImageSize.
This is invoked after the asynchronous operation to get max cover image size completes or fails.
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters |
|
PgsSnapshotsClient_GetMaxDataSizeCallback
void(* PgsSnapshotsClient_GetMaxDataSizeCallback)(PgsStatusCode status_code, int32_t max_size, void *user_data)
Callback for PgsSnapshotsClient_getMaxDataSize.
This is invoked after the asynchronous operation to get max data size completes or fails.
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters |
|
PgsSnapshotsClient_LoadCallback
void(* PgsSnapshotsClient_LoadCallback)(PgsStatusCode status_code, PgsSnapshotMetadata *snapshots_array, size_t snapshots_count, void *user_data)
Callback for PgsSnapshotsClient_load.
This is invoked after the asynchronous operation to load snapshots completes or fails.
| Details | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Parameters |
|
PgsSnapshotsClient_OpenCallback
void(* PgsSnapshotsClient_OpenCallback)(PgsStatusCode status_code, PgsSnapshot *snapshot, PgsSnapshotConflict *conflict, void *user_data)
Callback for PgsSnapshotsClient_open and PgsSnapshotsClient_resolveConflict.
| Details | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Parameters |
|
PgsSnapshotsClient_ShowSelectSnapshotUICallback
void(* PgsSnapshotsClient_ShowSelectSnapshotUICallback)(PgsStatusCode status_code, void *user_data)
Callback for PgsSnapshotsClient_showSelectSnapshotUI.
This is invoked after the asynchronous operation to show select snapshot UI completes or fails.
| Details | |||||
|---|---|---|---|---|---|
| Parameters |
|
Functions
PgsSnapshotConflict_destroy
void PgsSnapshotConflict_destroy( PgsSnapshotConflict *conflict )
Destroys a PgsSnapshotConflict instance.
This function releases all resources associated with the snapshot conflict handle. The handle becomes invalid after this call.
| Details | |||
|---|---|---|---|
| Parameters |
|
PgsSnapshotContents_destroy
void PgsSnapshotContents_destroy( PgsSnapshotContents *contents )
Destroys a PgsSnapshotContents instance.
This function releases all resources associated with the snapshot contents handle. The handle becomes invalid after this call.
| Details | |||
|---|---|---|---|
| Parameters |
|
PgsSnapshot_destroy
void PgsSnapshot_destroy( PgsSnapshot *snapshot )
Destroys a PgsSnapshot instance.
This function releases all resources associated with the snapshot handle. The handle becomes invalid after this call.
| Details | |||
|---|---|---|---|
| Parameters |
|
PgsSnapshotsClient_commitAndClose
void PgsSnapshotsClient_commitAndClose( PgsSnapshotsClient *snapshots_client, PgsSnapshot *snapshot, PgsSnapshotMetadataChange *metadata_change, const uint8_t *data, size_t data_size, PgsSnapshotsClient_CommitAndCloseCallback callback, void *user_data )
Asynchronously commits and closes a snapshot.
| Details | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Parameters |
|
PgsSnapshotsClient_delete
void PgsSnapshotsClient_delete( PgsSnapshotsClient *snapshots_client, PgsSnapshot *snapshot, PgsSnapshotsClient_DeleteCallback callback, void *user_data )
Asynchronously deletes a snapshot.
| Details | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Parameters |
|
PgsSnapshotsClient_discardAndClose
void PgsSnapshotsClient_discardAndClose( PgsSnapshotsClient *snapshots_client, PgsSnapshot *snapshot, PgsSnapshotsClient_DiscardAndCloseCallback callback, void *user_data )
Asynchronously discards and closes a snapshot.
| Details | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Parameters |
|
PgsSnapshotsClient_getMaxCoverImageSize
void PgsSnapshotsClient_getMaxCoverImageSize( PgsSnapshotsClient *snapshots_client, PgsSnapshotsClient_GetMaxCoverImageSizeCallback callback, void *user_data )
Asynchronously loads the maximum size of snapshot cover image in bytes.
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters |
|
PgsSnapshotsClient_getMaxDataSize
void PgsSnapshotsClient_getMaxDataSize( PgsSnapshotsClient *snapshots_client, PgsSnapshotsClient_GetMaxDataSizeCallback callback, void *user_data )
Asynchronously loads the maximum size of snapshot data.
The returned value is guaranteed to be at least 3MB, but may increase in the future.
| Details | |||||||
|---|---|---|---|---|---|---|---|
| Parameters |
|
PgsSnapshotsClient_load
void PgsSnapshotsClient_load( PgsSnapshotsClient *snapshots_client, bool force_reload, PgsSnapshotsClient_LoadCallback callback, void *user_data )
Asynchronously loads snapshot data for the currently signed-in player for this application, invoking a callback upon completion.
| Details | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Parameters |
|
PgsSnapshotsClient_open
void PgsSnapshotsClient_open( PgsSnapshotsClient *snapshots_client, const char *file_name, bool create_if_not_found, enum PgsSnapshotConflictPolicy conflict_policy, PgsSnapshotsClient_OpenCallback callback, void *user_data )
Asynchronously opens a snapshot with given file name.
| Details | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Parameters |
|
PgsSnapshotsClient_openFromMetadata
void PgsSnapshotsClient_openFromMetadata( PgsSnapshotsClient *snapshots_client, PgsSnapshotMetadata *metadata, PgsSnapshotsClient_OpenCallback callback, void *user_data )
Asynchronously opens a snapshot from metadata with default conflict policy (manual).
| Details | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| Parameters |
|
PgsSnapshotsClient_openFromMetadataWithPolicy
void PgsSnapshotsClient_openFromMetadataWithPolicy( PgsSnapshotsClient *snapshots_client, PgsSnapshotMetadata *metadata, enum PgsSnapshotConflictPolicy conflict_policy, PgsSnapshotsClient_OpenCallback callback, void *user_data )
Asynchronously opens a snapshot from metadata with given conflict policy.
| Details | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Parameters |
|
PgsSnapshotsClient_openWithDefaultPolicy
void PgsSnapshotsClient_openWithDefaultPolicy( PgsSnapshotsClient *snapshots_client, const char *file_name, bool create_if_not_found, PgsSnapshotsClient_OpenCallback callback, void *user_data )
Asynchronously opens a snapshot with given file name and default conflict policy (manual).
| Details | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Parameters |
|
PgsSnapshotsClient_resolveConflict
void PgsSnapshotsClient_resolveConflict( PgsSnapshotsClient *snapshots_client, const char *conflict_id, const char *snapshot_id, PgsSnapshotMetadataChange *metadata_change, PgsSnapshotContents *contents, PgsSnapshotsClient_OpenCallback callback, void *user_data )
Asynchronously resolves a snapshot conflict.
| Details | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Parameters |
|
PgsSnapshotsClient_showSelectSnapshotUI
void PgsSnapshotsClient_showSelectSnapshotUI( PgsSnapshotsClient *snapshots_client, jobject activity, const char *title, bool allow_add_button, bool allow_delete_button, int max_snapshots, PgsSnapshotsClient_ShowSelectSnapshotUICallback callback, void *user_data )
Asynchronously shows the snapshot selection UI.
| Details | |||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Parameters |
|