DayZ 1.26
DayZ Explorer by KGB
Загрузка...
Поиск...
Не найдено
Класс BackendApi

Закрытые члены

void BackendApi ()
 
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)
 

Подробное описание

Конструктор(ы)

◆ BackendApi()

void BackendApi ( )
inlineprivate
131{}

◆ ~BackendApi()

void ~BackendApi ( )
inlineprivate
132{}

Методы

◆ 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)

Аргументы
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.

Аргументы
itemIs type of EBackendCredentials parameter you want to read

◆ GetErrorCode()

string GetErrorCode ( int code)
inlineprivate

Error code to string.

160 {
161 string result;
162
163 if ( code == EBackendError.EBERR_OK )
164 result = "OK";
165 else if ( code == EBackendError.EBERR_UNKNOWN )
166 result = "Offline";
167 else if ( code == EBackendError.EBERR_DISABLED )
168 result = "Communication Disabled";
169 else if ( code == EBackendError.EBERR_INVALID_STATE )
170 result = "Cannot be called from current state";
171 else if ( code == EBackendError.EBERR_BUSY )
172 result = "Busy processing requests";
173 else if ( code == EBackendError.EBERR_ALREADY_OFFLINE )
174 result = "Already disconnected";
175 else if ( code == EBackendError.EBERR_ALREADY_ONLINE )
176 result = "Already connected";
177 else if ( code == EBackendError.EBERR_LOGIN_FAILED )
178 result = "Failed to logon";
179 else if ( code == EBackendError.EBERR_AUTH_FAILED )
180 result = "Failed to Authenticate";
181 else
182 result = "*";
183
184 return result;
185 }
EBackendError
Backend error.
Definition BackendApi.c:7
Definition EntityAI.c:95

Используется в OnCannotInitiate() и 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.

191 {
192 Print("!!! [Backend] Cannot Initiate: "+ GetErrorCode(code));
193 }
string GetErrorCode(int code)
Error code to string.
Definition BackendApi.c:159
proto void Print(void var)
Prints content of variable to console/log.

Перекрестные ссылки GetErrorCode() и Print().

◆ OnCannotShutdown()

void OnCannotShutdown ( int code)
inlineprivate

Called when shutdown cannot be proceeded.

199 {
200 Print("!!! [Backend] Cannot Shutdown: "+ GetErrorCode(code));
201 }

Перекрестные ссылки GetErrorCode() и Print().

◆ OnFail()

void OnFail ( string step)
inlineprivate

Called when step failed.

215 {
216 Print( "[Backend] Failed to Proceed: " + step );
217 }

Перекрестные ссылки Print().

◆ OnSuccess()

void OnSuccess ( string step)
inlineprivate

Called when step was successfully proceeded.

207 {
208 Print( "[Backend] Successfully Solicited: " + step );
209 }

Перекрестные ссылки Print().

◆ PlayerRequest()

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

Ask player request with callback result from controller (Lobby)

Аргументы
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.

Аргументы
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.

Аргументы
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)


Объявления и описания членов класса находятся в файле: