Drag[en]gine Script Module DragonScript  1.23
Dragengine.Services.ServiceEos Class Reference

Service providing access to EOS SDK functionality if supported. More...

Inheritance diagram for Dragengine.Services.ServiceEos:
Dragengine.Services.Stats.ServiceStats Dragengine.Services.User.ServiceUser Dragengine.ServiceListener

Classes

class  InitParameters
 Service initialization parameters. More...
 

Public Member Functions

void addStatListener (ServiceStatsListener listener)
 Add stats and achievements listener. More...
 
void dispose ()
 Dispose of EOS SDK service. More...
 
void getAuthToken (ServiceUserListener listener)
 Request authentification token. More...
 
BaseServiceConversions getConversions ()
 Conversion helper. More...
 
void getStatsAndAchievements (Set stats, Set achievements, ServiceStatsListener listener)
 Get stats and achievements. More...
 
ServiceUserFeatures getUserFeatures ()
 Features supported by this service. More...
 
void getUserWalletBalance (ServiceUserListener listener)
 Retrieve user wallet balance. More...
 
Boolean isInitialized ()
 Determines if service is initialized and ready to be used. More...
 
bool isUserLoggedIn ()
 User is logged in. More...
 
void loginUser (ServiceUserCredentials credentials, ServiceUserListener listener)
 Log in user. More...
 
void logoutUser (ServiceUserListener listener)
 Log out user. More...
 
ServiceEos new (InitParameters parameters, ServiceInitListener listener)
 Create service ServiceEosSdk. More...
 
void removeStatsListener (ServiceStatsListener listener)
 Remove stats and achievements listener. More...
 
void reportUser (String id, ServiceUserReport report, ServiceUserListener listener)
 Report user. More...
 
void requestResponse (Service service, UniqueID id, ServiceObject response, bool finished)
 Response received for request. More...
 
- Public Member Functions inherited from Dragengine.Services.Stats.ServiceStats
void resetAllStats (bool resetAchievements)
 Reset all stats on service provider. More...
 
void setStatsAndAchievements (Dictionary stats, Dictionary achievements, ServiceStatsListener listener)
 Set stats and achievements. More...
 
- Public Member Functions inherited from Dragengine.Services.User.ServiceUser
void addUserListener (ServiceUserListener listener)
 Add user listener. More...
 
void getUserInfo (ServiceUserListener listener)
 Retrieve user information. More...
 
void loadUserResource (String url, ServiceUserListener listener)
 Load resource asynchronously. More...
 
void removeUserListener (ServiceUserListener listener)
 Remove user listener. More...
 
- Public Member Functions inherited from Dragengine.ServiceListener
void eventReceived (Service service, ServiceObject event)
 Service event received for example notifications. More...
 
void requestFailed (Service service, UniqueID id, ServiceObject error)
 Request failed. More...
 

Static Public Member Functions

static bool isServiceSupported ()
 Checks if EOS SDK service is supported. More...
 

Public Attributes

BaseServiceConversions pConversions
 
ServiceInitListener pInitListener
 
InitParameters pInitParameters
 
Boolean pIsInitialized
 
Dictionary pOnceListeners
 
Service pService
 
SafeArray pStatsListeners
 

Static Public Attributes

static final String authProviderId = "epic"
 Authentification provider identifier. More...
 

Detailed Description

Service providing access to EOS SDK functionality if supported.

Version
1.23

Provides access to these functionalities:

  • Stats/Achievements
  • User

Member Function Documentation

◆ addStatListener()

void Dragengine.Services.ServiceEos.addStatListener ( ServiceStatsListener  listener)

Add stats and achievements listener.

Parameters
listenerListener to add

Implements Dragengine.Services.Stats.ServiceStats.

◆ dispose()

void Dragengine.Services.ServiceEos.dispose ( )

Dispose of EOS SDK service.

◆ getAuthToken()

void Dragengine.Services.ServiceEos.getAuthToken ( ServiceUserListener  listener)

Request authentification token.

Requests an encrypted appplication ticket. If one is cached it is returned. The received ticket is Base64 encoded.

Parameters
listenerIf not null called once in addition to added listeners.

Implements Dragengine.Services.User.ServiceUser.

◆ getConversions()

BaseServiceConversions Dragengine.Services.ServiceEos.getConversions ( )

Conversion helper.

◆ getStatsAndAchievements()

void Dragengine.Services.ServiceEos.getStatsAndAchievements ( Set  stats,
Set  achievements,
ServiceStatsListener  listener 
)

Get stats and achievements.

Requests from the service provider the set of stats and achievements with the matching api names. Once retrieved calls ServiceStatsListener::onGetStats().

Parameters
statsStats.
achievementsAchievements.
listenerIf not null called once in addition to added listeners.

Implements Dragengine.Services.Stats.ServiceStats.

◆ getUserFeatures()

ServiceUserFeatures Dragengine.Services.ServiceEos.getUserFeatures ( )

Features supported by this service.

Implements Dragengine.Services.User.ServiceUser.

◆ getUserWalletBalance()

void Dragengine.Services.ServiceEos.getUserWalletBalance ( ServiceUserListener  listener)

Retrieve user wallet balance.

Can be used if ServiceUserFeatures::hasMarketplace is true.

Parameters
listenerIf not null called once in addition to added listeners.

Implements Dragengine.Services.User.ServiceUser.

◆ isInitialized()

Boolean Dragengine.Services.ServiceEos.isInitialized ( )

Determines if service is initialized and ready to be used.

If null is returned the service is still initializing. If returned object has true value the service is initialized and ready to be used. If returned object has false value the service failed to initialized and has to be disposed.

◆ isServiceSupported()

static bool Dragengine.Services.ServiceEos.isServiceSupported ( )
static

Checks if EOS SDK service is supported.

Service is reported supported if the EOS SDK Service Module is present.

◆ isUserLoggedIn()

bool Dragengine.Services.ServiceEos.isUserLoggedIn ( )

User is logged in.

Implements Dragengine.Services.User.ServiceUser.

◆ loginUser()

void Dragengine.Services.ServiceEos.loginUser ( ServiceUserCredentials  credentials,
ServiceUserListener  listener 
)

Log in user.

User can be logged in automatically or manually.

Automatic logging in is used for example Steam where the user has to log into the platform before the game can be launched. Automatic logging in can trigger platform specific log in procedure and terms acknowledge process. Typically this has to be done once and then logging in is automatic.

Manual logging in requires the game to obtain the credentials from the user. This can be useful for developers to not enter credentials each time they launch the game. Production games usually do not require manual logging in unless the service in question does not support automatic logging in.

Manual logging in is also possible using authentification tokens from other services. For example a user can log into certain services using his Steam user account. See ServiceUserFeatures::canAuthProviderLogin obtained from getUserFeatures() to know which other services are supported for manual login using auth tokens.

Once logging in finished ServiceUserListener::onLoginUser() is called.

Parameters
credentialsCredentials for manual logging in. Use null for automatic logging in.
listenerIf not null called once in addition to added listeners.

Implements Dragengine.Services.User.ServiceUser.

◆ logoutUser()

void Dragengine.Services.ServiceEos.logoutUser ( ServiceUserListener  listener)

Log out user.

Once logging out finished ServiceUserListener::onLogoutUser() is called.

Parameters
listenerIf not null called once in addition to added listeners.

Implements Dragengine.Services.User.ServiceUser.

◆ new()

ServiceEos Dragengine.Services.ServiceEos.new ( InitParameters  parameters,
ServiceInitListener  listener 
)

Create service ServiceEosSdk.

The service is asynchronously initialized. Once initialization finished the provided listener is called with success or failure outcome. If the outcome is success the service can be used. If the outcome is failure the service can not be used and should be disposed.

Parameters
parametersInit parameters.
listenerListener called if initialization finished. Can be null.
Exceptions
EInvalidParamEOS SDK service module is not present.
EInvalidActionEOS SDK can not be initialized.

◆ removeStatsListener()

void Dragengine.Services.ServiceEos.removeStatsListener ( ServiceStatsListener  listener)

Remove stats and achievements listener.

Parameters
listenerListener to remove.

Implements Dragengine.Services.Stats.ServiceStats.

◆ reportUser()

void Dragengine.Services.ServiceEos.reportUser ( String  id,
ServiceUserReport  report,
ServiceUserListener  listener 
)

Report user.

Once finished ServiceUserListener::onReportUser() is called. Can be used if ServiceUserFeatures::canReportUser is true.

Parameters
idIdentifier of user to report.
reportReport to submit.
listenerIf not null called once in addition to added listeners.

Implements Dragengine.Services.User.ServiceUser.

◆ requestResponse()

void Dragengine.Services.ServiceEos.requestResponse ( Service  service,
UniqueID  id,
ServiceObject  response,
bool  finished 
)

Response received for request.

Parameters
serviceService receiving the response.
idIdentifier of request this response belongs to.
responseResponse data.
finishedTrue if the request finished or false if more responses will be received.

Implements Dragengine.ServiceListener.

Member Data Documentation

◆ authProviderId

final String Dragengine.Services.ServiceEos.authProviderId = "epic"
static

Authentification provider identifier.

◆ pConversions

BaseServiceConversions Dragengine.Services.ServiceEos.pConversions

◆ pInitListener

ServiceInitListener Dragengine.Services.ServiceEos.pInitListener

◆ pInitParameters

InitParameters Dragengine.Services.ServiceEos.pInitParameters

◆ pIsInitialized

Boolean Dragengine.Services.ServiceEos.pIsInitialized

◆ pOnceListeners

Dictionary Dragengine.Services.ServiceEos.pOnceListeners

◆ pService

Service Dragengine.Services.ServiceEos.pService

◆ pStatsListeners

SafeArray Dragengine.Services.ServiceEos.pStatsListeners

The documentation for this class was generated from the following file: