Enfusion Script API
Loading...
Searching...
No Matches
SessionStorage Interface Reference

Save & Load handler. More...

Public Member Functions

proto external bool Initialized ()
 Return true if storage is initialized - ready to load/ store data.
 
proto external void ClearScheduler ()
 Clear all scheduled operations.
 
proto external void EnableScheduler (string fileName, bool bEnable)
 Request scheduler On/ Off without being removed from queue.
 
proto external void RequestPlayerSave (int iPlayerId)
 Request player save.
 
proto external void RequestScheduledSave (string fileName, float sec)
 Request periodical processing save of session content.
 
proto external void RequestSave (string fileName)
 Request server to process save of session content (can be invoked from script or game)
 
proto external void RequestLoad (string fileName)
 Request server to process load of session content (can be invoked from script or game)
 
proto external void LocalSave (string fileName)
 Request local save of session content (can be invoked from script or game)
 
proto external void LocalLoad (string fileName)
 Request local delete of session content (can be invoked from script or game)
 
proto external void LocalDelete (string fileName)
 Request local delete of session content (can be invoked from script or game)
 
proto external bool CheckFileID (string fileName)
 Check if file/ handle with thist name exist - local if you're local - online if you're online.
 
proto external void AssignFileIDCallback (string fileName, DSSessionCallback sessionCallback)
 Assign callback for handling Save & Load events for specific file handle under session.
 
proto external int AvailableSaves (out notnull array< string > aSaves)
 Get a list of all save files that are ready to load.
 
proto external void ProcessLoad (JsonApiStruct pDataObject, string fileName)
 Process session load - You call this method from OnLoad() event of callback.
 
proto external void ProcessSave (JsonApiStruct pDataObject, string fileName)
 Process session save - You call this method from OnSave() event of callback.
 
proto external bool GetOnlineWritePrivilege ()
 Check if online storage privileges are granted (if not - all is stored locally with session)
 

Detailed Description

Save & Load handler.

Member Function Documentation

◆ AssignFileIDCallback()

proto external void SessionStorage.AssignFileIDCallback ( string fileName,
DSSessionCallback sessionCallback )

Assign callback for handling Save & Load events for specific file handle under session.

Parameters
fileName- name of file handle
sessionCallback- name of file handle

◆ AvailableSaves()

proto external int SessionStorage.AvailableSaves ( out notnull array< string > aSaves)

Get a list of all save files that are ready to load.

◆ CheckFileID()

proto external bool SessionStorage.CheckFileID ( string fileName)

Check if file/ handle with thist name exist - local if you're local - online if you're online.

Parameters
fileName- name of file handle

◆ ClearScheduler()

proto external void SessionStorage.ClearScheduler ( )

Clear all scheduled operations.

◆ EnableScheduler()

proto external void SessionStorage.EnableScheduler ( string fileName,
bool bEnable )

Request scheduler On/ Off without being removed from queue.

Parameters
fileName- name of file handle
bEnable- if should run or not (Note: by default it run so you typically pause it first)

◆ GetOnlineWritePrivilege()

proto external bool SessionStorage.GetOnlineWritePrivilege ( )

Check if online storage privileges are granted (if not - all is stored locally with session)

◆ Initialized()

proto external bool SessionStorage.Initialized ( )

Return true if storage is initialized - ready to load/ store data.

◆ LocalDelete()

proto external void SessionStorage.LocalDelete ( string fileName)

Request local delete of session content (can be invoked from script or game)

Parameters
fileName- name of file handle

◆ LocalLoad()

proto external void SessionStorage.LocalLoad ( string fileName)

Request local delete of session content (can be invoked from script or game)

Parameters
fileName- name of file handle

◆ LocalSave()

proto external void SessionStorage.LocalSave ( string fileName)

Request local save of session content (can be invoked from script or game)

Parameters
fileName- name of file handle

◆ ProcessLoad()

proto external void SessionStorage.ProcessLoad ( JsonApiStruct pDataObject,
string fileName )

Process session load - You call this method from OnLoad() event of callback.

Parameters
pDataObjectRepresents "master" object as targer for incoming data

◆ ProcessSave()

proto external void SessionStorage.ProcessSave ( JsonApiStruct pDataObject,
string fileName )

Process session save - You call this method from OnSave() event of callback.

Parameters
pDataObjectRepresents "master" object as source of outcoming data

◆ RequestLoad()

proto external void SessionStorage.RequestLoad ( string fileName)

Request server to process load of session content (can be invoked from script or game)

Parameters
fileName- name of file handle

◆ RequestPlayerSave()

proto external void SessionStorage.RequestPlayerSave ( int iPlayerId)

Request player save.

Parameters
iPlayerIdIs Player Id used on player identity

◆ RequestSave()

proto external void SessionStorage.RequestSave ( string fileName)

Request server to process save of session content (can be invoked from script or game)

Parameters
fileName- name of file handle

◆ RequestScheduledSave()

proto external void SessionStorage.RequestScheduledSave ( string fileName,
float sec )

Request periodical processing save of session content.

Parameters
fileName- name of file handle
sec- time in seconds

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