Knox Tizen Wearable SDK
|
Device inventory policy group provides policies for miscellaneous control. More...
Data Structures | |
struct | mdm_history_query_t |
Definition of a parameter used by mdm_history_add_parameter(). More... | |
struct | mdm_history_info_t |
History info. This structure describes event which happened in the past. More... | |
struct | mdm_history_purge_status_t |
Status of automatic history purges. More... | |
Typedefs | |
typedef struct mdm_history_context_s | mdm_history_context_t |
Context used by extended call/SMS history APIs to handle requests. More... | |
Enumerations |
Functions | |
mdm_data_t * | mdm_get_device_id (void) |
API to get the unique device ID, for example, the IMEI for GSM and the MEID or ESN for CDMA phones. More... | |
mdm_data_t * | mdm_get_sim_serial_number (void) |
API to get the ICCID of the SIM card in the device. More... | |
mdm_data_t * | mdm_get_bluetooth_address (void) |
API to check the hardware address of the local Bluetooth adapter. More... | |
mdm_data_t * | mdm_get_network_operator (void) |
API to get the numeric name (MCC+MNC) of the current registered network operator. More... | |
mdm_data_t * | mdm_get_network_operator_name (void) |
API to get the alphanumeric name of current registered network operator. More... | |
mdm_data_t * | mdm_get_sim_operator_name (void) |
API to get the Service Provider Name (SPN) if SIM is available on the device. More... | |
mdm_data_t * | mdm_get_subscriber_number (void) |
API to get phone number associated with the device. More... | |
mdm_network_service_type_t | mdm_get_network_type (void) |
API to get the radio technology (Network Type) that is currently being used on the device. More... | |
mdm_data_t * | mdm_get_sim_operator (void) |
API to get the numeric name (MCC+MNC) of the SIM operator. More... | |
mdm_data_t * | mdm_get_sim_country_iso (void) |
API to get the standardized (ISO) country code of the SIM provider. More... | |
mdm_sim_status_t | mdm_get_sim_state (void) |
API to the status of the device SIM card. More... | |
mdm_data_t * | mdm_get_wifi_mac_address (void) |
API to get the Wi-Fi MAC address of the device. More... | |
mdm_status_t | mdm_is_bluetooth_supported (void) |
API to check if Bluetooth capability is supported on the device or not. More... | |
mdm_status_t | mdm_get_bluetooth_mode_status (void) |
API to get the current state of the local Bluetooth adapter. More... | |
mdm_data_t * | mdm_get_device_name (void) |
API to get the name of device. More... | |
mdm_data_t * | mdm_get_platform_version (void) |
API to get the Platform Version of the device. More... | |
mdm_data_t * | mdm_get_total_capacity_internal (void) |
API to get the total capacity in bytes of the internal SD card and phone memory. More... | |
mdm_data_t * | mdm_get_available_capacity_internal (void) |
API to get the available capacity of the internal phone memory in bytes. More... | |
mdm_data_t * | mdm_get_total_capacity_external (void) |
API to get the total capacity in bytes of the external SD card. More... | |
mdm_data_t * | mdm_get_available_capacity_external (void) |
API to get the available capacity of the external SD card in bytes. More... | |
mdm_data_t * | mdm_get_model_name (void) |
API to get the model name of the device. More... | |
mdm_data_t * | mdm_get_modem_firmware (void) |
API to get the model firmware version of the device. More... | |
mdm_status_t | mdm_is_device_secure (void) |
API to get the device status(secure or not) More... | |
mdm_data_t * | mdm_get_device_platform (void) |
API to get the platform of the device. More... | |
mdm_data_t * | mdm_get_device_maker (void) |
API to get the OEM of device. More... | |
mdm_status_t | mdm_is_device_locked (void) |
Checks if device is currently locked. More... | |
mdm_result_t | mdm_get_success_calls_count (int *count) |
mdm_result_t | mdm_get_missed_calls_count (int *count) |
API to retrieve the number of missed calls on the device. More... | |
mdm_result_t | mdm_get_rejected_calls_count (int *count) |
API to retrieve the number of rejected calls on the device. More... | |
mdm_result_t | mdm_get_blocked_calls_count (int *count) |
API to retrieve the number of blocked calls on the device for a specific SIM card. More... | |
mdm_result_t | mdm_reset_calls_count (void) |
API to reset the counters related to calls count. More... | |
mdm_result_t | mdm_enable_wifi_statistics (mdm_status_t status) |
API used to enable logging of Wi-Fi network statistics on the device. More... | |
mdm_status_t | mdm_is_wifi_statistics_enabled (void) |
API to determine if Wi-Fi statistics logging is enabled or disabled. More... | |
mdm_result_t | mdm_enable_data_call_statistics (mdm_status_t status) |
API used to enable logging of cellular data network statistics on the device. More... | |
mdm_status_t | mdm_is_data_call_statistics_enabled (void) |
API to determine whether cellular data network statistics logging is enabled. More... | |
mdm_result_t | mdm_reset_data_usage (void) |
API to reset the counters for received and sent data including the carrier network and WiFi data usage. More... | |
mdm_result_t | mdm_get_bytes_sent_wifi (long long *bytes) |
API to retrieve the amount of bytes sent through Wi-Fi connection. More... | |
mdm_result_t | mdm_get_bytes_received_wifi (long long *bytes) |
API to retrieve the amount of bytes received from Wi-Fi connection. More... | |
mdm_result_t | mdm_get_bytes_sent_network (long long *bytes) |
API to retrieve the amount of bytes sent through network connection. More... | |
mdm_result_t | mdm_get_bytes_received_network (long long *bytes) |
API to retrieve the amount of bytes received from network connection. More... | |
mdm_result_t | mdm_enable_sms_capture (mdm_status_t status) |
API to enable or disable SMS capture on device. More... | |
mdm_status_t | mdm_is_sms_capture_enabled (void) |
API to check whether SMS capture is enabled or disabled on device. More... | |
mdm_data_t * | mdm_get_inbound_sms_captured (void) |
API to retrieve the In-bound SMSs captured on device. More... | |
mdm_data_t * | mdm_get_outbound_sms_captured (void) |
API to retrieve the Out-bound SMSs captured on device. More... | |
mdm_result_t | mdm_clear_sms_captured (void) |
API to clear the SMS logged on device. More... | |
mdm_result_t | mdm_enable_call_capture (mdm_status_t status) |
API to enable or disable capture of calling information on device. More... | |
mdm_status_t | mdm_is_call_capture_enabled (void) |
API to check whether call logging is enabled or disabled on device. More... | |
mdm_data_t * | mdm_get_incoming_call_captured (void) |
API to retrieve incoming call information captured on device. More... | |
mdm_data_t * | mdm_get_outgoing_call_captured (void) |
API to retrieve outgoing call information captured on device. More... | |
mdm_result_t | mdm_clear_call_captured (void) |
API to clear call information logged on device. More... | |
mdm_data_t * | mdm_get_device_processor_type (void) |
API to get the processor type of the device. More... | |
mdm_result_t | mdm_get_total_ram_memory (int *memory) |
API to get total RAM memory on the device. More... | |
mdm_result_t | mdm_get_available_ram_memory (int *memory) |
API to get the value of available RAM. More... | |
mdm_data_t * | mdm_get_device_serial_number (void) |
API to get the device's serial number. More... | |
mdm_history_context_t * | mdm_history_context_new (void) |
Creates new history context. More... | |
mdm_result_t | mdm_history_context_free (mdm_history_context_t *ctx) |
Frees history context. More... | |
mdm_data_t * | mdm_history_get_next (mdm_history_context_t *ctx, unsigned long window_size) |
Gets the history records according to parameters specified in the history context. More... | |
mdm_result_t | mdm_history_remove (mdm_history_context_t *ctx) |
Removes records form internal call/SMS database. More... | |
mdm_result_t | mdm_history_add_parameter (mdm_history_context_t *ctx, const mdm_history_query_t *query_parameter) |
Allows to define query parameters to limit amount of data returned by mdm_history_get_next() or removed by mdm_history_remove(). More... | |
mdm_result_t | mdm_history_add_sort_parameter (mdm_history_context_t *ctx, mdm_history_parameter_t parameter, mdm_sort_order_t order) |
Defines order of returned by mdm_history_get_next() data. More... | |
mdm_result_t | mdm_history_set_purge_interval (uint64_t interval) |
Enables automatic removal of events older than specified time. More... | |
mdm_data_t * | mdm_history_get_purge_status (void) |
This API returns automatic purge status. More... | |
Device inventory policy group provides policies for miscellaneous control.
Device Inventory policy group.
#include <mdm.h>
This group provides APIs to get the Device Inventory information, eg: Device ID, SIM Serial Number, Network Name, Device Name, Platform Version, ext. And provides APIs to control Enable/Disable Call Capture, get Incoming/Outgoing Call Captured, Set/Get Data Usage Timer, Get Bytes Sent/Received, ext.
typedef struct mdm_history_context_s mdm_history_context_t |
Context used by extended call/SMS history APIs to handle requests.
Definition at line 392 of file device_inventory.h.
enum mdm_direction_t |
Defines direction of call and SMS events.
Enumerator | |
---|---|
MDM_DIRECTION_INCOMING |
Call or SMS is coming from a remote device to the device. |
MDM_DIRECTION_OUTGOING |
Call or SMS is going from the device to a remote device. |
Definition at line 194 of file device_inventory.h.
Defines type of history event.
Definition at line 220 of file device_inventory.h.
Defines type of parameter used by mdm_history_add_parameter() and mdm_history_add_sort_parameter().
Meaning of the enum value depends on what function it is used for:
The event in below description means one record of history, either SMS or call.
Enumerator | |
---|---|
MDM_HISTORY_PARAMETER_EVENT_START_DATE |
Events that started at the specified time (inclusive). Sorts by event start time. |
MDM_HISTORY_PARAMETER_EVENT_END_DATE |
Events that started before specified time (inclusive). Sorts by event start time. |
MDM_HISTORY_PARAMETER_EVENT_START_RECORD_ID |
Events with record id equal or greater than specified. Sorts by record id. |
MDM_HISTORY_PARAMETER_EVENT_END_RECORD_ID |
Events with record id equal or smaller than specified. Sorts by record id. |
MDM_HISTORY_PARAMETER_EVENT_DIRECTION |
Events with specified direction. Direction is described by mdm_direction_t. Sorts by direction. |
MDM_HISTORY_PARAMETER_EVENT_DESTINATION_NUMBER |
Events with specified remote phone number. Sort by remote phone number. Remote phone number is:
|
MDM_HISTORY_PARAMETER_EVENT_SLOT_ID |
Events occurred on specified slot. Sort by slot id. |
MDM_HISTORY_PARAMETER_EVENT_ROAMING_STATUS |
Events with specified roaming status. Sort by roaming status. |
MDM_HISTORY_PARAMETER_EVENT_TYPE |
Events of specified type. Sort by type of an event. For types of events see mdm_history_event_type_t. |
MDM_HISTORY_PARAMETER_EVENT_LAST |
Last value in this type (No corresponding action). |
Definition at line 126 of file device_inventory.h.
network status
Definition at line 58 of file device_inventory.h.
enum mdm_roaming_status_t |
Defines roaming status.
Enumerator | |
---|---|
MDM_ROAMING_STATUS_NOT_ACTIVE |
Roaming is not active (device is connected to the mother network) |
MDM_ROAMING_STATUS_ACTIVE |
Roaming is active (device is connected to the foreign network) |
Definition at line 207 of file device_inventory.h.
enum mdm_sim_status_t |
SIM card status.
Definition at line 36 of file device_inventory.h.
enum mdm_sort_order_t |
Enum type to specify the sort order of the result from the extended calls/SMSes history APIs.
Enumerator | |
---|---|
MDM_SORT_ORDER_ASCENDING |
Ascending order |
MDM_SORT_ORDER_DESCENDING |
Descending order |
Definition at line 93 of file device_inventory.h.
mdm_result_t mdm_clear_call_captured | ( | void | ) |
API to clear call information logged on device.
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t mdm_clear_sms_captured | ( | void | ) |
API to clear the SMS logged on device.
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t mdm_enable_call_capture | ( | mdm_status_t | status | ) |
API to enable or disable capture of calling information on device.
[in] | status | MDM_ENABLED to enable calling capture, MDM_DISABLED to disable calling capture. |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t mdm_enable_data_call_statistics | ( | mdm_status_t | status | ) |
API used to enable logging of cellular data network statistics on the device.
[in] | status | MDM_ENABLED if the device shall store the data call statistics (count amount of data). |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t mdm_enable_sms_capture | ( | mdm_status_t | status | ) |
API to enable or disable SMS capture on device.
[in] | status | MDM_ENABLED to enable SMS logging, MDM_DISABLED to disable it. |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t mdm_enable_wifi_statistics | ( | mdm_status_t | status | ) |
API used to enable logging of Wi-Fi network statistics on the device.
[in] | status | MDM_ENABLED True to enable capture statistics, MDM_DISABLED to disable. |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_data_t* mdm_get_available_capacity_external | ( | void | ) |
API to get the available capacity of the external SD card in bytes.
mdm_data_t* mdm_get_available_capacity_internal | ( | void | ) |
API to get the available capacity of the internal phone memory in bytes.
mdm_result_t mdm_get_available_ram_memory | ( | int * | memory | ) |
API to get the value of available RAM.
[out] | memory | The size of the available RAM memory in MB |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t mdm_get_blocked_calls_count | ( | int * | count | ) |
API to retrieve the number of blocked calls on the device for a specific SIM card.
[out] | count | Value of blocked calls count |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_data_t* mdm_get_bluetooth_address | ( | void | ) |
API to check the hardware address of the local Bluetooth adapter.
mdm_status_t mdm_get_bluetooth_mode_status | ( | void | ) |
API to get the current state of the local Bluetooth adapter.
MDM_ENABLED | Bluetooth is activated |
MDM_DISABLED | Bluetooth is deactivated |
MDM_STATUS_ERROR | Failure |
mdm_result_t mdm_get_bytes_received_network | ( | long long * | bytes | ) |
API to retrieve the amount of bytes received from network connection.
[out] | bytes | The amount of bytes received from network connection. |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t mdm_get_bytes_received_wifi | ( | long long * | bytes | ) |
API to retrieve the amount of bytes received from Wi-Fi connection.
[out] | bytes | The amount of bytes received from Wi-Fi connection |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t mdm_get_bytes_sent_network | ( | long long * | bytes | ) |
API to retrieve the amount of bytes sent through network connection.
[out] | bytes | The amount of bytes sent through network connection. |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t mdm_get_bytes_sent_wifi | ( | long long * | bytes | ) |
API to retrieve the amount of bytes sent through Wi-Fi connection.
[out] | bytes | The amount of bytes sent through Wi-Fi connection |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_data_t* mdm_get_device_id | ( | void | ) |
API to get the unique device ID, for example, the IMEI for GSM and the MEID or ESN for CDMA phones.
mdm_data_t* mdm_get_device_maker | ( | void | ) |
API to get the OEM of device.
mdm_data_t* mdm_get_device_name | ( | void | ) |
API to get the name of device.
mdm_data_t* mdm_get_device_platform | ( | void | ) |
API to get the platform of the device.
mdm_data_t* mdm_get_device_processor_type | ( | void | ) |
API to get the processor type of the device.
mdm_data_t* mdm_get_device_serial_number | ( | void | ) |
API to get the device's serial number.
mdm_data_t* mdm_get_inbound_sms_captured | ( | void | ) |
API to retrieve the In-bound SMSs captured on device.
mdm_data_t* mdm_get_incoming_call_captured | ( | void | ) |
API to retrieve incoming call information captured on device.
mdm_result_t mdm_get_missed_calls_count | ( | int * | count | ) |
API to retrieve the number of missed calls on the device.
[out] | count | Value of missed calls count |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_data_t* mdm_get_model_name | ( | void | ) |
API to get the model name of the device.
mdm_data_t* mdm_get_modem_firmware | ( | void | ) |
API to get the model firmware version of the device.
mdm_data_t* mdm_get_network_operator | ( | void | ) |
API to get the numeric name (MCC+MNC) of the current registered network operator.
mdm_data_t* mdm_get_network_operator_name | ( | void | ) |
API to get the alphanumeric name of current registered network operator.
mdm_network_service_type_t mdm_get_network_type | ( | void | ) |
API to get the radio technology (Network Type) that is currently being used on the device.
MDM_NETWORK_SERVICE_ERR | Error |
MDM_NETWORK_SERVICE_NO_SRV | No Service available |
MDM_NETWORK_SERVICE_GSM | GSM |
MDM_NETWORK_SERVICE_GPRS | GPRS |
MDM_NETWORK_SERVICE_EGPRS | EGPRS |
MDM_NETWORK_SERVICE_PCS1900 | PCS1900 |
MDM_NETWORK_SERVICE_UMTS | UMTS |
MDM_NETWORK_SERVICE_GSM_AND_UMTS | GSM/UMTS |
MDM_NETWORK_SERVICE_HSDPA | HSDPA |
MDM_NETWORK_SERVICE_IS95A | IS95A |
MDM_NETWORK_SERVICE_IS95B | IS95B |
MDM_NETWORK_SERVICE_CDMA_1X | CDMA 1X |
MDM_NETWORK_SERVICE_EVDO_REV_0 | EV-DO rev0 |
MDM_NETWORK_SERVICE_1X_EVDO_REV_0_HYBRID | 1X/EV-DO rev0 |
MDM_NETWORK_SERVICE_EVDO_REV_A | EV-DO revA |
MDM_NETWORK_SERVICE_1X_EVDO_REV_A_HYBRID | 1X/EV-DO revA |
MDM_NETWORK_SERVICE_EVDO_REV_B | EV-DO revB |
MDM_NETWORK_SERVICE_1X_EVDO_REV_B_HYBRID | 1X/EV-DO revB |
MDM_NETWORK_SERVICE_EVDV | EV-DV |
MDM_NETWORK_SERVICE_EHRPD | EHRPD |
MDM_NETWORK_SERVICE_LTE | LTE |
mdm_data_t* mdm_get_outbound_sms_captured | ( | void | ) |
API to retrieve the Out-bound SMSs captured on device.
mdm_data_t* mdm_get_outgoing_call_captured | ( | void | ) |
API to retrieve outgoing call information captured on device.
mdm_data_t* mdm_get_platform_version | ( | void | ) |
API to get the Platform Version of the device.
mdm_result_t mdm_get_rejected_calls_count | ( | int * | count | ) |
API to retrieve the number of rejected calls on the device.
[out] | count | Value of rejected calls count |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_data_t* mdm_get_sim_country_iso | ( | void | ) |
API to get the standardized (ISO) country code of the SIM provider.
mdm_data_t* mdm_get_sim_operator | ( | void | ) |
API to get the numeric name (MCC+MNC) of the SIM operator.
mdm_data_t* mdm_get_sim_operator_name | ( | void | ) |
API to get the Service Provider Name (SPN) if SIM is available on the device.
mdm_data_t* mdm_get_sim_serial_number | ( | void | ) |
API to get the ICCID of the SIM card in the device.
mdm_sim_status_t mdm_get_sim_state | ( | void | ) |
API to the status of the device SIM card.
MDM_SIM_STATUS_ERROR | Error |
MDM_SIM_STATUS_CARD_ERROR | Bad card/On the fly SIM gone bad |
MDM_SIM_STATUS_CARD_NOT_PRESENT | Card not present |
MDM_SIM_STATUS_SIM_INITIALIZING | SIM is in Initializing state |
MDM_SIM_STATUS_SIM_INIT_COMPLETED | SIM Initialization OK |
MDM_SIM_STATUS_SIM_PIN_REQUIRED | PIN required state |
MDM_SIM_STATUS_SIM_PUK_REQUIRED | PUK required state |
MDM_SIM_STATUS_CARD_BLOCKED | PIN/PUK blocked(permanently blocked- All the attempts for PIN/PUK failed) |
MDM_SIM_STATUS_SIM_NCK_REQUIRED | Network Control Key required state |
MDM_SIM_STATUS_SIM_NSCK_REQUIRED | Network Subset Control Key required state |
MDM_SIM_STATUS_SIM_SPCK_REQUIRED | Service Provider Control Key required state |
MDM_SIM_STATUS_SIM_CCK_REQUIRED | Corporate Control Key required state |
MDM_SIM_STATUS_CARD_REMOVED | Card removed |
MDM_SIM_STATUS_SIM_LOCK_REQUIRED | PH-SIM (Phone-SIM) locked state |
mdm_data_t* mdm_get_subscriber_number | ( | void | ) |
API to get phone number associated with the device.
mdm_result_t mdm_get_success_calls_count | ( | int * | count | ) |
[out] | count | Value of success call count |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_data_t* mdm_get_total_capacity_external | ( | void | ) |
API to get the total capacity in bytes of the external SD card.
mdm_data_t* mdm_get_total_capacity_internal | ( | void | ) |
API to get the total capacity in bytes of the internal SD card and phone memory.
mdm_result_t mdm_get_total_ram_memory | ( | int * | memory | ) |
API to get total RAM memory on the device.
[out] | memory | The size of the total RAM memory in MB |
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_data_t* mdm_get_wifi_mac_address | ( | void | ) |
API to get the Wi-Fi MAC address of the device.
mdm_result_t mdm_history_add_parameter | ( | mdm_history_context_t * | ctx, |
const mdm_history_query_t * | query_parameter | ||
) |
Allows to define query parameters to limit amount of data returned by mdm_history_get_next() or removed by mdm_history_remove().
The function adds given query parameter to the history context. In case if the given parameter already exists the current parameter value will be overwritten by the new one. Parameters are used to limit amount of data returned by mdm_history_get_next() or removed by mdm_history_remove().
See mdm_history_query_t for detailed description of the parameters.
[in] | ctx | Pointer to history context allocated by mdm_history_context_new(). |
[in] | query_parameter | Parameter used to limit amount of returned/removed data. |
MDM_RESULT_SUCCESS | data parameter added. |
MDM_RESULT_FAIL | Some failure occurred (e.g. could not connect to mdm-server). |
MDM_RESULT_NOT_SUPPORTED | This API is not supported. |
MDM_RESULT_INVALID_PARAM | Invalid parameter passed. |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t mdm_history_add_sort_parameter | ( | mdm_history_context_t * | ctx, |
mdm_history_parameter_t | parameter, | ||
mdm_sort_order_t | order | ||
) |
Defines order of returned by mdm_history_get_next() data.
The function adds sort parameters. The sort parameters defines order in which data is returned from mdm_history_get_next(). You can add many sort parameters. Order of adding the parameters defines sort order.
If you add the same sort parameter for the second time, previous value is removed, and the parameter is moved to the end.
[in] | ctx | Pointer to history context. |
[in] | parameter | One of mdm_history_parameter_t value which defines type of sort. |
[in] | order | One of mdm_sort_order_t which defines order (ascending or descending). |
MDM_RESULT_SUCCESS | sort parameter added. |
MDM_RESULT_FAIL | Some failure occurred (e.g. could not connect to mdm-server). |
MDM_RESULT_NOT_SUPPORTED | This api is not supported. |
MDM_RESULT_INVALID_PARAM | Invalid parameter passed. |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t mdm_history_context_free | ( | mdm_history_context_t * | ctx | ) |
Frees history context.
Frees all resources allocated for the context. Any allocated context must be freed after use.
[in] | ctx | Pointer to a history context. |
MDM_RESULT_SUCCESS | Context successfully freed. |
MDM_RESULT_FAIL | Some failure occurred (e.g. not connected to mdm-server) but context on client side has been freed. |
MDM_RESULT_NOT_SUPPORTED | This API is not supported. Context remains untouched. |
MDM_RESULT_INVALID_PARAM | Invalid context passed to free. Note, that implementation may not always be able to detect what is invalid and behavior can be unpredictable so always pass valid context to the API. When this error code is returned context remains untouched. |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function but local part of a context is freed. |
mdm_history_context_t* mdm_history_context_new | ( | void | ) |
Creates new history context.
Context is required for other history API functions. It allows:
When context is no longer used, you must call mdm_history_context_free() to free resources.
Before calling this API one needs to call mdm_get_service() to connect to MDM service. Returned context is valid as long as connection is preserved. If for any reason (e.g. client will call mdm_release_service()) connection is broken, the context becomes invalid. However you still need to call mdm_history_context_free() to free resources assigned to it.
mdm_data_t* mdm_history_get_next | ( | mdm_history_context_t * | ctx, |
unsigned long | window_size | ||
) |
Gets the history records according to parameters specified in the history context.
Returns mdm_data_t structure with mdm_data_t::data field set to list (GList) of mdm_history_info_t structures. The list can be empty. The list contains up to window_size
structures. If there is more than window_size
records to return you need to call this function again on the same context. If there is no more records to return, it returns empty mdm_data_t structure - mdm_data_t::data field is set to NULL. You need to free context and create new one in order to get new data again. You need to call mdm_free_data() to free returned mdm_data_t structure. This will also free list of history records attached to the structure.
To limit amount of returned data one can specify query parameters by calling mdm_history_add_parameter(). The query parameters have to be specified before first call to mdm_history_get_next(). Following the the first call to mdm_history_get_next(), no parameters can be changed and mdm_history_add_parameter() will return error.
Order of returned data can be changed by setting sort parameters by calling mdm_history_add_sort_parameter(). You need to add sort parameter before first call to mdm_history_get_next(). Following the the first call to mdm_history_get_next(), no sort parameter can be changed and mdm_history_add_sort_parameter() will return error. You can add multiple sort parameters. All of them will be taken into account in order of adding. If you add the same sort parameter for the second time, it is overwritten and moved in order to the end. By default sort order is not defined.
[in] | ctx | Pointer to a history context. |
[in] | window_size | The number of structures that will be returned in single request. |
mdm_data_t* mdm_history_get_purge_status | ( | void | ) |
This API returns automatic purge status.
When purge interval is set to non-zero value (see mdm_history_set_purge_interval()), automatic removal of expired event may occur. This function returns status of automatic removal: how many, what kind of records removed from history since purge interval had been set.
mdm_result_t mdm_history_remove | ( | mdm_history_context_t * | ctx | ) |
Removes records form internal call/SMS database.
By default it removes whole history. You may limit amount of removed data by adding parameters using mdm_history_add_parameter(). You need to add data parameters before first call to mdm_history_remove(). You may call mdm_history_remove() after calling mdm_history_get_next(). In such case, mdm_history_remove() uses the same parameters as mdm_history_get_next().
Sort parameters are ignored.
[in] | ctx | Pointer to a history context. |
MDM_RESULT_SUCCESS | history has been removed. |
MDM_RESULT_FAIL | Some failure occurred (e.g. could not connect to mdm-server). |
MDM_RESULT_NOT_SUPPORTED | This api is not supported. |
MDM_RESULT_INVALID_PARAM | Invalid parameter passed. |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t mdm_history_set_purge_interval | ( | uint64_t | interval | ) |
Enables automatic removal of events older than specified time.
Events older than specified time will be removed by system without notification. Setting interval equal zero disables automatic event removal. By default, automatic event removal is disabled.
There is not guarantee that event record will be removed as soon as it expires. It will be removed after system dependent time.
Calling this function resets purge status (see mdm_history_get_purge_status()).
[in] | interval | Determines how old events stay stored in database. Value in seconds. Setting 0 will disable automatic database cleanups. |
MDM_RESULT_SUCCESS | purge interval set successfully. |
MDM_RESULT_FAIL | Some failure occurred (e.g. could not connect to mdm-server). |
MDM_RESULT_NOT_SUPPORTED | This api is not supported. |
MDM_RESULT_INVALID_PARAM | Invalid parameter passed. |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_status_t mdm_is_bluetooth_supported | ( | void | ) |
API to check if Bluetooth capability is supported on the device or not.
MDM_TRUE | Bluetoooth capability is supported on the device |
MDM_FALSE | Bluetoooth capability is not supported |
MDM_STATUS_ERROR | Failure |
mdm_status_t mdm_is_call_capture_enabled | ( | void | ) |
API to check whether call logging is enabled or disabled on device.
MDM_ENABLED | Calling capture is enabled |
MDM_DISABLED | Calling capture is disabled |
MDM_STATUS_ERROR | Fail |
mdm_status_t mdm_is_data_call_statistics_enabled | ( | void | ) |
API to determine whether cellular data network statistics logging is enabled.
mdm_status_t mdm_is_device_locked | ( | void | ) |
Checks if device is currently locked.
mdm_status_t mdm_is_device_secure | ( | void | ) |
API to get the device status(secure or not)
mdm_status_t mdm_is_sms_capture_enabled | ( | void | ) |
API to check whether SMS capture is enabled or disabled on device.
MDM_ENABLED | Capturing SMS is enabled |
MDM_DISABLED | Capturing SMS is disabled |
MDM_STATUS_ERROR | Fail |
mdm_status_t mdm_is_wifi_statistics_enabled | ( | void | ) |
API to determine if Wi-Fi statistics logging is enabled or disabled.
MDM_ENABLED | Wi-Fi statistics is enabled |
MDM_DISABLED | Wi-Fi statistics is disabled |
mdm_result_t mdm_reset_calls_count | ( | void | ) |
API to reset the counters related to calls count.
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |
mdm_result_t mdm_reset_data_usage | ( | void | ) |
API to reset the counters for received and sent data including the carrier network and WiFi data usage.
MDM_RESULT_SUCCESS | Successful |
MDM_RESULT_FAIL | General failure |
MDM_RESULT_NOT_SUPPORTED | Not supported |
MDM_RESULT_INVALID_PARAM | Invalid parameter |
MDM_RESULT_ACCESS_DENIED | The application does not have the privilege to call this function. |