gpg::Quest

#include <quest.h>

A single data structure allowing you to access data about the status of a specific quest.

Summary

Deprecated. The Google Play Games quests service will be deprecated as of March 2018. Do not use the Google Play Games quests service in new apps. See the deprecation announcement blog post for more details.

Constructors and Destructors

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

Public functions

AcceptedTime() const
Returns the time (in milliseconds since epoch) at which this quest was accepted by the player, or 0 if the player did not accept the quest.
BannerUrl() const
const std::string &
Returns the URL leading to the banner image for this quest.
CurrentMilestone() const
Returns the latest milestone information associated with this quest.
Description() const
const std::string &
Returns the description of the quest.
ExpirationTime() const
Returns the time (in milliseconds since epoch) at which this quest will expire.
IconUrl() const
const std::string &
Returns the URL leading to the image of the icon for this quest.
Id() const
const std::string &
Returns the unique string that the Google Play Developer Console generated beforehand.
Name() const
const std::string &
Returns the name of the quest.
StartTime() const
Returns the time (in milliseconds since epoch) at which this quest will be available for players to accept.
State() const
Returns the quest state: UPCOMING, OPEN, ACCEPTED, COMPLETED, EXPIRED, or FAILED.
Valid() const
bool
Returns true when the returned quest is populated with data and is accompanied by a successful response status; false for an unpopulated user-created quest or for a populated one accompanied by an unsuccessful response status.
operator=(const Quest & copy_from)
Quest &
Assigns this Quest from another one.
operator=(Quest && move_from)
Quest &
Assigns this Quest by moving another one into it.

Public functions

AcceptedTime

Timestamp AcceptedTime() const 

Returns the time (in milliseconds since epoch) at which this quest was accepted by the player, or 0 if the player did not accept the quest.

When the quest has been accepted, Start() <= Accepted() <= Expiration(). Quest::Valid() must return true for this function to be usable.

BannerUrl

const std::string & BannerUrl() const 

Returns the URL leading to the banner image for this quest.

Returns an empty string if the quest has no banner. Quest::Valid() must return true for this function to be usable.

CurrentMilestone

QuestMilestone CurrentMilestone() const 

Returns the latest milestone information associated with this quest.

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

Description

const std::string & Description() const 

Returns the description of the quest.

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

ExpirationTime

Timestamp ExpirationTime() const 

Returns the time (in milliseconds since epoch) at which this quest will expire.

It will always be true that Start() < Expiration(). Quest::Valid() must return true for this function to be usable.

IconUrl

const std::string & IconUrl() const 

Returns the URL leading to the image of the icon for this quest.

Returns an empty string if the quest has no icon. Quest::Valid() must return true for this function to be usable.

Id

const std::string & Id() const 

Returns the unique string that the Google Play Developer Console generated beforehand.

Use it to refer to a quest in your game client. Quest::Valid() must return true for this function to be usable.

Name

const std::string & Name() const 

Returns the name of the quest.

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

Quest

 Quest()

Quest

 Quest(
  std::shared_ptr< const QuestImpl > impl
)

Constructs a Quest from a shared_ptr to a QuestImpl.

Intended for internal use by the API.

Quest

 Quest(
  const Quest & copy_from
)

Creates a copy of an existing Quest.

Quest

 Quest(
  Quest && move_from
)

Moves an existing Quest.

StartTime

Timestamp StartTime() const 

Returns the time (in milliseconds since epoch) at which this quest will be available for players to accept.

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

State

QuestState State() const 

Returns the quest state: UPCOMING, OPEN, ACCEPTED, COMPLETED, EXPIRED, or FAILED.

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

Valid

bool Valid() const 

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

This function must return true for the getter functions on this quest to be usable.

operator=

Quest & operator=(
  const Quest & copy_from
)

Assigns this Quest from another one.

operator=

Quest & operator=(
  Quest && move_from
)

Assigns this Quest by moving another one into it.

~Quest

 ~Quest()

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

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