Telematics SDK - API Reference
v1.56.0
|
Data Structures | |
class | telux::config::ConfigFactory |
ConfigFactory allows creation of config related classes. More... | |
class | telux::config::IConfigListener |
IConfigListener interface is used to receive notifications related to any updates in the configurations dynamically. More... | |
class | telux::config::IConfigManager |
IConfigManager provides APIs to retrieve an instance of the manager, APIs for processes to update and retrieve configurations dynamically. More... | |
struct | telux::config::ConfigInfo |
class | telux::config::IModemConfigListener |
Listener class for getting notifications related to configuration change detection. The client needs to implement these methods as briefly as possible and avoid blocking calls in it. The methods in this class can be invoked from multiple different threads. Client needs to make sure that the implementation is thread-safe. More... | |
class | telux::config::IModemConfigManager |
IModemConfigManager provides interface to list config files present in modem's storage. load a new config file in modem, activate a config file, get active config file information, deactivate a config file, delete config file from the modem's storage, get and set mode of config auto selection, register and deregister listener for config update in modem. The config files are also referred to as MBNs. More... | |
Typedefs | |
using | telux::config::ConfigId = std::string |
using | telux::config::ConfigListCallback = std::function< void(std::vector< ConfigInfo > configList, telux::common::ErrorCode error)> |
using | telux::config::GetAutoSelectionModeCallback = std::function< void(AutoSelectionMode mode, telux::common::ErrorCode error)> |
using | telux::config::GetActiveConfigCallback = std::function< void(ConfigInfo configInfo, telux::common::ErrorCode error)> |
This section contains APIs related to Modem Config operations.
class telux::config::ConfigFactory |
ConfigFactory allows creation of config related classes.
Public Member Functions | |
virtual std::shared_ptr< IModemConfigManager > | getModemConfigManager (telux::common::InitResponseCb callback=nullptr)=0 |
virtual std::shared_ptr< IConfigManager > | getConfigManager (telux::common::InitResponseCb callback=nullptr)=0 |
Static Public Member Functions | |
static ConfigFactory & | getInstance () |
|
static |
Get instance of Config Factory
|
pure virtual |
Get instance of ModemConfig manager
On platforms with Access control enabled, Caller needs to have TELUX_CONFIG_MODEM_CONFIG permission to invoke this API successfully.
[in] | callback | Optional callback to get the response of Modem Config Manager initialization. |
|
pure virtual |
Get instance of the Config manager
On platforms with Access control enabled, Caller needs to have TELUX_CONFIG_APPS_CONFIG permission to invoke this API successfully.
[in] | callback | Optional callback to get the response of Config Manager initialization. |
class telux::config::IConfigListener |
IConfigListener interface is used to receive notifications related to any updates in the configurations dynamically.
Public Member Functions | |
virtual void | onConfigUpdate (std::string key, std::string value) |
virtual | ~IConfigListener () |
![]() | |
virtual void | onServiceStatusChange (ServiceStatus status) |
virtual | ~IServiceStatusListener () |
|
virtual |
|
virtual |
This API is invoked when there is any update in the configurations dynamically.
[in] | key | - The key updated in the configurations. |
[in] | value | - The corresponding value for the key that was updated in the configurations. |
class telux::config::IConfigManager |
IConfigManager provides APIs to retrieve an instance of the manager, APIs for processes to update and retrieve configurations dynamically.
Public Member Functions | |
virtual telux::common::ServiceStatus | getServiceStatus ()=0 |
virtual telux::common::Status | registerListener (std::weak_ptr< IConfigListener > listener)=0 |
virtual telux::common::Status | deregisterListener (std::weak_ptr< IConfigListener > listener)=0 |
virtual telux::common::Status | setConfig (const std::string key, const std::string value)=0 |
virtual const std::string | getConfig (const std::string key)=0 |
virtual const std::map< std::string, std::string > | getAllConfigs ()=0 |
virtual | ~IConfigManager () |
|
virtual |
Destructor of IConfigManager
|
pure virtual |
This status indicates whether the manager object is in a usable state or not.
|
pure virtual |
This API is used to register a listener for getting the updates when the configurations are updated dynamically.
[in] | listener | - Pointer of object that processes the notification. |
|
pure virtual |
This API is used to deregister a listener from getting the updates when the configurations are updated dynamically.
[in] | listener | - Pointer of object that processes the notification. |
|
pure virtual |
This API is used to update the key and the corresponding value in the configurations dynamically.
On platforms with Access control enabled, if -
In order to update any configuration onto the file, all the permissions needed - DAC permissions and sepolicy requirements, should be taken care by the application.
The API does not perform any strict checking for the value being set. Please refer to tel.conf for valid values for configuration items.
[in] | key | - The key that needs to be updated in the configurations. |
[in] | value | - The corresponding value for the key that needs the update in the configurations. |
|
pure virtual |
This API is used to retrieve the value for the corresponding key from the configurations dynamically.
[in] | key | - The key whose value is to be retrieved from the configurations. |
|
pure virtual |
This API is used to retrieve all the configurations for the application at present.
struct telux::config::ConfigInfo |
Data Fields | ||
---|---|---|
ConfigId | id |
id - stores the id of the configuration type - stores config type size - stores the size of the configuration desc - stores the configuration description version - stores version of the config file |
ConfigType | type | |
uint32_t | size | |
string | desc | |
uint32_t | version |
class telux::config::IModemConfigListener |
Listener class for getting notifications related to configuration change detection. The client needs to implement these methods as briefly as possible and avoid blocking calls in it. The methods in this class can be invoked from multiple different threads. Client needs to make sure that the implementation is thread-safe.
Public Member Functions | |
virtual void | onConfigUpdateStatus (ConfigUpdateStatus status, int slotId) |
virtual | ~IModemConfigListener () |
![]() | |
virtual void | onServiceStatusChange (ServiceStatus status) |
virtual | ~IServiceStatusListener () |
|
virtual |
Destructor of IModemConfigListener
|
virtual |
This function is called when a configuration update is detected. It is applicable only to SOFTWARE config.
[in] | status | update status of config. |
[in] | slotId | slotId where update is detected. |
class telux::config::IModemConfigManager |
IModemConfigManager provides interface to list config files present in modem's storage. load a new config file in modem, activate a config file, get active config file information, deactivate a config file, delete config file from the modem's storage, get and set mode of config auto selection, register and deregister listener for config update in modem. The config files are also referred to as MBNs.
|
virtual |
Destructor of IModemConfigManager
|
pure virtual |
Checks the status of modem config subsystem and returns the result.
|
pure virtual |
This status indicates whether the manager object is in a usable state or not.
|
pure virtual |
Wait for modem config subsystem to be ready.
|
pure virtual |
Fetching the list of config files present in modem's storage.
[in] | cb | - callback to the Response function. |
returns SUCCESS if the request to get config list is sent successfully.
|
pure virtual |
Loads a new config file into the modem's storage. This is a persistent operation. Only the config files loaded into the modem's storage can be activated.
[in] | filePath | - it defines the path to the config file. |
[in] | configType | - type of the config file. |
[in] | cb | - callback to the response function. |
returns SUCCESS if the request to load config file is sent successfully.
|
pure virtual |
Activates the config file on specified slot id. A file for activation must be loaded or should already be present in modem's storage.
[in] | configType | - type of the config file. |
[in] | configId | - id of the config file. |
[in] | slotId | - it defines the slot id to be selected. |
[in] | cb | - callback to the response function. |
|
pure virtual |
Get the currently active config file information for the specified slot id. In case default config files are activated, would return error.
[in] | configType | - type of the config file. |
[in] | cb | - callback to the response function. |
[in] | slotId | - it defines the slot id to be selected. |
|
pure virtual |
Deactivates the config file for the specified slot id.
[in] | configType | - type of the config file. |
[in] | slotId | - slot id to be selected for deactivation of config. |
[in] | cb | - callback to the response function. |
|
pure virtual |
Deletes the config file from the modem's storage.
[in] | configType | - type of the config file. |
[in] | configId | - id of the config file. This parameter is optional if not provided all the config files of the given config type are deleted from modem's storage. |
[in] | cb | - callback to the Response function. |
|
pure virtual |
Fetching the mode of config auto selection for specified slot id.
[in] | cb | - callback to the response function. |
[in] | slotId | - slot id of config. |
|
pure virtual |
Setting the mode of config auto selection for specified slot id.
[in] | mode | - auto selection mode status. |
[in] | slotId | - slot id of the config. |
[in] | cb | - callback to the response function. |
|
pure virtual |
Registeres the listener for indications.
[in] | listener | - pointer to implemented listener. |
|
pure virtual |
Deregisteres the listener from indications.
[in] | listener | - pointer to registered listener. |
using telux::config::ConfigId = typedef std::string |
using telux::config::ConfigListCallback = typedef std::function<void (std::vector<ConfigInfo> configList, telux::common::ErrorCode error)> |
This function is called as a response to requestConfigList().
[in] | configList | - Contains the list of config files in modem's storage. |
[in] | error | - Return code which indicates whether the operation succeeded or not. ErrorCode |
using telux::config::GetAutoSelectionModeCallback = typedef std::function<void (AutoSelectionMode mode, telux::common::ErrorCode error)> |
This function is called as a response to getAutoSelectionMode().
[in] | mode | - contains status of auto selection for configs. |
[in] | error | - Return code which indicates whether the operation succeeded or not. ErrorCode |
using telux::config::GetActiveConfigCallback = typedef std::function<void (ConfigInfo configInfo, telux::common::ErrorCode error)> |
This function is called as a response to getActiveConfig().
[in] | configInfo | - Information of active config file for specified slot id. |
[in] | error | - Return code which indicates whether the operation succeeded or not. ErrorCode |
|
strong |
|
strong |
|
strong |