Drag[en]gine Script Module DragonScript
1.23
|
Interface for services supporting user information and management. More...
Classes | |
enum | Errors |
Errors. More... | |
Public Member Functions | |
void | addUserListener (ServiceUserListener listener) |
Add user listener. More... | |
void | getAuthToken (ServiceUserListener listener) |
Request authentification token. More... | |
ServiceUserFeatures | getUserFeatures () |
Features supported by this service. More... | |
void | getUserInfo (ServiceUserListener listener) |
Retrieve user information. More... | |
void | getUserWalletBalance (ServiceUserListener listener) |
Retrieve user wallet balance. More... | |
bool | isUserLoggedIn () |
User is logged in. More... | |
void | loadUserResource (String url, ServiceUserListener listener) |
Load resource asynchronously. More... | |
void | loginUser (ServiceUserCredentials credentials, ServiceUserListener listener) |
Log in user. More... | |
void | logoutUser (ServiceUserListener listener) |
Log out user. More... | |
void | removeUserListener (ServiceUserListener listener) |
Remove user listener. More... | |
void | reportUser (String id, ServiceUserReport report, ServiceUserListener listener) |
Report user. More... | |
Interface for services supporting user information and management.
void Dragengine.Services.User.ServiceUser.addUserListener | ( | ServiceUserListener | listener | ) |
Add user listener.
listener | Listener to add |
Implemented in Dragengine.Services.ServiceModio.
void Dragengine.Services.User.ServiceUser.getAuthToken | ( | ServiceUserListener | listener | ) |
Request authentification token.
Requests an encrypted appplication ticket. If one is cached it is returned. The received ticket is Base64 encoded.
listener | If not null called once in addition to added listeners. |
Implemented in Dragengine.Services.ServiceSteam, Dragengine.Services.ServiceModio, and Dragengine.Services.ServiceEos.
ServiceUserFeatures Dragengine.Services.User.ServiceUser.getUserFeatures | ( | ) |
Features supported by this service.
Implemented in Dragengine.Services.ServiceSteam, Dragengine.Services.ServiceMsgdk, Dragengine.Services.ServiceModio, and Dragengine.Services.ServiceEos.
void Dragengine.Services.User.ServiceUser.getUserInfo | ( | ServiceUserListener | listener | ) |
Retrieve user information.
listener | If not null called once in addition to added listeners. |
Implemented in Dragengine.Services.ServiceSteam, Dragengine.Services.ServiceMsgdk, and Dragengine.Services.ServiceModio.
void Dragengine.Services.User.ServiceUser.getUserWalletBalance | ( | ServiceUserListener | listener | ) |
Retrieve user wallet balance.
Can be used if ServiceUserFeatures.hasMarketplace is true.
listener | If not null called once in addition to added listeners. |
Implemented in Dragengine.Services.ServiceSteam, Dragengine.Services.ServiceMsgdk, Dragengine.Services.ServiceModio, and Dragengine.Services.ServiceEos.
bool Dragengine.Services.User.ServiceUser.isUserLoggedIn | ( | ) |
User is logged in.
Implemented in Dragengine.Services.ServiceModio, and Dragengine.Services.ServiceEos.
void Dragengine.Services.User.ServiceUser.loadUserResource | ( | String | url, |
ServiceUserListener | listener | ||
) |
Load resource asynchronously.
Loaded resources are cached for faster retrieval. Once the resource is cached locally ServiceUserListener.onLoadUserResource() is called with the same URL as used in this function call.
url | URL of image to load. |
listener | If not null called once in addition to added listeners. |
void Dragengine.Services.User.ServiceUser.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.
credentials | Credentials for manual logging in. Use null for automatic logging in. |
listener | If not null called once in addition to added listeners. |
Implemented in Dragengine.Services.ServiceSteam, Dragengine.Services.ServiceMsgdk, Dragengine.Services.ServiceModio, and Dragengine.Services.ServiceEos.
void Dragengine.Services.User.ServiceUser.logoutUser | ( | ServiceUserListener | listener | ) |
Log out user.
Once logging out finished ServiceUserListener.onLogoutUser() is called.
listener | If not null called once in addition to added listeners. |
Implemented in Dragengine.Services.ServiceMsgdk, and Dragengine.Services.ServiceEos.
void Dragengine.Services.User.ServiceUser.removeUserListener | ( | ServiceUserListener | listener | ) |
Remove user listener.
listener | Listener to remove. |
Implemented in Dragengine.Services.ServiceSteam, and Dragengine.Services.ServiceModio.
void Dragengine.Services.User.ServiceUser.reportUser | ( | String | id, |
ServiceUserReport | report, | ||
ServiceUserListener | listener | ||
) |
Report user.
Once finished ServiceUserListener.onReportUser() is called. Can be used if ServiceUserFeatures.canReportUser is true.
id | Identifier of user to report. |
report | Report to submit. |
listener | If not null called once in addition to added listeners. |
Implemented in Dragengine.Services.ServiceEos.