PC Stable Documentation
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Loading...
Searching...
No Matches
BackendApi Class Reference

Private Member Functions

private void BackendApi ()
 
private void ~BackendApi ()
 
proto native bool Initiate ()
 Initiate backend - request processing.
 
proto native bool Shutdown ()
 Shutdown backend - request processing.
 
proto native bool IsDisconnected ()
 Backend offline - authentication may be initiated.
 
proto native bool IsRuntime ()
 Backend fully working and initialized.
 
proto native bool IsBusy ()
 Backend is busy - authentication in process.
 
string GetErrorCode (int code)
 Error code to string.
 
void OnCannotInitiate (int code)
 Called when initiate cannot be called.
 
void OnCannotShutdown (int code)
 Called when shutdown cannot be proceeded.
 
void OnSuccess (string step)
 Called when step was successfully proceeded.
 
void OnFail (string step)
 Called when step failed.
 
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 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 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 ()
 Invoke credentials update (authenticate with new name+password)
 

Constructor & Destructor Documentation

◆ BackendApi()

private void BackendApi ( )
inlineprivate

◆ ~BackendApi()

private void ~BackendApi ( )
inlineprivate

Member Function Documentation

◆ FeedbackMessage()

proto native void FeedbackMessage ( BackendCallback  cb,
JsonApiStruct  dataObject,
string  message 
)
private

Send feedback message and/ or script object with whatever data on it (additionally it is possible to handle callback as well)

Parameters
cbIs script callback where you will recieve result/ error or even data when request finsihes
dataIs optional callback when request uses or response return Json data and you want to work with object
messageIs custom

◆ GetCredentialsItem()

proto native string GetCredentialsItem ( EBackendCredentials  item)
private

Get credentials value per item.

Parameters
itemIs type of EBackendCredentials parameter you want to read

◆ GetErrorCode()

string GetErrorCode ( int  code)
inlineprivate

Error code to string.

Referenced by OnCannotInitiate(), and OnCannotShutdown().

◆ Initiate()

proto native bool Initiate ( )
private

Initiate backend - request processing.

◆ IsBusy()

proto native bool IsBusy ( )
private

Backend is busy - authentication in process.

◆ IsDisconnected()

proto native bool IsDisconnected ( )
private

Backend offline - authentication may be initiated.

◆ IsRuntime()

proto native bool IsRuntime ( )
private

Backend fully working and initialized.

◆ OnCannotInitiate()

void OnCannotInitiate ( int  code)
inlineprivate

Called when initiate cannot be called.

References GetErrorCode(), and Print().

◆ OnCannotShutdown()

void OnCannotShutdown ( int  code)
inlineprivate

Called when shutdown cannot be proceeded.

References GetErrorCode(), and Print().

◆ OnFail()

void OnFail ( string  step)
inlineprivate

Called when step failed.

References Print().

◆ OnSuccess()

void OnSuccess ( string  step)
inlineprivate

Called when step was successfully proceeded.

References Print().

◆ PlayerRequest()

proto native void PlayerRequest ( int  request,
BackendCallback  cb,
JsonApiStruct  dataObject,
int  iPlayerId 
)
private

Ask player request with callback result from controller (Lobby)

Parameters
requestIs type of request, which is EBackendRequest
cbIs script callback where you will recieve result/ error or even data when request finsihes
dataIs optional callback when request uses or response return Json data and you want to work with object
iPlayerIdIs Player Id used on player identity

◆ Request()

proto native void Request ( int  request,
BackendCallback  cb,
JsonApiStruct  dataObject 
)
private

Ask specific request with callback result.

Parameters
requestIs type of request, which is EBackendRequest
cbIs script callback where you will recieve result/ error or even data when request finsihes
dataIs optional callback when request uses or response return Json data and you want to work with object

◆ SetCredentialsItem()

proto native void SetCredentialsItem ( EBackendCredentials  item,
string  str 
)
private

Set credentials value per item.

Parameters
itemIs type of EBackendCredentials parameter you want to set
strIs value itself

◆ Shutdown()

proto native bool Shutdown ( )
private

Shutdown backend - request processing.

◆ VerifyCredentials()

proto native void VerifyCredentials ( )
private

Invoke credentials update (authenticate with new name+password)


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