Play Games Services Player Game Event

Data interface for constructing player game events.

Summary

Typedefs

PgsPlayerGameEvent typedef
An opaque handle to the PlayerGameEvent builder.

Functions

PgsPlayerGameEvent_create(const char *event_name)
Creates a new PlayerGameEvent builder.
PgsPlayerGameEvent_destroy(PgsPlayerGameEvent *event)
void
Destroys a PlayerGameEvent handle.
PgsPlayerGameEvent_putBoolean(PgsPlayerGameEvent *event, const char *key, bool value)
void
Adds a boolean property to the event.
PgsPlayerGameEvent_putDouble(PgsPlayerGameEvent *event, const char *key, double value)
void
Adds a double property to the event.
PgsPlayerGameEvent_putDuration(PgsPlayerGameEvent *event, const char *key, int64_t seconds, int32_t nanos)
void
Adds a duration property to the event.
PgsPlayerGameEvent_putLong(PgsPlayerGameEvent *event, const char *key, int64_t value)
void
Adds a long property to the event.
PgsPlayerGameEvent_putString(PgsPlayerGameEvent *event, const char *key, const char *value)
void
Adds a string property to the event.

Typedefs

PgsPlayerGameEvent

struct PgsPlayerGameEvent PgsPlayerGameEvent

An opaque handle to the PlayerGameEvent builder.

Functions

PgsPlayerGameEvent_create

PgsPlayerGameEvent * PgsPlayerGameEvent_create(
  const char *event_name
)

Creates a new PlayerGameEvent builder.

Details
Parameters
event_name
The name of the event.
Returns
A new PgsPlayerGameEvent handle, or NULL on failure. This handle must be released with PgsPlayerGameEvent_destroy().

PgsPlayerGameEvent_destroy

void PgsPlayerGameEvent_destroy(
  PgsPlayerGameEvent *event
)

Destroys a PlayerGameEvent handle.

This function releases all resources associated with the handle.

Details
Parameters
event
The event handle to destroy.

PgsPlayerGameEvent_putBoolean

void PgsPlayerGameEvent_putBoolean(
  PgsPlayerGameEvent *event,
  const char *key,
  bool value
)

Adds a boolean property to the event.

Details
Parameters
event
The event handle.
key
The property key.
value
The property value.

PgsPlayerGameEvent_putDouble

void PgsPlayerGameEvent_putDouble(
  PgsPlayerGameEvent *event,
  const char *key,
  double value
)

Adds a double property to the event.

Details
Parameters
event
The event handle.
key
The property key.
value
The property value.

PgsPlayerGameEvent_putDuration

void PgsPlayerGameEvent_putDuration(
  PgsPlayerGameEvent *event,
  const char *key,
  int64_t seconds,
  int32_t nanos
)

Adds a duration property to the event.

Details
Parameters
event
The event handle.
key
The property key.
seconds
The number of seconds in the duration.
nanos
The number of nanoseconds in the duration (0 to 999,999,999).

PgsPlayerGameEvent_putLong

void PgsPlayerGameEvent_putLong(
  PgsPlayerGameEvent *event,
  const char *key,
  int64_t value
)

Adds a long property to the event.

Details
Parameters
event
The event handle.
key
The property key.
value
The property value.

PgsPlayerGameEvent_putString

void PgsPlayerGameEvent_putString(
  PgsPlayerGameEvent *event,
  const char *key,
  const char *value
)

Adds a string property to the event.

Details
Parameters
event
The event handle.
key
The property key.
value
The property value.