new SessionState(init_data)
Manages all client side session data and provides functions for lookup and mutation of that data.
The only client side session data not handled by this class is the session id used by the current implementation of the server protocol. Management of session id the responsibility of the protocol adaptor.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
init_data |
spv.ds.impl.SessionInitData
|
Methods
assertHasLoadedConfig()
Test if category and model has been set, throw on failure
- Source:
getAuxiliaryData() → {spv.ds.impl.AuxData}
Get the auxiliary data that came with the last bop.
- Source:
Returns:
- Type:
-
spv.ds.impl.AuxData
getImageSerieInfos() → {Array.<spv.ds.ImageSerieInfo>}
Get the image serie information for the current configuration
- Source:
Returns:
- Type:
-
Array.<spv.ds.ImageSerieInfo>
getLongText(item_id) → {string}
Get 'long_text' text for item_id or empty string on failure
- Source:
Parameters:
Name | Type | Description |
---|---|---|
item_id |
string
|
Returns:
- Type:
-
string
getMediumText(item_id) → {string}
Get 'medium_text' text for item_id or empty string on failure
- Source:
Parameters:
Name | Type | Description |
---|---|---|
item_id |
string
|
Returns:
- Type:
-
string
getRootMenuItems() → {Array.<spv.ds.MenuItem>}
Get the root menues from bump data
- Source:
Returns:
- Type:
-
Array.<spv.ds.MenuItem>
getShortText(item_id) → {string}
Get 'short_text' text for item_id or empty string on failure
- Source:
Parameters:
Name | Type | Description |
---|---|---|
item_id |
string
|
Returns:
- Type:
-
string
getUrlSettings() → {spv.ds.UrlSettings}
Get base urls needed for most GET operations on images etc.
- Source:
Returns:
- Type:
-
spv.ds.UrlSettings
update(state_update, aux_data)
Update the client side session state
- Source:
Parameters:
Name | Type | Description |
---|---|---|
state_update |
spv.ds.SessionStateUpdate
|
|
aux_data |
spv.ds.impl.AuxData
|
updateTexts(state_update)
Updates the text database.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
state_update |
spv.ds.SessionStateUpdate
|