Enfusion Script API
|
Public Member Functions | |
void | BackendApi () |
void | ~BackendApi () |
proto native void | SetSessionCallback (DSSessionCallback callback) |
Set session callback to recieve all session related events. | |
proto native WorkshopApi | GetWorkshop () |
Get Workshop Api. | |
proto native WorldSaveApi | GetWorldSaveApi () |
proto native ClientLobbyApi | GetClientLobby () |
Get Lobby Api. | |
proto native int | GetDSBoxcount () |
Get active count of server instances. | |
proto native DSBox | GetDSBox (int iIndex) |
Get DS box instance. | |
proto native SessionStorage | GetStorage () |
Get Session Storage. | |
proto native DSSession | GetDSSession () |
Get DS server instance. | |
proto native int | GetStatusCount () |
Return count of services. | |
proto native ServiceStatusItem | GetStatusItem (int iIndex) |
Return specific status object. | |
proto native ServiceStatusItem | GetMainStatus () |
Return Main status object. | |
proto native int | GetNewsCount () |
Return count of News messages. | |
proto native NewsFeedItem | GetNewsItem (int iIndex) |
Return specific News message. | |
proto native int | GetNotifyCount () |
Return count of Notification messages. | |
proto native NewsFeedItem | GetNotifyItem (int iIndex) |
Return specific Notification message. | |
proto native string | GetLinkItem (string linkName) |
Return specific Link by it's name. | |
proto native bool | Shutdown () |
Shutdown backend - request processing. | |
proto native bool | IsAuthenticated () |
Client is Authenticated - relate requests may procceed. | |
proto native bool | IsAuthInProgress () |
Client is busy - Authentication in process. | |
proto native bool | IsRunning () |
True if HTTP communication enabled (initialization, runtime or shutdown may be pending at same time) | |
proto native bool | IsInitializing () |
True if HTTP communication is being activated (initializing yet) | |
proto native bool | IsActive () |
True if HTTP communication active (initialized) | |
proto native void | RefreshCommStatus () |
Refresh status - ping services to obtain response time. | |
proto native int | GetCommTestStatus () |
Get comm test status, 0==not executed, 1==running, 2==finished, 3==failed. | |
proto native float | GetCommResponseTime () |
Read service response time in milliseconds, call RefreshCommStatus() to update results. | |
proto native float | GetCommTimeLastSuccess () |
Get time in seconds since last successful request (limit is 1hr - does not count more) | |
proto native float | GetCommTimeLastFail () |
Get time in seconds since last successful request (limit is 1hr - does not count more) | |
proto native void | Unlink (BackendCallback callback) |
Unlink the bi-account and clear credentials. | |
string | GetErrorCode (int code) |
Error code to string. | |
void | OnPlatformActive (int code) |
Called when platform ready and provided all data necessary to connect online. | |
void | OnPlatformMissing (int code) |
Called when platform is not ready - perhaps user is not signed-in. | |
void | OnCannotInitiate (int code) |
Called when initiate cannot be called. | |
void | OnCannotShutdown (int code) |
Called when shutdown cannot be proceeded. | |
void | OnCannotAuth (int code) |
Called when authentication failed. | |
void | OnSuccess (string step) |
Called when step was successfully proceeded. | |
void | OnFail (string step) |
Called when step failed. | |
string | GetPlayerUID (int iPlayerId) |
proto native string | GetPlayerIdentityId (int iPlayerId) |
Get Player Identity ID by Player ID. | |
proto native string | GetLocalIdentityId () |
Get Local Identity ID on client. | |
proto native bool | IsLocalPlatformAssigned () |
Return true if local platform data are to be used for authentication/ persistency of client (meaningless on server) | |
proto native void | Request (int request, BackendCallback cb, JsonApiStruct dataObject) |
Ask specific request with callback result. | |
proto native void | PlayerRequest (int request, BackendCallback cb, JsonApiStruct dataObject, int iPlayerId) |
Ask player request with callback result from controller (Lobby) | |
proto native void | PlayerData (JsonApiStruct dataObject, int iPlayerId) |
Expand player data upon defined structure, this is Server-Side only! | |
proto native void | SettingsData (string sFileName, JsonApiStruct dataObject) |
Expand settings data upon defined structure, this is Server-Side only! | |
proto native void | FeedbackMessage (BackendCallback cb, JsonApiStruct dataObject, string message) |
Send feedback message and/ or script object with whatever data on it (additionally it is possible to handle callback as well) | |
proto native void | FeedbackImage (BackendCallback cb, JsonApiStruct dataObject, string fileName) |
Send feedback image and/ or script object with whatever data on it (additionally it is possible to handle callback as well) | |
proto native void | SetCredentialsItem (EBackendCredentials item, string str) |
Set credentials value per item. | |
proto native string | GetCredentialsItem (EBackendCredentials item) |
Get credentials value per item. | |
proto native void | VerifyCredentials (BackendCallback callback, bool storeCredentials) |
Invoke credentials update (authenticate with new name+password) | |
proto native int | RemainingAccountLockedTime () |
The bi-account remains locked for X seconds. | |
proto native bool | IsBIAccountLinked () |
Return true if BI Account is linked to local Identity. | |
proto native owned string | GetBackendEnv () |
Get target backend environment. | |
proto native bool | GetRunningDSConfig (DSConfig config) |
proto native bool | LoadDSConfig (DSConfig config, string fileName) |
proto native bool | SaveDSConfig (DSConfig config, string fileName) |
proto native void | SetDefaultIpPort (DSConfig config) |
proto native int | GetAvailableConfigs (out notnull array< string > configs) |
proto native int | GetAvailableConfigPaths (out notnull array< string > configs) |
proto native ServerConfigApi | GetServerConfigApi () |
proto native BanServiceApi | GetBanServiceApi () |
Get Ban Service API. | |
proto native bool | IsListedServerAdmin (int iPlayerId) |
Check if player is in list of admins defined in server config. | |
proto native bool | IsServerOwner (int iPlayerId) |
Check if player is server owner defined by ownerToken. | |
proto native void | NewSession () |
Called when new server or client game session is started. | |
proto native void | SetDebugHandling (EBackendRequest eRequest, EBackendDebugHandling eHandlingType) |
Debugging API for internal builds. | |
void BackendApi.BackendApi | ( | ) |
void BackendApi.~BackendApi | ( | ) |
proto native void BackendApi.FeedbackImage | ( | BackendCallback | cb, |
JsonApiStruct | dataObject, | ||
string | fileName | ||
) |
Send feedback image and/ or script object with whatever data on it (additionally it is possible to handle callback as well)
cb | Is script callback where you will recieve result/ error or even data when request finsihes |
dataObject | Is optional destination when request uses or response return Json data and you want to work with object |
fileName | Is path to image you want to send |
proto native void BackendApi.FeedbackMessage | ( | BackendCallback | cb, |
JsonApiStruct | dataObject, | ||
string | message | ||
) |
Send feedback message and/ or script object with whatever data on it (additionally it is possible to handle callback as well)
cb | Is script callback where you will recieve result/ error or even data when request finsihes |
dataObject | Is optional destination when request uses or response return Json data and you want to work with object |
message | Is custom |
proto native owned string BackendApi.GetBackendEnv | ( | ) |
Get target backend environment.
proto native BanServiceApi BackendApi.GetBanServiceApi | ( | ) |
Get Ban Service API.
proto native ClientLobbyApi BackendApi.GetClientLobby | ( | ) |
Get Lobby Api.
proto native float BackendApi.GetCommResponseTime | ( | ) |
Read service response time in milliseconds, call RefreshCommStatus() to update results.
proto native int BackendApi.GetCommTestStatus | ( | ) |
Get comm test status, 0==not executed, 1==running, 2==finished, 3==failed.
proto native float BackendApi.GetCommTimeLastFail | ( | ) |
Get time in seconds since last successful request (limit is 1hr - does not count more)
proto native float BackendApi.GetCommTimeLastSuccess | ( | ) |
Get time in seconds since last successful request (limit is 1hr - does not count more)
proto native string BackendApi.GetCredentialsItem | ( | EBackendCredentials | item | ) |
Get credentials value per item.
item | Is type of EBackendCredentials parameter you want to read |
proto native int BackendApi.GetDSBoxcount | ( | ) |
Get active count of server instances.
proto native DSSession BackendApi.GetDSSession | ( | ) |
Get DS server instance.
proto native string BackendApi.GetLocalIdentityId | ( | ) |
Get Local Identity ID on client.
proto native ServiceStatusItem BackendApi.GetMainStatus | ( | ) |
Return Main status object.
proto native int BackendApi.GetNewsCount | ( | ) |
Return count of News messages.
proto native NewsFeedItem BackendApi.GetNewsItem | ( | int | iIndex | ) |
Return specific News message.
proto native int BackendApi.GetNotifyCount | ( | ) |
Return count of Notification messages.
proto native NewsFeedItem BackendApi.GetNotifyItem | ( | int | iIndex | ) |
Return specific Notification message.
Get Player Identity ID by Player ID.
iPlayerId | Is id of player in session |
proto native ServerConfigApi BackendApi.GetServerConfigApi | ( | ) |
proto native int BackendApi.GetStatusCount | ( | ) |
Return count of services.
proto native ServiceStatusItem BackendApi.GetStatusItem | ( | int | iIndex | ) |
Return specific status object.
proto native SessionStorage BackendApi.GetStorage | ( | ) |
Get Session Storage.
proto native WorkshopApi BackendApi.GetWorkshop | ( | ) |
Get Workshop Api.
proto native WorldSaveApi BackendApi.GetWorldSaveApi | ( | ) |
proto native bool BackendApi.IsActive | ( | ) |
True if HTTP communication active (initialized)
proto native bool BackendApi.IsAuthenticated | ( | ) |
Client is Authenticated - relate requests may procceed.
proto native bool BackendApi.IsAuthInProgress | ( | ) |
Client is busy - Authentication in process.
proto native bool BackendApi.IsBIAccountLinked | ( | ) |
Return true if BI Account is linked to local Identity.
proto native bool BackendApi.IsInitializing | ( | ) |
True if HTTP communication is being activated (initializing yet)
Check if player is in list of admins defined in server config.
iPlayerId | is Id of Player which is being verified |
proto native bool BackendApi.IsLocalPlatformAssigned | ( | ) |
Return true if local platform data are to be used for authentication/ persistency of client (meaningless on server)
proto native bool BackendApi.IsRunning | ( | ) |
True if HTTP communication enabled (initialization, runtime or shutdown may be pending at same time)
Check if player is server owner defined by ownerToken.
iPlayerId | is Id of Player which is being verified |
proto native void BackendApi.NewSession | ( | ) |
Called when new server or client game session is started.
void BackendApi.OnCannotAuth | ( | int | code | ) |
Called when authentication failed.
void BackendApi.OnCannotInitiate | ( | int | code | ) |
Called when initiate cannot be called.
void BackendApi.OnCannotShutdown | ( | int | code | ) |
Called when shutdown cannot be proceeded.
void BackendApi.OnFail | ( | string | step | ) |
Called when step failed.
void BackendApi.OnPlatformActive | ( | int | code | ) |
Called when platform ready and provided all data necessary to connect online.
void BackendApi.OnPlatformMissing | ( | int | code | ) |
Called when platform is not ready - perhaps user is not signed-in.
void BackendApi.OnSuccess | ( | string | step | ) |
Called when step was successfully proceeded.
proto native void BackendApi.PlayerData | ( | JsonApiStruct | dataObject, |
int | iPlayerId | ||
) |
Expand player data upon defined structure, this is Server-Side only!
dataObject | Is optional destination when request uses or response return Json data and you want to work with object |
iPlayerId | Is Player Id used on player identity |
proto native void BackendApi.PlayerRequest | ( | int | request, |
BackendCallback | cb, | ||
JsonApiStruct | dataObject, | ||
int | iPlayerId | ||
) |
Ask player request with callback result from controller (Lobby)
request | Is type of request, which is EBackendRequest |
cb | Is script callback where you will recieve result/ error or even data when request finsihes |
dataObject | Is optional destination when request uses or response return Json data and you want to work with object |
iPlayerId | Is Player Id used on player identity |
proto native void BackendApi.RefreshCommStatus | ( | ) |
Refresh status - ping services to obtain response time.
proto native int BackendApi.RemainingAccountLockedTime | ( | ) |
The bi-account remains locked for X seconds.
proto native void BackendApi.Request | ( | int | request, |
BackendCallback | cb, | ||
JsonApiStruct | dataObject | ||
) |
Ask specific request with callback result.
request | Is type of request, which is EBackendRequest |
cb | Is script callback where you will recieve result/ error or even data when request finsihes |
dataObject | Is optional destination when request uses or response return Json data and you want to work with object |
proto native void BackendApi.SetCredentialsItem | ( | EBackendCredentials | item, |
string | str | ||
) |
Set credentials value per item.
item | Is type of EBackendCredentials parameter you want to set |
str | Is value itself |
proto native void BackendApi.SetDebugHandling | ( | EBackendRequest | eRequest, |
EBackendDebugHandling | eHandlingType | ||
) |
Debugging API for internal builds.
proto native void BackendApi.SetDefaultIpPort | ( | DSConfig | config | ) |
proto native void BackendApi.SetSessionCallback | ( | DSSessionCallback | callback | ) |
Set session callback to recieve all session related events.
callback | - check all events and respective description upon object |
proto native void BackendApi.SettingsData | ( | string | sFileName, |
JsonApiStruct | dataObject | ||
) |
Expand settings data upon defined structure, this is Server-Side only!
sFileName | Is name of settings file you want to access, remember - it must exist! |
dataObject | Is optional destination when request uses or response return Json data and you want to work with object |
proto native bool BackendApi.Shutdown | ( | ) |
Shutdown backend - request processing.
proto native void BackendApi.Unlink | ( | BackendCallback | callback | ) |
Unlink the bi-account and clear credentials.
proto native void BackendApi.VerifyCredentials | ( | BackendCallback | callback, |
bool | storeCredentials | ||
) |
Invoke credentials update (authenticate with new name+password)