GOG GALAXY SDK Documentation
ITelemetry Class Referenceabstract

The interface for handling telemetry. More...

#include <ITelemetry.h>

Public Member Functions

virtual void AddStringParam (const char *name, const char *value)=0
 Adds a string parameter to be applied next time you call SendTelemetryEvent() or SendAnonymousTelemetryEvent(). More...
 
virtual void AddIntParam (const char *name, int32_t value)=0
 Adds an integer parameter to be applied next time you call SendTelemetryEvent() or SendAnonymousTelemetryEvent(). More...
 
virtual void AddFloatParam (const char *name, double value)=0
 Adds a float parameter to be applied next time you call SendTelemetryEvent() or SendAnonymousTelemetryEvent(). More...
 
virtual void AddBoolParam (const char *name, bool value)=0
 Adds a boolean parameter to be applied next time you call SendTelemetryEvent() or SendAnonymousTelemetryEvent(). More...
 
virtual void AddObjectParam (const char *name)=0
 Adds an object parameter to be applied next time you call SendTelemetryEvent() or SendAnonymousTelemetryEvent(). More...
 
virtual void AddArrayParam (const char *name)=0
 Adds an array parameter to be applied next time you call SendTelemetryEvent() or SendAnonymousTelemetryEvent(). More...
 
virtual void CloseParam ()=0
 Closes an object or array parameter and leaves its scope. More...
 
virtual void ClearParams ()=0
 Clears all parameters that may have been set so far at any level. More...
 
virtual void SetSamplingClass (const char *name)=0
 Sets a sampling class to be applied next time you call SendTelemetryEvent() or SendAnonymousTelemetryEvent(). More...
 
virtual uint32_t SendTelemetryEvent (const char *eventType, ITelemetryEventSendListener *const listener=NULL)=0
 Sends a telemetry event. More...
 
virtual uint32_t SendAnonymousTelemetryEvent (const char *eventType, ITelemetryEventSendListener *const listener=NULL)=0
 Sends an anonymous telemetry event. More...
 
virtual const char * GetVisitID ()=0
 Retrieves current VisitID. More...
 
virtual void GetVisitIDCopy (char *buffer, uint32_t bufferLength)=0
 Copies current VisitID. More...
 
virtual void ResetVisitID ()=0
 Resets current VisitID. More...
 

Detailed Description

The interface for handling telemetry.

Member Function Documentation

◆ AddArrayParam()

virtual void AddArrayParam ( const char *  name)
pure virtual

Adds an array parameter to be applied next time you call SendTelemetryEvent() or SendAnonymousTelemetryEvent().

Subsequent calls to add parameters operate within the newly created array parameter. In order to be able to add parameters on the upper level, you need to call ITelemetry::CloseParam().

Remarks
You can add multiple parameters of different types.
All object parameters must have a unique name.
Parameters
[in]nameThe name of the parameter or NULL when adding a value to an array.

◆ AddBoolParam()

virtual void AddBoolParam ( const char *  name,
bool  value 
)
pure virtual

Adds a boolean parameter to be applied next time you call SendTelemetryEvent() or SendAnonymousTelemetryEvent().

Remarks
You can add multiple parameters of different types.
All object parameters must have a unique name.
Parameters
[in]nameThe name of the parameter or NULL when adding a value to an array.
[in]valueThe value of the parameter.

◆ AddFloatParam()

virtual void AddFloatParam ( const char *  name,
double  value 
)
pure virtual

Adds a float parameter to be applied next time you call SendTelemetryEvent() or SendAnonymousTelemetryEvent().

Remarks
You can add multiple parameters of different types.
All object parameters must have a unique name.
Parameters
[in]nameThe name of the parameter or NULL when adding a value to an array.
[in]valueThe value of the parameter.

◆ AddIntParam()

virtual void AddIntParam ( const char *  name,
int32_t  value 
)
pure virtual

Adds an integer parameter to be applied next time you call SendTelemetryEvent() or SendAnonymousTelemetryEvent().

Remarks
You can add multiple parameters of different types.
All object parameters must have a unique name.
Parameters
[in]nameThe name of the parameter or NULL when adding a value to an array.
[in]valueThe value of the parameter.

◆ AddObjectParam()

virtual void AddObjectParam ( const char *  name)
pure virtual

Adds an object parameter to be applied next time you call SendTelemetryEvent() or SendAnonymousTelemetryEvent().

Subsequent calls to add parameters operate within the newly created object parameter. In order to be able to add parameters on the upper level, you need to call ITelemetry::CloseParam().

Remarks
You can add multiple parameters of different types.
All object parameters must have a unique name.
Parameters
[in]nameThe name of the parameter or NULL when adding a value to an array.

◆ AddStringParam()

virtual void AddStringParam ( const char *  name,
const char *  value 
)
pure virtual

Adds a string parameter to be applied next time you call SendTelemetryEvent() or SendAnonymousTelemetryEvent().

Remarks
You can add multiple parameters of different types.
All object parameters must have a unique name.
Parameters
[in]nameThe name of the parameter or NULL when adding a value to an array.
[in]valueThe value of the parameter.

◆ ClearParams()

virtual void ClearParams ( )
pure virtual

Clears all parameters that may have been set so far at any level.

This allows for safely starting to build an event from scratch.

◆ CloseParam()

virtual void CloseParam ( )
pure virtual

Closes an object or array parameter and leaves its scope.

This allows for adding parameters to the upper scope.

Remarks
Once closed, an object or array cannot be extended with new parameters.
Has no effect on simple parameters as well as on the event object itself.

◆ GetVisitID()

virtual const char* GetVisitID ( )
pure virtual

Retrieves current VisitID.

Visit ID is used to link subsequent telemetry events that corresponds to the same action (e.x. game session).

Returns
Visit ID.

◆ GetVisitIDCopy()

virtual void GetVisitIDCopy ( char *  buffer,
uint32_t  bufferLength 
)
pure virtual

Copies current VisitID.

Visit ID is used to link subsequent telemetry events that corresponds to the same action (e.x. game session).

Parameters
[in,out]bufferThe output buffer.
[in]bufferLengthThe size of the output buffer.

◆ ResetVisitID()

virtual void ResetVisitID ( )
pure virtual

Resets current VisitID.

Visit ID is used to link subsequent telemetry events that corresponds to the same action (e.x. game session).

◆ SendAnonymousTelemetryEvent()

virtual uint32_t SendAnonymousTelemetryEvent ( const char *  eventType,
ITelemetryEventSendListener *const  listener = NULL 
)
pure virtual

Sends an anonymous telemetry event.

This call is asynchronous. Responses come to the ITelemetryEventSendListener.

Remarks
After each call to SendTelemetryEvent() or SendAnonymousTelemetryEvent() all parameters are cleared automatically as if you called ClearParams().
Internal event index returned by this method should only be used to identify sent events in callbacks that come to the ITelemetryEventSendListener.
Parameters
[in]eventTypeThe type of the event.
[in]listenerThe listener for specific operation.
Returns
Internal event index.

◆ SendTelemetryEvent()

virtual uint32_t SendTelemetryEvent ( const char *  eventType,
ITelemetryEventSendListener *const  listener = NULL 
)
pure virtual

Sends a telemetry event.

This call is asynchronous. Responses come to the ITelemetryEventSendListener.

Remarks
After each call to SendTelemetryEvent() or SendAnonymousTelemetryEvent() all parameters are cleared automatically as if you called ClearParams().
Internal event index returned by this method should only be used to identify sent events in callbacks that come to the ITelemetryEventSendListener.
Parameters
[in]eventTypeThe type of the event.
[in]listenerThe listener for specific operation.
Returns
Internal event index.

◆ SetSamplingClass()

virtual void SetSamplingClass ( const char *  name)
pure virtual

Sets a sampling class to be applied next time you call SendTelemetryEvent() or SendAnonymousTelemetryEvent().

Parameters
[in]nameThe name of the sampling class.