gpg::SnapshotMetadata

#include <snapshot_metadata.h>

A single data structure that allows you to access data about the status of a specific snapshot metadata.

Summary

Unlike other value types, a SnapshotMetadata is not strictly immutable. SnapshotManager APIs can "close" the snapshot, changing the result of the IsOpen() method; such APIs universally require that the SnapshotMetadata passed in IsOpen().

Constructors and Destructors

SnapshotMetadata()
SnapshotMetadata(std::shared_ptr< SnapshotMetadataImpl > impl)
Constructs a SnapshotMetadata object from a shared_ptr to a SnapshotMetadataImpl.
SnapshotMetadata(const SnapshotMetadata & copy_from)
Creates a copy of an existing SnapshotMetadata object.
SnapshotMetadata(SnapshotMetadata && move_from)
Moves an existing SnapshotMetadata object.
~SnapshotMetadata()

Public functions

CoverImageURL() const
const std::string &
Returns cover image url.
Description() const
const std::string &
Returns a concise description of your snapshot metadata.
FileName() const
const std::string &
Returns the file name and the unique identifier of the snapshot.
IsOpen() const
bool
Returns true when the returned snapshot metadata has been loaded with matching file data.
LastModifiedTime() const
Returns the time at which the entry was last modified (expressed as milliseconds since the Unix epoch).
PlayedTime() const
Returns the played time associated with this snapshot metadata.
ProgressValue() const
int64_t
Returns the set progress value associated with this snapshot metadata.
Valid() const
bool
Returns true when the returned snapshot metadata is populated with data and is accompanied by a successful response status; false for an unpopulated user-created snapshot or for a populated one accompanied by an unsuccessful response status.
operator=(const SnapshotMetadata & copy_from)
Assigns this SnapshotMetadata object by copying from another one.
operator=(SnapshotMetadata && move_from)
Assigns this SnapshotMetadata object by moving another one into it.

Public functions

CoverImageURL

const std::string & CoverImageURL() const 

Returns cover image url.

Description

const std::string & Description() const 

Returns a concise description of your snapshot metadata.

SnapshotMetadata::Valid() must return true for this function to be usable.

FileName

const std::string & FileName() const 

Returns the file name and the unique identifier of the snapshot.

Snapshot names must be between 1 and 100 non-URL-reserved characters (a-z, A-Z, 0-9, or the symbols "-", ".", "_", or "~").

IsOpen

bool IsOpen() const 

Returns true when the returned snapshot metadata has been loaded with matching file data.

Data related operations such as Read, Commit, and Resolve will only work if the object has file data. Despite being const, this value changes to reflect the underlying data of the snapshot metadata. For example, calling Commit on the operation will result in IsOpen() returning false;

LastModifiedTime

Timestamp LastModifiedTime() const 

Returns the time at which the entry was last modified (expressed as milliseconds since the Unix epoch).

PlayedTime

gpg::Duration PlayedTime() const 

Returns the played time associated with this snapshot metadata.

ProgressValue

int64_t ProgressValue() const 

Returns the set progress value associated with this snapshot metadata.

The progress value is used in automatic conflict resolution.

SnapshotMetadata

 SnapshotMetadata()

SnapshotMetadata

 SnapshotMetadata(
  std::shared_ptr< SnapshotMetadataImpl > impl
)

Constructs a SnapshotMetadata object from a shared_ptr to a SnapshotMetadataImpl.

Intended for internal use by the API.

SnapshotMetadata

 SnapshotMetadata(
  const SnapshotMetadata & copy_from
)

Creates a copy of an existing SnapshotMetadata object.

SnapshotMetadata

 SnapshotMetadata(
  SnapshotMetadata && move_from
)

Moves an existing SnapshotMetadata object.

Valid

bool Valid() const 

Returns true when the returned snapshot metadata is populated with data and is accompanied by a successful response status; false for an unpopulated user-created snapshot or for a populated one accompanied by an unsuccessful response status.

This function must return true for the getter functions (id, Name, Description, etc.) on this snapshot to be usable.

operator=

SnapshotMetadata & operator=(
  const SnapshotMetadata & copy_from
)

Assigns this SnapshotMetadata object by copying from another one.

operator=

SnapshotMetadata & operator=(
  SnapshotMetadata && move_from
)

Assigns this SnapshotMetadata object by moving another one into it.

~SnapshotMetadata

 ~SnapshotMetadata()

傳送您對下列選項的寶貴意見...

這個網頁
Play Games Services for C++
Play Games Services for C++