Knox Tizen Wearable SDK
Device Inventory policy group

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_tmdm_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_tmdm_get_sim_serial_number (void)
 API to get the ICCID of the SIM card in the device. More...
 
mdm_data_tmdm_get_bluetooth_address (void)
 API to check the hardware address of the local Bluetooth adapter. More...
 
mdm_data_tmdm_get_network_operator (void)
 API to get the numeric name (MCC+MNC) of the current registered network operator. More...
 
mdm_data_tmdm_get_network_operator_name (void)
 API to get the alphanumeric name of current registered network operator. More...
 
mdm_data_tmdm_get_sim_operator_name (void)
 API to get the Service Provider Name (SPN) if SIM is available on the device. More...
 
mdm_data_tmdm_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_tmdm_get_sim_operator (void)
 API to get the numeric name (MCC+MNC) of the SIM operator. More...
 
mdm_data_tmdm_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_tmdm_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_tmdm_get_device_name (void)
 API to get the name of device. More...
 
mdm_data_tmdm_get_platform_version (void)
 API to get the Platform Version of the device. More...
 
mdm_data_tmdm_get_total_capacity_internal (void)
 API to get the total capacity in bytes of the internal SD card and phone memory. More...
 
mdm_data_tmdm_get_available_capacity_internal (void)
 API to get the available capacity of the internal phone memory in bytes. More...
 
mdm_data_tmdm_get_total_capacity_external (void)
 API to get the total capacity in bytes of the external SD card. More...
 
mdm_data_tmdm_get_available_capacity_external (void)
 API to get the available capacity of the external SD card in bytes. More...
 
mdm_data_tmdm_get_model_name (void)
 API to get the model name of the device. More...
 
mdm_data_tmdm_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_tmdm_get_device_platform (void)
 API to get the platform of the device. More...
 
mdm_data_tmdm_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_tmdm_get_inbound_sms_captured (void)
 API to retrieve the In-bound SMSs captured on device. More...
 
mdm_data_tmdm_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_tmdm_get_incoming_call_captured (void)
 API to retrieve incoming call information captured on device. More...
 
mdm_data_tmdm_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_tmdm_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_tmdm_get_device_serial_number (void)
 API to get the device's serial number. More...
 
mdm_history_context_tmdm_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_tmdm_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_tmdm_history_get_purge_status (void)
 This API returns automatic purge status. More...
 

Detailed Description

Device inventory policy group provides policies for miscellaneous control.

Device Inventory policy group.

Required Header

#include <mdm.h>

Overview

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 Documentation

typedef struct mdm_history_context_s mdm_history_context_t

Context used by extended call/SMS history APIs to handle requests.

See also
mdm_history_context_new()
Since (Knox_wearable):
1.1.0
Since (Tizen):
2.4.0.4

Definition at line 392 of file device_inventory.h.

Enumeration Type Documentation

Defines direction of call and SMS events.

Since (Knox_wearable):
1.1.0
Since (Tizen):
2.4.0.4
See also
mdm_history_query_t, mdm_history_add_parameter()
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.

Since (Knox_wearable):
1.1.0
Since (Tizen):
2.4.0.4
See also
mdm_history_query_t, mdm_history_add_parameter()
Enumerator
MDM_HISTORY_EVENT_TYPE_UNKNOWN 

Event is of unknown type

MDM_HISTORY_EVENT_TYPE_CALL 

This is call event

MDM_HISTORY_EVENT_TYPE_SMS 

This is SMS event

MDM_HISTORY_EVENT_TYPE_LAST 

No special meaning. This is always last value in this type.

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.

Since (Knox_wearable):
1.1.0
Since (Tizen):
2.4.0.4
See also
mdm_history_add_parameter(), mdm_history_add_sort_parameter(), mdm_history_query_t
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:

  • number of phone that called or send SMS in case of incoming,
  • number of phone that was called or to which SMS was sent in case of outgoing.
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

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Enumerator
MDM_NETWORK_SERVICE_ERR 

Error

MDM_NETWORK_SERVICE_NO_SRV 

No Service available

MDM_NETWORK_SERVICE_GSM 

Available service is GSM

MDM_NETWORK_SERVICE_GPRS 

Available service is GPRS

MDM_NETWORK_SERVICE_EGPRS 

Available service is EGPRS

MDM_NETWORK_SERVICE_PCS1900 

Available service is PCS1900 band

MDM_NETWORK_SERVICE_UMTS 

Available service is UMTS

MDM_NETWORK_SERVICE_GSM_AND_UMTS 

Both GSM and UMTS systems available

MDM_NETWORK_SERVICE_HSDPA 

Available service is HSDPA

MDM_NETWORK_SERVICE_IS95A 

Available service is IS95A

MDM_NETWORK_SERVICE_IS95B 

Available service is IS95B

MDM_NETWORK_SERVICE_CDMA_1X 

Available service is CDMA 1X

MDM_NETWORK_SERVICE_EVDO_REV_0 

Available service is EV-DO rev0

MDM_NETWORK_SERVICE_1X_EVDO_REV_0_HYBRID 

Available service is 1X and EV-DO rev0

MDM_NETWORK_SERVICE_EVDO_REV_A 

Available service is EV-DO revA

MDM_NETWORK_SERVICE_1X_EVDO_REV_A_HYBRID 

Available service is 1X and EV-DO revA

MDM_NETWORK_SERVICE_EVDO_REV_B 

Available service is EV-DO revB

MDM_NETWORK_SERVICE_1X_EVDO_REV_B_HYBRID 

Available service is 1X and EV-DO revB

MDM_NETWORK_SERVICE_EVDV 

Available service is EV-DV

MDM_NETWORK_SERVICE_EHRPD 

Available service is EHRPD

MDM_NETWORK_SERVICE_LTE 

Available service is LTE

Definition at line 58 of file device_inventory.h.

Defines roaming status.

Since (Knox_wearable):
1.1.0
Since (Tizen):
2.4.0.4
See also
mdm_history_query_t, mdm_history_add_parameter()
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.

SIM card status.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1 *
See also
mdm_get_sim_state
Enumerator
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

Definition at line 36 of file device_inventory.h.

Enum type to specify the sort order of the result from the extended calls/SMSes history APIs.

Since (Knox_wearable):
1.1.0
Since (Tizen):
2.4.0.4
See also
mdm_history_add_sort_parameter()
Enumerator
MDM_SORT_ORDER_ASCENDING 

Ascending order

MDM_SORT_ORDER_DESCENDING 

Descending order

Definition at line 93 of file device_inventory.h.

Function Documentation

mdm_result_t mdm_clear_call_captured ( void  )

API to clear call information logged on device.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to clear calling capture on the device.
if (ret == MDM_RESULT_SUCCESS) {
//succeeded
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.device
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
Usage of this API is restricted to registered clients only.
See also
mdm_get_incoming_call_captured, mdm_get_outgoing_call_captured
mdm_result_t mdm_clear_sms_captured ( void  )

API to clear the SMS logged on device.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to clear the SMS logged on device.
if (ret == MDM_RESULT_SUCCESS) {
//succeeded
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.device
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
Usage of this API is restricted to registered clients only.
See also
mdm_get_inbound_sms_captured, mdm_get_outbound_sms_captured
mdm_result_t mdm_enable_call_capture ( mdm_status_t  status)

API to enable or disable capture of calling information on device.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this API to enable or disable logging of call information on device.
Parameters
[in]statusMDM_ENABLED to enable calling capture, MDM_DISABLED to disable calling capture.
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.device
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
Usage of this API is restricted to registered clients only.
See also
mdm_is_call_capture_enabled, mdm_get_incoming_call_captured, mdm_get_outgoing_call_captured, mdm_clear_call_captured
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.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An administrator can use this API to enable logging the number of cellular data network bytes received or sent. If the device is managed by multiple administrators, logging is enabled if at least one administrator enables it. Logging is disabled only if all administrators disable it.
Parameters
[in]statusMDM_ENABLED if the device shall store the data call statistics (count amount of data).
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.device
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
Usage of this API is restricted to registered clients only.
See also
mdm_is_data_call_statistics_enabled, mdm_get_bytes_sent_network, mdm_get_bytes_received_network
mdm_result_t mdm_enable_sms_capture ( mdm_status_t  status)

API to enable or disable SMS capture on device.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this API to enable or disable logging of SMS on device.
Parameters
[in]statusMDM_ENABLED to enable SMS logging, MDM_DISABLED to disable it.
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.device
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
Usage of this API is restricted to registered clients only.
See also
mdm_is_sms_capture_enabled, mdm_get_inbound_sms_captured, mdm_get_outbound_sms_captured, mdm_clear_sms_captured
mdm_result_t mdm_enable_wifi_statistics ( mdm_status_t  status)

API used to enable logging of Wi-Fi network statistics on the device.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An administrator can use this API to enable logging the number of Wi-Fi data bytes received or sent. If the device is managed by multiple administrators, logging is enabled if at least one administrator enables it. Logging is disabled only if all administrators disable it.
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.device
Parameters
[in]statusMDM_ENABLED True to enable capture statistics, MDM_DISABLED to disable.
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
Usage of this API is restricted to registered clients only.
See also
mdm_is_wifi_statistics_enabled, mdm_get_bytes_sent_wifi, mdm_get_bytes_received_wifi
mdm_data_t* mdm_get_available_capacity_external ( void  )

API to get the available capacity of the external SD card in bytes.

Attention
Deprecated Since Knox_wearable 2.3.0. Use storage_get_external_memory_size instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to get the available capacity of the external SD card
mdm_data_t *lp_data = NULL;
if (lp_data) {
char *data = (char *)lp_data->data;
if(data != NULL) {
printf("device name : %s\n", data);
}
mdm_free_data(lp_data);
}
Returns
Capacity on success, NULL pointer on error
See also
mdm_get_total_capacity_external
mdm_data_t* mdm_get_available_capacity_internal ( void  )

API to get the available capacity of the internal phone memory in bytes.

Attention
Deprecated Since Knox_wearable 2.3.0. Use storage_get_internal_memory_size instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to get the available capacity of the internal phone memory.
mdm_data_t *lp_data = NULL;
if (lp_data) {
char *data = (char *)lp_data->data;
if(data != NULL) {
printf("device name : %s\n", data);
}
mdm_free_data(lp_data);
}
Returns
Capacity on success, NULL pointer on error
See also
mdm_get_total_capacity_internal
mdm_result_t mdm_get_available_ram_memory ( int *  memory)

API to get the value of available RAM.

Attention
Deprecated Since Knox_wearable 2.3.0. Use runtime_info_get_system_memory_info instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Parameters
[out]memoryThe size of the available RAM memory in MB
Usage:
An administrator can use this API to obtain the value of available RAM. This reading considers as free memory the memory reported by the kernel cached memory, but does not consider services, processes, and reserved memory (unlike the value obtained from Settings application statistics).
int mem;
if (ret == MDM_RESULT_SUCCESS) {
printf("Total Ram Memory : %d\n", mem);
}
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
See also
mdm_get_total_ram_memory
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.

Attention
Deprecated Since Knox_wearable 2.3.0. Use contacts_list_get_current_record_p instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to get the number of blocked calls on the device
int count;
if (ret == MDM_RESULT_SUCCESS) {
//locked
printf("Count : %d\n", count);
}
Parameters
[out]countValue of blocked calls count
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
See also
mdm_get_success_calls_count, mdm_get_missed_calls_count, mdm_get_rejected_calls_count, mdm_reset_calls_count
mdm_data_t* mdm_get_bluetooth_address ( void  )

API to check the hardware address of the local Bluetooth adapter.

Attention
Deprecated Since Knox_wearable 2.3.0. Use bt_adapter_get_address instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can get the Bluetooth hardware address as a formatted String. For example, "00:11:22:AA:BB:CC".
if (lp_data) {
char *addr = (char *)lp_data->data;
if(addr != NULL) {
printf("sim serail number : %s", device_id);
}
// free after use
mdm_free_data(lp_data);
} else {
// Failure
}
Returns
mdm_data_t * :The hardware address of the local Bluetooth adapter or NULL if fail.
mdm_status_t mdm_get_bluetooth_mode_status ( void  )

API to get the current state of the local Bluetooth adapter.

Attention
Deprecated Since Knox_wearable 2.3.0. Use bt_adapter_get_state instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can check whether the current Bluetooth adapter is activated or not, and take appropriate action based on enterprise policy.
if (status != MDM_STATUS_ERROR) {
if (status == MDM_ENABLED){
// Bluetooth is activated
} else if (status == MDM_DISABLED) {
// Bluetooth is deactivated
}
} else {
//ERROR: fail to get the status.
}
Returns
mdm_status_t : Current state of Bluetooth
Return values
MDM_ENABLEDBluetooth is activated
MDM_DISABLEDBluetooth is deactivated
MDM_STATUS_ERRORFailure
See also
mdm_status_t
mdm_result_t mdm_get_bytes_received_network ( long long *  bytes)

API to retrieve the amount of bytes received from network connection.

Attention
Deprecated Since Knox_wearable 2.3.0. Use connection_get_statistics instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to get the amount of bytes received from cellular network connection.
long long bytes;
if (ret == MDM_RESULT_SUCCESS) {
//Success
}
Parameters
[out]bytesThe amount of bytes received from network connection.
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
See also
mdm_enable_data_call_statistics, mdm_is_data_call_statistics_enabled, mdm_get_bytes_sent_network
mdm_result_t mdm_get_bytes_received_wifi ( long long *  bytes)

API to retrieve the amount of bytes received from Wi-Fi connection.

Attention
Deprecated Since Knox_wearable 2.3.0. Use connection_get_statistics instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to get the amount of bytes received from Wi-Fi connection.
long long bytes;
if (ret == MDM_RESULT_SUCCESS) {
//Success
}
Parameters
[out]bytesThe amount of bytes received from Wi-Fi connection
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
See also
mdm_enable_wifi_statistics, mdm_is_wifi_statistics_enabled, mdm_get_bytes_sent_wifi
mdm_result_t mdm_get_bytes_sent_network ( long long *  bytes)

API to retrieve the amount of bytes sent through network connection.

Attention
Deprecated Since Knox_wearable 2.3.0. Use connection_get_statistics instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to get the amount of bytes sent to cellular network connection.
long long bytes;
if (ret == MDM_RESULT_SUCCESS) {
//Success
}
Parameters
[out]bytesThe amount of bytes sent through network connection.
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
See also
mdm_enable_data_call_statistics, mdm_is_data_call_statistics_enabled, mdm_get_bytes_received_network
mdm_result_t mdm_get_bytes_sent_wifi ( long long *  bytes)

API to retrieve the amount of bytes sent through Wi-Fi connection.

Attention
Deprecated Since Knox_wearable 2.3.0. Use connection_get_statistics instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to get the amount of bytes sent to Wi-Fi connection.
long long bytes;
if (ret == MDM_RESULT_SUCCESS) {
//Success
}
Parameters
[out]bytesThe amount of bytes sent through Wi-Fi connection
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
See also
mdm_enable_wifi_statistics, mdm_is_wifi_statistics_enabled, mdm_get_bytes_received_wifi
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.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can get the unique device ID. For example, the IMEI for GSM and the MEID or ESN for CDMA phones. Returns null if device ID is not available.
if (lp_data) {
char *device_id = (char *)lp_data->data;
if(device_id != NULL) {
printf("device id : %s", device_id);
}
// free after use
mdm_free_data(lp_data);
} else {
// Failure or device ID is not available
}
Returns
mdm_data_t * : The unique device ID on success, NULL on error or if the device ID is not available
mdm_data_t* mdm_get_device_maker ( void  )

API to get the OEM of device.

Attention
Deprecated Since Knox_wearable 2.3.0. Use system_info_get_platform_string instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to get the OEM of the device.
mdm_data_t *lp_data = NULL;
if (lp_data) {
char *data = (char *)lp_data->data;
if(data != NULL) {
printf("Device Platform : %s\n", data);
}
mdm_free_data(lp_data);
}
Returns
OEM as string. If device manufacturer is set it will be returned, otherwise NULL is returned.
mdm_data_t* mdm_get_device_name ( void  )

API to get the name of device.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by the admin to the get name of device.
mdm_data_t *lp_data = NULL;
lp_data = mdm_get_device_name();
if (lp_data) {
char *data = (char *)lp_data->data;
if(data != NULL) {
printf("device name : %s\n", data);
}
mdm_free_data(lp_data);
}
Returns
Device name on success, NULL pointer on error
mdm_data_t* mdm_get_device_platform ( void  )

API to get the platform of the device.

Attention
Deprecated Since Knox_wearable 2.3.0. Use system_info_get_platform_string instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to get the platform of the device.
mdm_data_t *lp_data = NULL;
if (lp_data) {
char *data = (char *)lp_data->data;
if(data != NULL) {
printf("Device Platform : %s\n", data);
}
mdm_free_data(lp_data);
}
Returns
Platform as string. If device platform is set, it will be returned, otherwise NULL is returned.
mdm_data_t* mdm_get_device_processor_type ( void  )

API to get the processor type of the device.

Attention
Deprecated Since Knox_wearable 2.3.0. Use system_info_get_platform_string instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to get the processor type of the device
mdm_data_t *lp_data = NULL;
if (lp_data) {
char *data = (char *)lp_data->data;
if(data != NULL) {
printf("Processor Type : %s\n", data);
}
mdm_free_data(lp_data);
}
Returns
Processor type as string. If success, processor type is returned, otherwie returns NULL.
mdm_data_t* mdm_get_device_serial_number ( void  )

API to get the device's serial number.

Since (Knox_wearable):
2.3.1
Since (Tizen):
4.0.0.4
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
The admin can retrieve the serial number of a device that does not have an IMEI. You can use this serial number to identify devices in Knox Cloud Services, like Knox Configure or Knox Mobile Enrollment.
mdm_data_t *lp_data = NULL;
if (lp_data) {
char *serial_number = (char *)lp_data->data;
if(serial_number != NULL) {
printf("device serial number : %s", serial_number);
}
// free after use
mdm_free_data(lp_data);
}
Returns
String value of serial number on success, NULL on fail.
mdm_data_t* mdm_get_inbound_sms_captured ( void  )

API to retrieve the In-bound SMSs captured on device.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to get the In-bound SMSs captured on the device. Each String entry in the list will be of the following format "From:XXX - TimeStamp:XXX - Body:XXX"
if (lp_data) {
if(lp_data->data){
GList *current = g_list_first((GList *)lp_data->data);
while(current && current->data) {
char *captured = (char *)current->data;
printf("%s\n", captured);
current = g_list_next(current);
}
}
mdm_free_data(lp_data);
}
Returns
A list of all In-bound SMSs captured on device if set, NULL if failed.
See also
mdm_enable_sms_capture, mdm_is_sms_capture_enabled, mdm_get_outbound_sms_captured, mdm_clear_sms_captured
mdm_data_t* mdm_get_incoming_call_captured ( void  )

API to retrieve incoming call information captured on device.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used to get incoming call information captured on device. Each string entry in the list will be of the following format "From:XXX - TimeStamp:XXX - Duration:XXX - Status:XXX"
if (lp_data) {
if(lp_data->data){
GList *current = g_list_first((GList *)lp_data->data);
while(current && current->data) {
char *captured = (char *)current->data;
printf("%s\n", captured);
current = g_list_next(current);
}
}
mdm_free_data(lp_data);
}
Returns
A list of incoming calls information captured on device, NULL if no incoming calls information captured set.
See also
mdm_enable_call_capture, mdm_is_call_capture_enabled, mdm_get_outgoing_call_captured, mdm_clear_call_captured
mdm_result_t mdm_get_missed_calls_count ( int *  count)

API to retrieve the number of missed calls on the device.

Attention
Deprecated Since Knox_wearable 2.3.0. Use contacts_list_get_current_record_p instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to get the number of missed calls on the device
int count;
if (ret == MDM_RESULT_SUCCESS) {
//locked
printf("Count : %d\n", count);
}
Parameters
[out]countValue of missed calls count
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
See also
mdm_get_success_calls_count, mdm_get_rejected_calls_count, mdm_get_blocked_calls_count, mdm_reset_calls_count
mdm_data_t* mdm_get_model_name ( void  )

API to get the model name of the device.

Attention
Deprecated Since Knox_wearable 2.3.0. Use system_info_get_platform_string instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to get the model name of device
mdm_data_t *lp_data = NULL;
lp_data = mdm_get_model_name();
if (lp_data) {
char *data = (char *)lp_data->data;
if(data != NULL) {
printf("device name : %s\n", data);
}
mdm_free_data(lp_data);
}
Returns
model number on success, NULL pointer on error
mdm_data_t* mdm_get_modem_firmware ( void  )

API to get the model firmware version of the device.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to get the firmware version of the device
mdm_data_t *lp_data = NULL;
if (lp_data) {
char *data = (char *)lp_data->data;
if(data != NULL) {
printf("firmware version : %s\n", data);
}
mdm_free_data(lp_data);
}
Returns
Firmware version as string. If modem version is set, then actual modem version will be returned, otherwise null value will be returned.
mdm_data_t* mdm_get_network_operator ( void  )

API to get the numeric name (MCC+MNC) of the current registered network operator.

Attention
Deprecated Since Knox_wearable 2.3.0. Use telephony_sim_get_operator instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can get the numeric name (MCC+MNC) of the current registered network operator. The numeric name of the network operator will be available only if the user's device is registered to a network.
mdm_data_t *lp_data = NULL;
if (lp_data) {
char *operator_number = (char *)lp_data->data;
if(no != NULL) {
printf("network operator : %s", operator_number);
}
// free after use
mdm_free_data(lp_data);
}
Returns
mdm_data_t * : The numeric name (MCC+MNC) of the network operator on success, NULL on error, or if the device is not registered to any network.
See also
mdm_get_network_operator_name
mdm_data_t* mdm_get_network_operator_name ( void  )

API to get the alphanumeric name of current registered network operator.

Attention
Deprecated Since Knox_wearable 2.3.0. Use telephony_network_get_network_name instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can get the alphanumeric name of the current registered network operator. The alphanumeric name of the network operator will be available only if the device is registered to a network.
mdm_data_t *lp_data = NULL;
if (lp_data) {
char *operator_name = (char *)lp_data->data;
if(name != NULL) {
printf("network operator name : %s", operator_name);
}
// free after use
mdm_free_data(lp_data);
}
Returns
mdm_data_t * : The alphanumeric name of the network operator on success, NULL on error, or if the device is not registered to any network.
See also
mdm_get_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.

Attention
Deprecated Since Knox_wearable 2.3.0. Use telephony_network_get_type instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can check the radio technology (Network Type) that is currently being used on the device for data transmission.
network_type = mdm_get_network_type();
if (network_type != MDM_NETWORK_SERVICE_ERR) {
// Success
} else {
// Failure
}
Returns
mdm_network_service_type_t : The network type on success, MDM_NETWORK_SERVICE_ERR on failure.
Return values
MDM_NETWORK_SERVICE_ERRError
MDM_NETWORK_SERVICE_NO_SRVNo Service available
MDM_NETWORK_SERVICE_GSMGSM
MDM_NETWORK_SERVICE_GPRSGPRS
MDM_NETWORK_SERVICE_EGPRSEGPRS
MDM_NETWORK_SERVICE_PCS1900PCS1900
MDM_NETWORK_SERVICE_UMTSUMTS
MDM_NETWORK_SERVICE_GSM_AND_UMTSGSM/UMTS
MDM_NETWORK_SERVICE_HSDPAHSDPA
MDM_NETWORK_SERVICE_IS95AIS95A
MDM_NETWORK_SERVICE_IS95BIS95B
MDM_NETWORK_SERVICE_CDMA_1XCDMA 1X
MDM_NETWORK_SERVICE_EVDO_REV_0EV-DO rev0
MDM_NETWORK_SERVICE_1X_EVDO_REV_0_HYBRID1X/EV-DO rev0
MDM_NETWORK_SERVICE_EVDO_REV_AEV-DO revA
MDM_NETWORK_SERVICE_1X_EVDO_REV_A_HYBRID1X/EV-DO revA
MDM_NETWORK_SERVICE_EVDO_REV_BEV-DO revB
MDM_NETWORK_SERVICE_1X_EVDO_REV_B_HYBRID1X/EV-DO revB
MDM_NETWORK_SERVICE_EVDVEV-DV
MDM_NETWORK_SERVICE_EHRPDEHRPD
MDM_NETWORK_SERVICE_LTELTE
See also
mdm_network_service_type_t
mdm_data_t* mdm_get_outbound_sms_captured ( void  )

API to retrieve the Out-bound SMSs captured on device.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to get the Out-bound SMSs captured on device. Each String entry in the list will be of the following format "To:XXX - TimeStamp:XXX - Body:XXX"
if (lp_data) {
if(lp_data->data){
GList *current = g_list_first((GList *)lp_data->data);
while(current && current->data) {
char *captured = (char *)current->data;
printf("%s\n", captured);
current = g_list_next(current);
}
}
mdm_free_data(lp_data);
}
Returns
A list of all In-bound SMSs captured on device if set, NULL if failed.
See also
mdm_enable_sms_capture, mdm_is_sms_capture_enabled, mdm_get_inbound_sms_captured, mdm_clear_sms_captured
mdm_data_t* mdm_get_outgoing_call_captured ( void  )

API to retrieve outgoing call information captured on device.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used to get outgoing call information captured on device. Each String entry in the list will be of the following format "To:XXX - TimeStamp:XXX - Duration:XXX - Status:XXX"
if (lp_data) {
if(lp_data->data){
GList *current = g_list_first((GList *)lp_data->data);
while(current && current->data) {
char *captured = (char *)current->data;
printf("%s\n", captured);
current = g_list_next(current);
}
}
mdm_free_data(lp_data);
}
Returns
A list of outgoing calls information captured on device, null if no outgoing calls information captured set.
See also
mdm_enable_call_capture, mdm_is_call_capture_enabled, mdm_get_incoming_call_captured, mdm_clear_call_captured
mdm_data_t* mdm_get_platform_version ( void  )

API to get the Platform Version of the device.

Attention
Deprecated Since Knox_wearable 2.3.0. Use system_info_get_platform_string instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to get the Platform Version of the device.
mdm_data_t *lp_data = NULL;
if (lp_data) {
char *data = (char *)lp_data->data;
if(data != NULL) {
printf("device name : %s\n", data);
}
mdm_free_data(lp_data);
}
Returns
Platform version on success, NULL pointer on error
mdm_result_t mdm_get_rejected_calls_count ( int *  count)

API to retrieve the number of rejected calls on the device.

Attention
Deprecated Since Knox_wearable 2.3.0. Use contacts_list_get_current_record_p instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to get the number of rejected calls on the device
int count;
if (ret == MDM_RESULT_SUCCESS) {
//locked
printf("Count : %d\n", count);
}
Parameters
[out]countValue of rejected calls count
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
See also
mdm_get_success_calls_count, mdm_get_missed_calls_count, mdm_get_blocked_calls_count, mdm_reset_calls_count
mdm_data_t* mdm_get_sim_country_iso ( void  )

API to get the standardized (ISO) country code of the SIM provider.

Attention
Deprecated Since Knox_wearable 2.3.0. Use telephony_network_get_mcc instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can get the standardized (ISO) country code of the SIM provider.
mdm_data_t *lp_data = NULL;
if (lp_data) {
char *sim_mcc_iso = (char *)lp_data->data;
if(sim_iso != NULL) {
printf("sim country iso : %s", sim_mcc_iso);
}
// free after use
mdm_free_data(lp_data);
}
Returns
mdm_data_t * :The standardized (ISO) country code of the SIM operator on success, NULL on error.
mdm_data_t* mdm_get_sim_operator ( void  )

API to get the numeric name (MCC+MNC) of the SIM operator.

Attention
Deprecated Since Knox_wearable 2.3.0. Use telephony_sim_get_operator instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can get the MCC+MNC (mobile country code + mobile network code) of the SIM operator. Equals to 5 or 6 decimal digits.
mdm_data_t *lp_data = NULL;
if (lp_data) {
char *sim_op = (char *)lp_data->data;
if(sim_op != NULL) {
printf("sim operator : %s", sim_op);
}
// free after use
mdm_free_data(lp_data);
}
Returns
mdm_data_t * :The numeric name (MCC+MNC) of the SIM operator on success, NULL on error.
See also
mdm_get_sim_operator_name
mdm_data_t* mdm_get_sim_operator_name ( void  )

API to get the Service Provider Name (SPN) if SIM is available on the device.

Attention
Deprecated Since Knox_wearable 2.3.0. Use telephony_sim_get_operator instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can get the Service Provider Name (SPN) if available.
Note
Some SIM types don't offer SPN. Regarding the 3GPP specification, this value is optional. If SPN is not stored on the SIM card this function will return NULL.
mdm_data_t *lp_data = NULL;
if (lp_data && lp_data->data) {
char *name = (char *)lp_data->data;
if(name != NULL) {
printf("SIM operator name: %s\n", name);
} else {
printf("SIM operator name is unavailable\n");
}
// free after use
mdm_free_data(lp_data);
}
Returns
mdm_data_t * : The Service Provider Name (SPN) on success, NULL on error, or if the SPN is not available
See also
mdm_get_sim_operator
mdm_data_t* mdm_get_sim_serial_number ( void  )

API to get the ICCID of the SIM card in the device.

Attention
Deprecated Since Knox_wearable 2.3.0. Use telephony_sim_get_icc_id instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can get the Integrated Circuit Card ID (ICCID) of the SIM card, if applicable. Returns null if it is unavailable.
if (lp_data) {
char *sim_iccid = (char *)lp_data->data;
if(device_id != NULL) {
printf("sim serial number : %s", sim_iccid);
}
// free after use
mdm_free_data(lp_data);
} else {
// Failure or SIM ICCID is not available
}
Returns
mdm_data_t * : The ICCID of the SIM card on success, NULL on error or if the ICCID is not available
mdm_sim_status_t mdm_get_sim_state ( void  )

API to the status of the device SIM card.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can get the status of the device SIM card.
if (sim_status != MDM_SIM_STATUS_ERROR) {
// Failure
} else {
// Success
// Use sim_status value
}
Returns
mdm_sim_status_t : The status of the device SIM card on success. Returns MDM_SIM_STATUS_ERROR on failure.
Return values
MDM_SIM_STATUS_ERRORError
MDM_SIM_STATUS_CARD_ERRORBad card/On the fly SIM gone bad
MDM_SIM_STATUS_CARD_NOT_PRESENTCard not present
MDM_SIM_STATUS_SIM_INITIALIZINGSIM is in Initializing state
MDM_SIM_STATUS_SIM_INIT_COMPLETEDSIM Initialization OK
MDM_SIM_STATUS_SIM_PIN_REQUIREDPIN required state
MDM_SIM_STATUS_SIM_PUK_REQUIREDPUK required state
MDM_SIM_STATUS_CARD_BLOCKEDPIN/PUK blocked(permanently blocked- All the attempts for PIN/PUK failed)
MDM_SIM_STATUS_SIM_NCK_REQUIREDNetwork Control Key required state
MDM_SIM_STATUS_SIM_NSCK_REQUIREDNetwork Subset Control Key required state
MDM_SIM_STATUS_SIM_SPCK_REQUIREDService Provider Control Key required state
MDM_SIM_STATUS_SIM_CCK_REQUIREDCorporate Control Key required state
MDM_SIM_STATUS_CARD_REMOVEDCard removed
MDM_SIM_STATUS_SIM_LOCK_REQUIREDPH-SIM (Phone-SIM) locked state
See also
mdm_sim_status_t
mdm_data_t* mdm_get_subscriber_number ( void  )

API to get phone number associated with the device.

Attention
Deprecated Since Knox_wearable 2.3.0. Use telephony_sim_get_subscriber_number instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can get the phone number associated with the first line of the device. For example, the MSISDN for a GSM phone. Returns null if it is unavailable.
if (lp_data) {
char *phone_number = (char *)lp_data->data;
if(name != NULL) {
printf("subscriber number : %s", phone_number);
}
// free after use
mdm_free_data(lp_data);
}
Returns
mdm_data_t * : The phone number associated with the device on success, NULL on error, or if the phone number is unavailable
mdm_result_t mdm_get_success_calls_count ( int *  count)
Attention
Deprecated Since Knox_wearable 2.3.0. Use contacts_list_get_current_record_p instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to get the number of calls completed successfully on the device.
int count;
if (ret == MDM_RESULT_SUCCESS) {
//locked
printf("Count : %d\n", count);
}
Parameters
[out]countValue of success call count
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
See also
mdm_get_missed_calls_count, mdm_get_rejected_calls_count, mdm_get_blocked_calls_count, mdm_reset_calls_count
mdm_data_t* mdm_get_total_capacity_external ( void  )

API to get the total capacity in bytes of the external SD card.

Attention
Deprecated Since Knox_wearable 2.3.0. Use storage_get_external_memory_size instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used to get the total capacity of the external SD card
mdm_data_t *lp_data = NULL;
if (lp_data) {
char *data = (char *)lp_data->data;
if(data != NULL) {
printf("device name : %s\n", data);
}
mdm_free_data(lp_data);
}
Returns
Capacity on success, NULL pointer on error
See also
mdm_get_available_capacity_external
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.

Attention
Deprecated Since Knox_wearable 2.3.0. Use storage_get_internal_memory_size instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to get the total capacity of the internal phone memory.
mdm_data_t *lp_data = NULL;
if (lp_data) {
char *data = (char *)lp_data->data;
if(data != NULL) {
printf("Total capacity internal : %s\n", data);
}
mdm_free_data(lp_data);
}
Returns
Capacity on success, NULL pointer on error
See also
mdm_get_available_capacity_internal
mdm_result_t mdm_get_total_ram_memory ( int *  memory)

API to get total RAM memory on the device.

Attention
Deprecated Since Knox_wearable 2.3.0. Use runtime_info_get_system_memory_info instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Parameters
[out]memoryThe size of the total RAM memory in MB
Usage: This is given by /proc/meminfo total memory field.
This reading is different from Settings application statistics. It uses information given by the kernel for total memory and does not consider services, processes and reserved memory
int mem;
if (ret == MDM_RESULT_SUCCESS) {
printf("Total Ram Memory : %d\n", mem);
}
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
See also
mdm_get_available_ram_memory
mdm_data_t* mdm_get_wifi_mac_address ( void  )

API to get the Wi-Fi MAC address of the device.

Attention
Deprecated Since Knox_wearable 2.3.0. Use wifi_manager_get_mac_address instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can get the Wi-Fi MAC address of the device.
mdm_data_t *lp_data = NULL;
if (lp_data) {
char *addr = (char *)lp_data->data;
if(addr != NULL) {
printf("MAC address : %s\n", addr );
}
// free after use
mdm_free_data(lp_data);
}
Returns
The Wi-Fi MAC address of the device on success, NULL on error
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().

Since (Knox_wearable):
1.1.0
Since (Tizen):
2.4.0.4
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:

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.

if ( context ) {
// In this example fake function return_seconds_since_epoch_from_string() are used
// just to make the example more clear. Replace it with any code which returns
// time as you need in seconds since epoch.
query.date = return_seconds_since_epoch_from_string("2016-02-16 1:00:00");
mdm_history_add_parameter(context, &query);
query.date = return_seconds_since_epoch_from_string("2016-02-16 23:00:00");
mdm_history_add_parameter(context, &query);
// After adding 2 parameters, here context is limited to history events which happened
// after 2016-02-16 1:00:00 (inclusive) and before 2016-02-16 23:00:00 (inclusive).
// Here you may add more parameter or call mdm_history_get_next() or mdm_history_remove().
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.device
Parameters
[in]ctxPointer to history context allocated by mdm_history_context_new().
[in]query_parameterParameter used to limit amount of returned/removed data.
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSdata parameter added.
MDM_RESULT_FAILSome failure occurred (e.g. could not connect to mdm-server).
MDM_RESULT_NOT_SUPPORTEDThis API is not supported.
MDM_RESULT_INVALID_PARAMInvalid parameter passed.
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
See also
mdm_history_context_new, mdm_history_context_free, mdm_history_get_next, mdm_history_remove, mdm_history_add_sort_parameter, mdm_history_info_t, mdm_history_query_t
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.

Since (Knox_wearable):
1.1.0
Since (Tizen):
2.4.0.4
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:

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.

if ( context ) {
// You may add data parameters here.
// Here, context defines ascending sort order by record_id.
// Here, context defines ascending sort order by record id, then ascending by event time.
// In terms of sorting, meaning of MDM_HISTORY_PARAMETER_EVENT_START_RECORD_ID is the same as
// so setting MDM_HISTORY_PARAMETER_EVENT_START_RECORD_ID overwrites setting of
// Here, context defines ascending sort order by event time then descending by record id.
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.device
Parameters
[in]ctxPointer to history context.
[in]parameterOne of mdm_history_parameter_t value which defines type of sort.
[in]orderOne of mdm_sort_order_t which defines order (ascending or descending).
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSsort parameter added.
MDM_RESULT_FAILSome failure occurred (e.g. could not connect to mdm-server).
MDM_RESULT_NOT_SUPPORTEDThis api is not supported.
MDM_RESULT_INVALID_PARAMInvalid parameter passed.
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
See also
mdm_history_add_parameter
mdm_result_t mdm_history_context_free ( mdm_history_context_t ctx)

Frees history context.

Since (Knox_wearable):
1.1.0
Since (Tizen):
2.4.0.4
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:

Frees all resources allocated for the context. Any allocated context must be freed after use.

if (ret == MDM_RESULT_SUCCESS)
{
if (context != NULL) {
// do some action using context
}
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.device
Parameters
[in]ctxPointer to a history context.
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSContext successfully freed.
MDM_RESULT_FAILSome failure occurred (e.g. not connected to mdm-server) but context on client side has been freed.
MDM_RESULT_NOT_SUPPORTEDThis API is not supported. Context remains untouched.
MDM_RESULT_INVALID_PARAMInvalid 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_DENIEDThe application does not have the privilege to call this function but local part of a context is freed.
See also
mdm_history_context_new
mdm_history_context_t* mdm_history_context_new ( void  )

Creates new history context.

Since (Knox_wearable):
1.1.0
Since (Tizen):
2.4.0.4
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:

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.

if (ret == MDM_RESULT_SUCCESS)
{
if (context != NULL) {
// do some action using context
}
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.device
Returns
mdm_history_context_t * : The fetch context on success, NULL on error.
See also
mdm_history_context_free, mdm_history_get_next, mdm_history_remove, mdm_history_add_parameter, mdm_history_add_sort_parameter
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.

Since (Knox_wearable):
1.1.0
Since (Tizen):
2.4.0.4
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:

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.

if ( context ) {
// add data parameters here if needed
// add sort parameters here if needed
mdm_data_t* pdata = mdm_history_get_next(context, 5);
while(pdata) {
if ( pdata->data ) {
GList *plist = g_list_first((GList*)pdata->data);
for(; plist; plist = g_list_next(plist)) {
mdm_history_info_t* info = (mdm_history_info_t*)plist->data;
// Do something with info
// NOTE that in this example mdm_data (and plist with its elements) is freed
// at the end of a loop.
}//for
} else {
mdm_free_data(pdata);
break;
}
mdm_free_data(pdata);
pdata = mdm_history_get_next(context, 5);
}
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.device
Parameters
[in]ctxPointer to a history context.
[in]window_sizeThe number of structures that will be returned in single request.
Returns
mdm_data_t * : Structure with requested data or NULL in case of serious errors.
See also
mdm_history_context_free, mdm_history_get_next, mdm_history_remove, mdm_history_add_parameter, mdm_history_add_sort_parameter, mdm_history_info_t
mdm_data_t* mdm_history_get_purge_status ( void  )

This API returns automatic purge status.

Since (Knox_wearable):
1.1.0
Since (Tizen):
2.4.0.4
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:

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.

Returns
mdm_data_t* : Where mdm_data_t::data is a pointer to mdm_history_purge_status_t.
See also
mdm_history_set_purge_interval, mdm_history_purge_status_t
mdm_result_t mdm_history_remove ( mdm_history_context_t ctx)

Removes records form internal call/SMS database.

Since (Knox_wearable):
1.1.0
Since (Tizen):
2.4.0.4
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:

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.

if ( context ) {
// add data parameters here if needed
// you may add sort parameters here but mdm_history_remove() will ignore them.
// you may call mdm_history_get_next() here if needed.
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.device
Parameters
[in]ctxPointer to a history context.
Returns
mdm_result_t : MDM_RESULT_SUCCESS if history successfully removed, otherwise an error value
Return values
MDM_RESULT_SUCCESShistory has been removed.
MDM_RESULT_FAILSome failure occurred (e.g. could not connect to mdm-server).
MDM_RESULT_NOT_SUPPORTEDThis api is not supported.
MDM_RESULT_INVALID_PARAMInvalid parameter passed.
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
See also
mdm_history_context_free, mdm_history_get_next, mdm_history_remove, mdm_history_add_parameter, mdm_history_add_sort_parameter, mdm_history_info_t
mdm_result_t mdm_history_set_purge_interval ( uint64_t  interval)

Enables automatic removal of events older than specified time.

Since (Knox_wearable):
1.1.0
Since (Tizen):
2.4.0.4
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:

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()).

Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.device
Parameters
[in]intervalDetermines how old events stay stored in database. Value in seconds. Setting 0 will disable automatic database cleanups.
Returns
mdm_result_t : MDM_RESULT_SUCCESS if purge interval set successfully, otherwise an error value
Return values
MDM_RESULT_SUCCESSpurge interval set successfully.
MDM_RESULT_FAILSome failure occurred (e.g. could not connect to mdm-server).
MDM_RESULT_NOT_SUPPORTEDThis api is not supported.
MDM_RESULT_INVALID_PARAMInvalid parameter passed.
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
See also
mdm_history_get_purge_status
mdm_status_t mdm_is_bluetooth_supported ( void  )

API to check if Bluetooth capability is supported on the device or not.

Attention
Deprecated Since Knox_wearable 2.3.0. Use system_info_get_platform_bool instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can check the status of the default local bluetooth adapter on the device.
if (status != MDM_STATUS_ERROR) {
if (status == MDM_TRUE) {
//TRUE: Bluetooth is suported on the device
} else if (status == MDM_FALSE) {
//FALSE: Bluetooth is not suported on the device
}
} else {
//ERROR: fail to get the status.
}
Returns
mdm_status_t : Whether Bluetooth is supported
Return values
MDM_TRUEBluetoooth capability is supported on the device
MDM_FALSEBluetoooth capability is not supported
MDM_STATUS_ERRORFailure
See also
mdm_status_t
mdm_status_t mdm_is_call_capture_enabled ( void  )

API to check whether call logging is enabled or disabled on device.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to check whether calling capture is enabled or disabled on device.
if (ret == MDM_ENABLED) {
//Enable
}
Returns
mdm_status_t : Whether calling capture is enabled
Return values
MDM_ENABLEDCalling capture is enabled
MDM_DISABLEDCalling capture is disabled
MDM_STATUS_ERRORFail
See also
mdm_enable_call_capture, mdm_get_incoming_call_captured, mdm_get_outgoing_call_captured, mdm_clear_call_captured
mdm_status_t mdm_is_data_call_statistics_enabled ( void  )

API to determine whether cellular data network statistics logging is enabled.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An administrator can use this API to verify whether carrier data statistics logging is enabled on the device. For a device managed by multiple administrators, logging is enabled if at least one administrator has enabled it. Logging is disabled only if all administrators have disabled logging.
Returns
mdm_status_t : Whether cellural data network statistics are enabled
Return values
MDM_TRUECellural data network statistics are enabled
MDM_FALSECellural data network statistics are disabled
See also
mdm_enable_data_call_statistics, mdm_get_bytes_sent_network, mdm_get_bytes_received_network
mdm_status_t mdm_is_device_locked ( void  )

Checks if device is currently locked.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to check if the device is locked or not.
if (ret == MDM_TRUE) {
//locked
}
Returns
mdm_status_t : Whether device is currently locked
Return values
MDM_TRUEDevice is locked
MDM_FALSEDevice is unlocked
See also
mdm_lock_now
mdm_status_t mdm_is_device_secure ( void  )

API to get the device status(secure or not)

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to check if the device is secure or not. In order to secure the device admin can silently set the password/pin.
if (ret == MDM_TRUE) {
// Secure
} else {
// Not secure
}
Returns
mdm_status_t : Device status
Return values
MDM_TRUEDevice has some protection
MDM_FALSEDevice doesn't have any protection
mdm_status_t mdm_is_sms_capture_enabled ( void  )

API to check whether SMS capture is enabled or disabled on device.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to check whether SMS capture is enabled or disabled on device.
if (ret == MDM_ENABLED) {
//Enable
}
Returns
mdm_status_t : Whether capturing SMS is enabled
Return values
MDM_ENABLEDCapturing SMS is enabled
MDM_DISABLEDCapturing SMS is disabled
MDM_STATUS_ERRORFail
See also
mdm_enable_sms_capture, mdm_get_inbound_sms_captured, mdm_get_outbound_sms_captured, mdm_clear_sms_captured
mdm_status_t mdm_is_wifi_statistics_enabled ( void  )

API to determine if Wi-Fi statistics logging is enabled or disabled.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
An administrator can use this API to determine whether Wi-Fi statistics logging is enabled or disabled. For a device managed by multiple administrators, logging is enabled if at least one administrator has enabled it. Logging is disabled only if all administrators have disabled logging.
Returns
mdm_status_t : Whether Wi-Fi is enabled
Return values
MDM_ENABLEDWi-Fi statistics is enabled
MDM_DISABLEDWi-Fi statistics is disabled
See also
mdm_enable_wifi_statistics, mdm_get_bytes_sent_wifi, mdm_get_bytes_received_wifi
mdm_result_t mdm_reset_calls_count ( void  )

API to reset the counters related to calls count.

Attention
Deprecated Since Knox_wearable 2.3.0. Use contacts_phone_log_reset_statistics_with_slot_no instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to reset the counters related to calls count.
if (ret == MDM_RESULT_SUCCESS) {
//Success
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.device
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
Usage of this API is restricted to registered clients only.
See also
mdm_get_success_calls_count, mdm_get_missed_calls_count, mdm_get_rejected_calls_count, mdm_get_blocked_calls_count
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.

Attention
Deprecated Since Knox_wearable 2.3.0. Use connection_reset_statistics instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.2.1.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Used by admin to reset the statistics of carrier network and Wi-Fi data usage.
time_t seconds;
if (ret == MDM_RESULT_SUCCESS) {
//Success
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.device
Returns
mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
Permission:
Usage of this API is restricted to registered clients only.
See also
mdm_get_bytes_sent_wifi, mdm_get_bytes_received_wifi, mdm_get_bytes_sent_network, mdm_get_bytes_received_network