ICELib  1
Classes
iceGameSession
ICECore - IndieCity Extras integration interfaces

interface for sending messages to online services More...

Classes

class  iceGameSession
 opaque type for manipulating the session with More...

Enumerations

enum  iceGameSessionReasonCode
enum  iceGameSessionEvent
enum  iceLicenseState

Reference Counting

void iceGameSession::iceGameSessionAddReference (iceGameSession *pGameSession)
 increment the ref count of the game session
void iceGameSession::iceGameSessionRelease (iceGameSession *pGameSession)
 free up the game session

Creation and Initialisation

iceGameSessioniceGameSession::iceGameSessionCreate ()
 Set the credentials of the game connecting to IndieCity.
IceCoreResult iceGameSession::iceGameSessionSetUserAccessToken (iceGameSession *pGameSession, iceServiceId serviceId, const char *accessToken, const char *tokenSecret)
 set the user access token for an application
IceCoreResult iceGameSession::iceGameSessionSetGameCredentials (iceGameSession *pGameSession, iceServiceId serviceId, const char *gameId, const char *secret)
 //set the games id and secret for a service

Session Starting

IceCoreResult iceGameSession::iceGameSessionRequestStart (iceGameSession *pSession)
 Attempt to connect to IndieCity server.
IceCoreResult iceGameSession::iceGameSessionRequestEnd (iceGameSession *pSession)
 Disconnect from IndieCity server.
IceCoreResult iceGameSession::iceGameSessionUpdate (iceGameSession *pSession)

Properties

iceEventiceGameSession::iceGameSessionGetEvent (iceGameSession *pSession, iceGameSessionEvent eventId)
 get an event interface pointer
bool iceGameSession::iceGameSessionIsSessionStarted (const iceGameSession *pSession)
 test if session is started
iceLicenseState iceGameSession::iceGameSessionGetUserLicenseState (const iceGameSession *pSession)
 Get the license state.

Detailed Description

interface for sending messages to online services


Function Documentation

void iceGameSessionAddReference ( iceGameSession pGameSession)

increment the ref count of the game session

Parameters:
[in]pSessionpointer to session interface

Set the credentials of the game connecting to IndieCity.

Parameters:
[in]pSessionpointer to session interface Store the gameId and secret. The gameId is UUID for the game. The secret is a string that is used to sign requests to the server and helps provide confidence that the game is the game it says it is. It should only be known by the developer and IndieCity server.
iceEvent * iceGameSessionGetEvent ( iceGameSession pSession,
iceGameSessionEvent  eventId 
)

get an event interface pointer

Parameters:
[in]pSessionpointer to session interface
iceLicenseState iceGameSessionGetUserLicenseState ( const iceGameSession pSession)

Get the license state.

Parameters:
[in]pSessionpointer to session interface
bool iceGameSessionIsSessionStarted ( const iceGameSession pSession)

test if session is started

Parameters:
[in]pSessionpointer to session interface
void iceGameSessionRelease ( iceGameSession pGameSession)

free up the game session

Parameters:
[in]pSessionpointer to session interface
IceCoreResult iceGameSessionRequestEnd ( iceGameSession pSession)

Disconnect from IndieCity server.

Parameters:
[in]pSessionpointer to session interface Inform the IndieCity Server that the user has finished playing the game
IceCoreResult iceGameSessionRequestStart ( iceGameSession pSession)

Attempt to connect to IndieCity server.

Parameters:
[in]pSessionpointer to session interface Attempt to connect to IndieCity server and establish user is now playing the game. Can fail if no connection can be made or if user is already logged into IndieCity from a different machine. UserToken is a string.")
IceCoreResult iceGameSessionSetGameCredentials ( iceGameSession pGameSession,
iceServiceId  serviceId,
const char *  gameId,
const char *  secret 
)

//set the games id and secret for a service

Parameters:
[in]pSessionpointer to session interface The access token is equivalent to the users credentials for that game. allows game to login to server with that user's access rights Also essentially specifies the user to login.
IceCoreResult iceGameSessionSetUserAccessToken ( iceGameSession pGameSession,
iceServiceId  serviceId,
const char *  accessToken,
const char *  tokenSecret 
)

set the user access token for an application

Parameters:
[in]pSessionpointer to session interface The access token is equivalent to the users credentials for that game. allows game to login to server with that user's access rights Also essentially specifies the user to login. Setting this should fail if a session is already started
IceCoreResult iceGameSessionUpdate ( iceGameSession pSession)

brief send requests and get server events

Parameters:
[in]pSessionpointer to session interface

Send all batched requests from modules to Server and handle response. Even if no requests are present UpdateSession will still send a KeepAlive message to server to keep the session alive. This function needs to be called more often than timeout period (approx 30 seconds) or the session will end.

 All Classes Functions