Knox Tizen Wearable SDK
Wi-Fi policy group

Wi-Fi policy group provides policies for Wi-Fi control. More...

Data Structures

struct  dhcp_info_t
 DHCP Information. More...
 
struct  wifi_info_t
 Wi-Fi Information. More...
 
struct  wifi_private_key_info_t
 Wi-Fi private key Information. More...
 
struct  mdm_wifi_open_sim_aka_data_t
 
struct  mdm_wifi_wep_wpa_data_t
 Struct to store AP password. More...
 
struct  mdm_wifi_eap_peap_ttls_data_t
 Settings to set for SECURITY_LEVEL_EAP_PEAP and SECURITY_LEVEL_EAP_TTLS. More...
 
struct  mdm_wifi_eap_tls_data_t
 Settings to set for SECURITY_LEVEL_EAP_TLS. More...
 
struct  mdm_wifi_ap_config_t
 Access point configuration. More...
 
struct  mdm_wifi_configuration_t
 Wi-Fi configuration type. More...
 

Enumerations

Functions

mdm_result_t mdm_set_allow_wifi (mdm_status_t state)
 API to allow or restrict the use of Wi-Fi. More...
 
mdm_status_t mdm_get_allow_wifi (void)
 API to check if Wi-Fi use is allowed or restricted. More...
 
mdm_data_tmdm_get_wifi_ssid (void)
 API to get the Service Set Identifier (SSID) of the current 802.11 network. More...
 
mdm_status_t mdm_is_wifi_hidden_ssid (void)
 MDM_TRUE if this network does not broadcast its SSID, so an SSID-specific probe request must be used for scans. More...
 
mdm_data_tmdm_get_wifi_dhcpinfo (void)
 API to get the DHCP-assigned addresses from the last successful DHCP request, if any. More...
 
mdm_status_t mdm_is_network_secure (const char *ssid)
 API to get the enterprise WLAN EAP type. More...
 
mdm_result_t mdm_get_blocked_networks (GList **blockedlist, GList **exceptlist)
 API to get the list of blocked SSIDs and the list of SSID exceptions. More...
 
mdm_result_t mdm_set_allow_user_policy_changes (mdm_status_t enable)
 API to allow or disallow modify all Wi-Fi network settings. More...
 
mdm_status_t mdm_get_allow_user_policy_changes (void)
 API to allow or disallow modify all Wi-Fi network settings. More...
 
mdm_result_t mdm_set_minimum_required_security (mdm_wifi_sec_type_e secType)
 API to set a minimum security level to connect to a Wi-Fi AP. More...
 
mdm_wifi_sec_type_e mdm_get_minimum_required_security (void)
 API to get the current minimum security level. More...
 
mdm_result_t mdm_set_password_hidden (mdm_status_t passHidden)
 API to set the hidden state of the WLAN enterprise network. More...
 
mdm_status_t mdm_get_password_hidden (void)
 API to get a Wi-Fi profile from the admin. More...
 
mdm_status_t mdm_is_network_blocked (const char *ssid)
 API to check if a network with the given SSID is blocked. More...
 
mdm_result_t mdm_set_wifi_ap_setting (const char *ssid, mdm_wifi_sec_type_e securityType, const char *password)
 API to configure the Wi-Fi AP or Wi-Fi tethering or HotSpot setting of the device. More...
 
mdm_data_tmdm_get_wifi_ap_setting (void)
 API to get the current Wi-Fi AP or Wi-Fi tethering or HotSpot setting of the device. More...
 
mdm_result_t mdm_allow_wifi_ap_setting_user_modification (mdm_status_t value)
 API to allow or deny the user to edit Wi-Fi AP settings. More...
 
mdm_status_t mdm_is_wifi_ap_setting_user_modification_allowed (void)
 API to check whether modification of Wi-Fi AP Setting by the user is allowed or not. More...
 
mdm_result_t mdm_add_wifi_ap_config (const mdm_wifi_ap_config_t *config)
 API to add new Wi-Fi access point configuration. More...
 
mdm_result_t mdm_add_wifi_ssids_to_whitelist (GList *SSIDs)
 API to add a list of Wi-Fi network SSIDs to the Wi-Fi network whitelist. More...
 
mdm_result_t mdm_remove_wifi_ssids_from_whitelist (GList *SSIDs)
 API to remove a list of Wi-Fi network SSIDs from the Wi-Fi network whitelist. More...
 
mdm_result_t mdm_clear_wifi_ssids_whitelist (void)
 API to remove all Wi-Fi network SSIDs from the Wi-Fi network blacklist. More...
 
mdm_data_tmdm_get_wifi_ssids_from_whitelist (void)
 API to retrieve the whitelist of Wi-Fi network SSIDs for all admins. More...
 
mdm_result_t mdm_add_wifi_ssids_to_blacklist (GList *SSIDs)
 API to add a list of Wi-Fi network SSIDs to the Wi-Fi network blacklist. More...
 
mdm_result_t mdm_remove_wifi_ssids_from_blacklist (GList *SSIDs)
 API to remove a list of Wi-Fi network SSIDs from the Wi-Fi network blacklist. More...
 
mdm_result_t mdm_clear_wifi_ssids_blacklist (void)
 API to remove all Wi-Fi network SSIDs from the Wi-Fi network blacklist. More...
 
mdm_data_tmdm_get_wifi_ssids_from_blacklist (void)
 API to retrieve the blacklist of Wi-Fi network SSIDs for all admins. More...
 
mdm_result_t mdm_activate_wifi_ssid_restriction (mdm_status_t value)
 API to activate or deactivate the Wi-Fi Network SSID access restriction. More...
 
mdm_status_t mdm_is_wifi_ssid_restriction_active (void)
 API to get active state of the Bluetooth device restriction. More...
 
mdm_result_t mdm_set_automatic_connection_to_wifi (bool enable)
 API to allow or disallow the user to automatically connect to a known Wi-Fi network. More...
 
mdm_status_t mdm_get_automatic_connection_to_wifi (void)
 API to check whether the automatic connection to a known Wi-Fi network is allowed or not. More...
 
mdm_result_t mdm_set_wifi_state_change_allowed (bool allow)
 API to allow or disallow Wi-Fi State Change (to ON/OFF). More...
 
mdm_status_t mdm_is_wifi_state_change_allowed (void)
 API to check if Wi-Fi state change is allowed or not. More...
 
mdm_result_t knox_mdm_preferred_ssid_add (const char *ssid)
 API to add SSIDs onto the list of preferred Wi-Fi access points. More...
 
mdm_result_t knox_mdm_preferred_ssid_delete (const char *ssid)
 API to delete specified SSIDs from the list of preferred Wi-Fi access points. More...
 
mdm_result_t knox_mdm_preferred_ssids_clear (void)
 API to clear Wi-Fi SSIDs from the list of preferred access points. More...
 
mdm_data_tknox_mdm_preferred_ssids_get (mdm_status_t all_admins)
 API to identify the contents of the preferred Wi-Fi access point list. More...
 
mdm_result_t knox_mdm_protected_ssid_add (const char *ssid)
 API to add an SSID into the protected Wi-Fi access point list. More...
 
mdm_result_t knox_mdm_protected_ssid_delete (const char *ssid)
 API to delete an SSID from the protected Wi-Fi access point list. More...
 
mdm_result_t knox_mdm_protected_ssids_clear (void)
 API to clear Wi-Fi SSIDs from the protected access point list. More...
 
mdm_data_tknox_mdm_protected_ssids_get (const mdm_status_t all_admins)
 API to identify the contents of the protected Wi-Fi access point list. More...
 
mdm_result_t knox_mdm_preferred_ssid_enforce (mdm_status_t status)
 API to set the enforce mode of the preferred Wi-Fi access point list. More...
 
mdm_status_t knox_mdm_preferred_ssid_is_enforced (void)
 API to get the current status of enforce mode for preferred Wi-Fi access points. More...
 

Detailed Description

Wi-Fi policy group provides policies for Wi-Fi control.

Wi-Fi policy group.

Required Header

#include <mdm.h>

Overview

This group provides APIs to configure Wi-Fi related settings, as well as management of Wi-Fi profiles.

Enumeration Type Documentation

Enumerator
CERTIFICATE_SECURITY_LEVEL_NONE 

Wi-Fi certificate level none.

CERTIFICATE_SECURITY_LEVEL_LOW 

Wi-Fi certificate level low.

CERTIFICATE_SECURITY_LEVEL_HIGH 

Wi-Fi certificate level high.

Definition at line 197 of file wifi.h.

Phase 2 EAP authentication.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.1.5
Enumerator
MDM_WIFI_EAP_PHASE_2_AUTH_NONE 

EAP phase2 authentication none

MDM_WIFI_EAP_PHASE_2_AUTH_PAP 

EAP phase2 authentication PAP

MDM_WIFI_EAP_PHASE_2_AUTH_MSCHAP 

EAP phase2 authentication MSCHAP

MDM_WIFI_EAP_PHASE_2_AUTH_MSCHAPV2 

EAP phase2 authentication MSCHAPv2

MDM_WIFI_EAP_PHASE_2_AUTH_GTC 

EAP phase2 authentication GTC

MDM_WIFI_EAP_PHASE_2_AUTH_MD5 

EAP phase2 authentication MD5

Definition at line 105 of file wifi.h.

Wi-Fi eap type.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.1.5
Enumerator
MDM_WIFI_EAP_TYPE_NONE 

Wi-Fi eap type none.

MDM_WIFI_EAP_TYPE_PEAP 

Wi-Fi eap type peap.

MDM_WIFI_EAP_TYPE_TLS 

Wi-Fi eap type tls.

MDM_WIFI_EAP_TYPE_TTLS 

Wi-Fi eap type ttls.

MDM_WIFI_EAP_TYPE_SIM 

Wi-Fi eap type sim.

MDM_WIFI_EAP_TYPE_AKA 

Wi-Fi eap type aka.

MDM_WIFI_EAP_TYPE_NOT_EAP 

not eap network.

Definition at line 70 of file wifi.h.

Wi-Fi security type.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.1.5
Enumerator
SECURITY_LEVEL_NONE 

Wi-Fi security level none.

SECURITY_LEVEL_OPEN 

Wi-Fi security level open.

SECURITY_LEVEL_WEP 

Wi-Fi security level wep.

SECURITY_LEVEL_WPA_PSK 

Wi-Fi security level wpa psk.

SECURITY_LEVEL_WPA2_PSK 

Wi-Fi security level wpa2 psk.

SECURITY_LEVEL_EAP_PEAP 

Wi-Fi security level eap peap.

SECURITY_LEVEL_EAP_TLS 

Wi-Fi security level eap tls.

SECURITY_LEVEL_EAP_TTLS 

Wi-Fi security level eap ttls.

SECURITY_LEVEL_EAP_SIM 

Wi-Fi security level eap sim.

SECURITY_LEVEL_EAP_AKA 

Wi-Fi security level eap aka.

Definition at line 86 of file wifi.h.

Enumerate Wi-Fi status type.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.1.5
See also

Definition at line 221 of file wifi.h.

Enumerate Wi-Fi notice type.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.1.5
See also
Enumerator
MDM_NOTI_ALLOWED 

Wi-Fi tethering allow notice

MDM_NOTI_RESTRICTED 

Wi-Fi tethering restrict notice

Definition at line 242 of file wifi.h.

Enumerate Wi-Fi tethering status type.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.1.5
See also
Enumerator
MDM_NOTI_TYPE_SETTING_USER_MODIFICATION 

wi-fi ap setting user modification

Definition at line 232 of file wifi.h.

Function Documentation

mdm_result_t knox_mdm_preferred_ssid_add ( const char *  ssid)

API to add SSIDs onto the list of preferred Wi-Fi access points.

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

Use this API to add Wi-Fi SSIDs into a list of preferred access points. SSIDs in the preferred access point list will be given connection priority by the system.

Remarks
When the item is added to the list of preferred APs MDM_POLICY_ON_WIFI_PREFERRED_AP_LIST_CHANGE event is raised. You can register a callback for this event using mdm_register_policy_receiver.
char *ssid = "TEST_AP";
if(ret == MDM_RESULT_SUCCESS) {
// Success
} else {
// Error
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
Parameters
[in]ssidSSID name to be added to list of the Preferred Access Points.
Returns
mdm_result_t : MDM_RESULT_SUCCESS upon successful addition of an SSID onto the preferred access point list or an error code from the values listed below upon failure.
Return values
MDM_RESULT_SUCCESSSuccessful
MDM_RESULT_FAILGeneral failure
MDM_RESULT_NOT_SUPPORTEDNot supported
MDM_RESULT_INVALID_PARAMInvalid parameter
MDM_RESULT_SERVICE_NOT_ENABLEDService not enabled.
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
See also
knox_mdm_preferred_ssid_delete, knox_mdm_preferred_ssids_clear, knox_mdm_preferred_ssid_get
mdm_result_t knox_mdm_preferred_ssid_delete ( const char *  ssid)

API to delete specified SSIDs from the list of preferred Wi-Fi access points.

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

Use this API to remove Wi-Fi SSIDs from the list of preferred access points.

Remarks
When the item is deleted from the list of preferred APs MDM_POLICY_ON_WIFI_PREFERRED_AP_LIST_CHANGE event is raised. You can register a callback for this event using mdm_register_policy_receiver.
char *ssid = "TEST_AP";
if(ret == MDM_RESULT_SUCCESS) {
// Success
} else {
// Error
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
Parameters
[in]ssidSSID name to be deleted from list of the Preferred Access Points.
Returns
mdm_result_t : MDM_RESULT_SUCCESS upon successful deletion of an SSID from the preferred access point list or an error code from the values listed below upon failure.
Return values
MDM_RESULT_SUCCESSSuccess
MDM_RESULT_FAILGeneral failure.
MDM_RESULT_SERVICE_NOT_ENABLEDService not enabled.
MDM_RESULT_ACCESS_DENIEDCaller is not authorized to access Knox MDM client information.
See also
knox_mdm_preferred_ssid_add, knox_mdm_preferred_ssids_clear, knox_mdm_preferred_ssid_get
mdm_result_t knox_mdm_preferred_ssid_enforce ( mdm_status_t  status)

API to set the enforce mode of the preferred Wi-Fi access point list.

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

Use this API to configure how the system connects to Wi-Fi SSIDs on the preferred access point list:
• Enforce mode is enabled — The system will check if the current connection is on the preferred access point list. If the SSID is not on the preferred access point list, it will disconnect then re-connect to an SSID on the preferred access point list.
• Enforce mode is disabled — The system will only connect to a preferred access point after it’s disconnected from the current connection.

Remarks
Enforce mode is written to MDM_POLICY_ON_WIFI_ENFORCE_PREFERRED_AP_MODE_CHANGE notification file. You can register a callback for this event using mdm_register_policy_receiver.
if(ret == MDM_RESULT_SUCCESS) {
// Success
} else {
// Error
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
Parameters
[in]statusMDM_TRUE to enable enforce mode
MDM_FALSE to disable enforce mode
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
Returns
mdm_result_t : MDM_RESULT_SUCCESS upon successful configuration of enforce mode, or an error code from the values listed below upon failure.
Return values
MDM_RESULT_SUCCESSSuccess
MDM_RESULT_FAILGeneral failure.
MDM_RESULT_SERVICE_NOT_ENABLEDService not enabled.
MDM_RESULT_ACCESS_DENIEDCaller is not authorized to access Knox MDM client information.
See also
knox_mdm_preferred_ssid_is_enforced
mdm_status_t knox_mdm_preferred_ssid_is_enforced ( void  )

API to get the current status of enforce mode for preferred Wi-Fi access points.

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

Use this API to get the current state of enforce mode for preferred Wi-Fi access points.

if(ret == MDM_TRUE) {
// Success
} else {
// Error
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
Returns
mdm_status_t : Actual status of enforce mode from the values listed below.
Return values
MDM_TRUEEnforce mode is enabled
MDM_FALSEEnforce mode is disabled
MDM_STATUS_ERROROn any error
See also
knox_mdm_preferred_ssid_is_enforced
mdm_result_t knox_mdm_preferred_ssids_clear ( void  )

API to clear Wi-Fi SSIDs from the list of preferred access points.

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

Use this API to clear the contents of the preferred access point list.

Remarks
When the list of preferred APs is cleared MDM_POLICY_ON_WIFI_PREFERRED_AP_LIST_CHANGE event is raised. You can register a callback for this event using mdm_register_policy_receiver.
if(ret == MDM_RESULT_SUCCESS) {
// Success
} else {
// Error
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
Returns
mdm_result_t : MDM_RESULT_SUCCESS upon successful deletion of all SSIDs from the preferred access point list, or an error code from the values listed below upon failure.
Return values
MDM_RESULT_SUCCESSSuccess
MDM_RESULT_FAILGeneral failure.
MDM_RESULT_SERVICE_NOT_ENABLEDService not enabled.
MDM_RESULT_ACCESS_DENIEDCaller is not authorized to access Knox MDM client information.
See also
knox_mdm_preferred_ssid_add, knox_mdm_preferred_ssid_delete, knox_mdm_preferred_ssid_get
mdm_data_t* knox_mdm_preferred_ssids_get ( mdm_status_t  all_admins)

API to identify the contents of the preferred Wi-Fi access point list.

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

Use this API to return the list of SSIDs in the preferred Wi-Fi access point list. The API will return a list as defined by the given administrator.

if(data != NULL) {
if(data -> ret != MDM_RESULT_SUCCESS) {
// Error
} else {
// Success
GList *list = (GList *)data -> data;
while(list != NULL) {
char *ssid_name = (char *)list -> data;
if(ssid_name != NULL) {
// Do something
}
list = g_list_next(list);
}
}
} else {
// Error
}
Parameters
[in]all_adminsMDM_TRUE content off all lists of all admins
MDM_FALSE content of current admin only
Privilege Level:
public
Returns
mdm_result_t : MDM_RESULT_SUCCESS upon getting the contents of the preferred access point list or an error code from the values listed below upon failure.
Return values
MDM_RESULT_SUCCESSSuccess
MDM_RESULT_FAILGeneral failure.
MDM_RESULT_SERVICE_NOT_ENABLEDService not enabled.
MDM_RESULT_ACCESS_DENIEDCaller is not authorized to access Knox MDM client information.
See also
knox_mdm_preferred_ssid_add, knox_mdm_preferred_ssid_delete, knox_mdm_preferred_ssids_clear
mdm_result_t knox_mdm_protected_ssid_add ( const char *  ssid)

API to add an SSID into the protected Wi-Fi access point list.

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

Use this API to add an SSID to a list of protected Wi-Fi access points. The MDM prevents user changes to SSIDs on the protected list. Only the MDM admin will be allowed to create/change/delete SSIDs on the protected Wi-Fi access point list.

Remarks
When the item is added to the list of protected SSIDs MDM_POLICY_ON_WIFI_PROTECTED_AP_LIST_CHANGE event is raised. You can register a callback for this event using mdm_register_policy_receiver.
char *ssid = "TEST_AP";
if(ret == MDM_RESULT_SUCCESS) {
// Success
} else {
// Error
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
Parameters
[in]ssidSSID name to be added to the Protected Access Points list.
Returns
mdm_result_t : MDM_RESULT_SUCCESS upon successful addition of an SSID onto the protected access point list or an error code from the values listed below upon failure.
Return values
MDM_RESULT_SUCCESSSuccess
MDM_RESULT_FAILGeneral failure.
MDM_RESULT_SERVICE_NOT_ENABLEDService not enabled.
MDM_RESULT_ACCESS_DENIEDCaller is not authorized to access Knox MDM client information.
See also
knox_mdm_protected_ssid_delete, knox_mdm_protected_ssids_clear, knox_mdm_protected_ssid_get
mdm_result_t knox_mdm_protected_ssid_delete ( const char *  ssid)

API to delete an SSID from the protected Wi-Fi access point list.

Since (Knox_wearable):
2.2.0
Since (Tizen):
3.0.0.1
Feature:
http://developer.samsung.com/tizen/feature/mdm knox_mdm_protected_ssid_add,
Usage:

Use this API to remove Wi-Fi SSIDs from the protected Wi-Fi access point list.

Remarks
When the item is deleted from the list of protected SSIDs MDM_POLICY_ON_WIFI_PROTECTED_AP_LIST_CHANGE event is raised. You can register a callback for this event using mdm_register_policy_receiver.
char *ssid = "TEST_AP";
if(ret == MDM_RESULT_SUCCESS) {
// Success
} else {
// Error
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
Parameters
[in]ssidSSID name to be deleted from the Protected Access Points list.
Returns
mdm_result_t : MDM_RESULT_SUCCESS upon successful deletion of an SSID from the protected access point list or an error code from the values listed below upon failure.
Return values
MDM_RESULT_SUCCESSSuccess
MDM_RESULT_FAILGeneral failure.
MDM_RESULT_SERVICE_NOT_ENABLEDService not enabled.
MDM_RESULT_ACCESS_DENIEDCaller is not authorized to access Knox MDM client information.
See also
knox_mdm_protected_ssid_add, knox_mdm_protected_ssids_clear, knox_mdm_protected_ssid_get
mdm_result_t knox_mdm_protected_ssids_clear ( void  )

API to clear Wi-Fi SSIDs from the protected access point list.

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

Use this API to clear the contents of the protected access point list.

Remarks
When the list of protected SSIDs is cleared MDM_POLICY_ON_WIFI_PROTECTED_AP_LIST_CHANGE event is raised. You can register a callback for this event using mdm_register_policy_receiver.
if(ret == MDM_RESULT_SUCCESS) {
// Success
} else {
// Error
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
Returns
mdm_result_t MDM_RESULT_SUCCESS upon successful removal of all SSIDs from the protected access point list, or an error code from the values listed below upon failure.
Return values
MDM_RESULT_SUCCESSSuccess
MDM_RESULT_FAILGeneral failure.
MDM_RESULT_SERVICE_NOT_ENABLEDService not enabled.
MDM_RESULT_ACCESS_DENIEDCaller is not authorized to access Knox MDM client information.
See also
knox_mdm_protected_ssid_add, knox_mdm_protected_ssid_delete, knox_mdm_protected_ssid_get
mdm_data_t* knox_mdm_protected_ssids_get ( const mdm_status_t  all_admins)

API to identify the contents of the protected Wi-Fi access point list.

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

Use this API to return SSIDs on the protected Wi-Fi access point list. The API will return a list as defined by the given administrator.

if(data != NULL) {
if(data -> ret != MDM_RESULT_SUCCESS) {
// Error
} else {
// Success
GList *list = (GList *)data -> data;
while(list != NULL) {
char *ssid_name = (char *)list -> data;
if(ssid_name != NULL) {
// Do something
}
list = g_list_next(list);
}
}
} else {
// Error
}
Parameters
[in]all_adminsMDM_TRUE content off all lists of all admins
MDM_FALSE content of current admin only
Privilege Level:
public
Returns
mdm_result_t : MDM_RESULT_SUCCESS upon getting SSIDs from the protected access point list, or an error code from the values listed below upon failure.
Return values
MDM_RESULT_SUCCESSSuccess
MDM_RESULT_FAILGeneral failure.
MDM_RESULT_SERVICE_NOT_ENABLEDService not enabled.
MDM_RESULT_ACCESS_DENIEDCaller is not authorized to access Knox MDM client information.
See also
knox_mdm_protected_ssid_add, knox_mdm_protected_ssid_delete, knox_mdm_protected_ssids_clear
mdm_result_t mdm_activate_wifi_ssid_restriction ( mdm_status_t  value)

API to activate or deactivate the Wi-Fi Network SSID access restriction.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.5
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this API to activate its SSID based Wi-Fi network blacklist and whitelist policy. The SSID based Wi-Fi network whitelist-blacklist policies will not be applied unless activated using this API.
Remarks
WiFi status type #MDM_WIFI_BLOCKED_NETWORK_POLICY_CHANGED is written to MDM_POLICY_ON_WIFI notification file. You can register a callback for this event using mdm_register_policy_receiver.
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
Parameters
[in]valueMDM_TRUE to activate, MDM_FALSE to deactivate.
Returns
mdm_result_t : MDM_RESULT_SUCCESS on successful activation or deactivation of access policy else MDM_RESULT_FAIL on failure
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_ssid_restriction_active
mdm_result_t mdm_add_wifi_ap_config ( const mdm_wifi_ap_config_t config)

API to add new Wi-Fi access point configuration.

Since (Knox_wearable):
2.2.0
Since (Tizen):
3.0.0.1
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this API to add new predefined access point configuration to the device. When device will be in range of defined network it will connect automatically.
memset (&c, 0, sizeof(c));
c.ssid = "EnterpriseNet";
c.security.eap_peap.identity = "enterprise_user";
c.security.eap_peap.anonymous_identity = "";
c.security.eap_peap.password = "enterprise_password";
c.security.eap_peap.ca_cert_file = "";
c.security.eap_peap.subject_match = "";
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
Parameters
[in]configThe Wi-Fi configuration
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.
mdm_result_t mdm_add_wifi_ssids_to_blacklist ( GList *  SSIDs)

API to add a list of Wi-Fi network SSIDs to the Wi-Fi network blacklist.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.5
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this API to blacklist Wi-Fi networks based on the SSIDs/wildcards "*" of those Wi-Fi networks. The device will not connect to Wi-Fi networks with matching SSIDs. The blacklisted Wi-Fi network will still show in the AP list but will be disabled and the user will not be able to turn it on. If the network is connected then the user will be disconnected from it. A network is considered blacklisted if any admin has it in its blacklist. The blacklist will be in effect only after being activated using mdm_activate_wifi_ssid_restriction().
Remarks
WiFi status type #MDM_WIFI_BLOCKED_NETWORK_POLICY_CHANGED is written to MDM_POLICY_ON_WIFI notification file. You can register a callback for this event using mdm_register_policy_receiver.
GList *SSIDs = NULL;
SSIDs = g_list_append(SSIDs, "ssid1");
SSIDs = g_list_append(SSIDs, "ssid2");
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
g_list_free(devices);
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
Parameters
[in]SSIDsWi-Fi network SSID list to be added to the whitelist
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_remove_wifi_ssids_from_blacklist, mdm_clear_wifi_ssids_blacklist, mdm_get_wifi_ssids_from_blacklist
mdm_result_t mdm_add_wifi_ssids_to_whitelist ( GList *  SSIDs)

API to add a list of Wi-Fi network SSIDs to the Wi-Fi network whitelist.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.5
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this API to whitelist Wi-Fi networks based on the SSIDs/wildcards "*" of those Wi-Fi networks. The Wi-Fi networks with matching SSIDs will be exempted from the blacklist and will be allowed to connect to the device. The black list will be in effect only after being activated using mdm_activate_bluetooth_device_restriction().
Remarks
WiFi status type #MDM_WIFI_BLOCKED_NETWORK_POLICY_CHANGED is written to MDM_POLICY_ON_WIFI notification file. You can register a callback for this event using mdm_register_policy_receiver.
GList *SSIDs = NULL;
SSIDs = g_list_append(SSIDs, "ssid1");
SSIDs = g_list_append(SSIDs, "ssid2");
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
g_list_free(devices);
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
Parameters
[in]SSIDsWi-Fi network SSID list to be added to the whitelist
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_remove_wifi_ssids_from_whitelist, mdm_clear_wifi_ssids_whitelist, mdm_get_wifi_ssids_from_whitelist
mdm_result_t mdm_allow_wifi_ap_setting_user_modification ( mdm_status_t  value)

API to allow or deny the user to edit Wi-Fi AP settings.

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

This will deny the user from modifying the Wi-Fi AP settings when disabled, the UI will be greyed out so user will not be able to modify the settings. When enabled back user will be able to modify the Wi-Fi AP settings.

Remarks
Restriction of WiFi state changing wifi_noti_t is written to MDM_POLICY_ON_WIFI_CHANGE notification file. Restriction of WiFi tethering wifi_noti_t is written to MDM_POLICY_ON_WIFI_TETHERING notification file. You can register a callback for both events using mdm_register_policy_receiver.
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
Parameters
[in]valueMDM_RESTRICTED to deny user from changing Wi-Fi AP settings. MDM_ALLOWED to allow user to change Wi-Fi AP settings.
Returns
mdm_result_t : MDM_RESULT_SUCCESS on removal success, MDM_RESULT_FAIL on removal failure.
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_ap_setting_user_modification_allowed
mdm_result_t mdm_clear_wifi_ssids_blacklist ( void  )

API to remove all Wi-Fi network SSIDs from the Wi-Fi network blacklist.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.5
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this API to remove all Wi-Fi SSIDs from the blacklist.
Remarks
WiFi status type #MDM_WIFI_BLOCKED_NETWORK_POLICY_CHANGED is written to MDM_POLICY_ON_WIFI notification file. You can register a callback for this event using mdm_register_policy_receiver.
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
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_add_wifi_ssids_to_blacklist, mdm_remove_wifi_ssids_from_blacklist, mdm_get_wifi_ssids_from_blacklist
mdm_result_t mdm_clear_wifi_ssids_whitelist ( void  )

API to remove all Wi-Fi network SSIDs from the Wi-Fi network blacklist.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.5
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this API to remove all Wi-Fi network SSIDs from the whitelist. Even though SSIDs will be removed from the blacklist, the user will have to enable it manually from Settings Application, to make a connection. The black list will be in effect only after being activated using mdm_activate_bluetooth_device_restriction().
Remarks
WiFi status type #MDM_WIFI_BLOCKED_NETWORK_POLICY_CHANGED is written to MDM_POLICY_ON_WIFI notification file. You can register a callback for this event using mdm_register_policy_receiver.
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
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_add_wifi_ssids_to_whitelist, mdm_remove_wifi_ssids_from_whitelist, mdm_get_wifi_ssids_from_whitelist
mdm_status_t mdm_get_allow_user_policy_changes ( void  )

API to allow or disallow modify all Wi-Fi network settings.

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

Admin can use this API to block user to modify Enterprise Wi-Fi settings except user and password.

if(ret == MDM_ENABLED) {
//Enabled
} else {
//Disabled
}
Returns
mdm_status_t : The current prevention status.
Return values
MDM_ENABLEDChanges allowed
MDM_DISABLEDChanges not allowed except user and password
MDM_STATUS_ERRORError
See also
mdm_set_allow_user_policy_changes
mdm_status_t mdm_get_allow_wifi ( void  )

API to check if Wi-Fi use is allowed or restricted.

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

Use this API to check if Wi-Fi is allowed or restricted, and take the appropriate action based on enterprise policy.

status = mdm_get_allow_wifi();
if (status != MDM_STATUS_ERROR) {
if (status == MDM_ALLOWED) {
//ALLOWED: Allows the usage of the Wi-Fi capability on the device.
// Wi-Fi capability will be turned off by default.
} else if (status == MDM_RESTRICTED) {
//RESTRICTED: Restricts the usage of the Wi-Fi capability on the device.
}
} else {
//ERROR: fail to get the status.
}
Returns
mdm_status_t : The current prevention status.
Return values
MDM_RESTRICTEDThe end user is restricted from using Wi-Fi on the device.
MDM_ALLOWEDThe end user is allowed to use Wi-Fi on the device.
MDM_STATUS_ERROROn any error or failure.
See also
mdm_set_allow_wifi
mdm_status_t mdm_get_automatic_connection_to_wifi ( void  )

API to check whether the automatic connection to a known Wi-Fi network is allowed or not.

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

Admin can use this API to check if the user is allowed or not to automatically connect to the known Wi-Fi access points which are already stored on the device.

if (ret != MDM_STATUS_ERROR) {
if (ret == MDM_TRUE){
// auto-connection is activated
} else {
// auto-connection is deactivated
}
} else {
// failure
}
Returns
mdm_status_t : Current status
Return values
MDM_TRUEAutomatic connection is enabled
MDM_FALSEDisabled
MDM_STATUS_ERRORFailure
See also
mdm_set_automatic_connection_to_wifi
mdm_result_t mdm_get_blocked_networks ( GList **  blockedlist,
GList **  exceptlist 
)

API to get the list of blocked SSIDs and the list of SSID exceptions.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.1.5
Feature:
http://developer.samsung.com/tizen/feature/mdm
Parameters
[out]blockedlistBlocked networks (SSIDs).
[out]exceptlistExceptional networks (SSIDs).
Usage:

User can use this API to obtain the list of blocked SSIDs.

  • If WiFi SSID restriction has not been activated using mdm_activate_wifi_ssid_restriction this API always returns two empty lists.
  • If WiFi SSID restriction has been activated, this API returns two lists:
    1. Blocked networks (SSIDs) The SSIDs that have been previously blacklisted using mdm_add_wifi_ssids_to_blacklist.
    2. Exceptional networks (SSIDs) The SSIDs that have been previously whitelisted using mdm_add_wifi_ssids_to_whitelist and are present on blocked networks list. E.g. if SSID1, SSID2, SSID3 are blacklisted and SSID2, SSID4, SSID5 are whitelisted, exceptions list will contain only SSID2. This list reflects the intersection of white- and blacklist.
  • If a wildcard character: "*" is present on whitelist or blacklist, the entire content of blacklist is present on blocked networks list and the entire content of whitelist is present on exceptions list.
  • Call to this functions does not touch white and blacklist in any way.
  • Items on both lists are allocated dynamically using g_strdup, so they should be freed using g_free called on each item. E.g.: g_list_free_full(list, (GDestroyNotify)g_free) - this also releases the GList itself.
GList *blocked = NULL, *exceptions = NULL;
mdm_result_t ret = mdm_get_blocked_networks(&blocked, &exceptions);
if (ret == MDM_RESULT_SUCCESS) {
GList *current = g_list_first(blocked);
while (current && current->data) {
char *ssid = (char *)current->data;
printf("[Blocked SSID]: %s\n", ssid);
current = g_list_next(current);
}
current = g_list_first(exceptions);
while (current && current->data) {
char *ssid = (char *)current->data;
printf("[Exception SSID]: %s\n", ssid);
current = g_list_next(current);
}
g_list_free_full(blocked, (GDestroyNotify)g_free);
g_list_free_full(exceptions, (GDestroyNotify)g_free);
} else {
// Fail
}
Returns
mdm_result_t : MDM_RESULT_SUCCESS in case of success, otherwise one of the following error codes:
Return values
MDM_RESULT_FAILGeneral failure.
MDM_RESULT_NOT_SUPPORTEDAPI is not available on this platform.
MDM_RESULT_INVALID_PARAMInvalid parameter: blockedlist = NULL or exceptlist = NULL.
MDM_RESULT_ACCESS_DENIEDThe application does not have the privilege to call this function.
MDM_RESULT_SERVICE_NOT_ENABLEDMDM service is not connected.
Permission:
Usage of this API is restricted to registered clients only.
See also
mdm_activate_wifi_ssid_restriction, mdm_add_wifi_ssids_to_blacklist, mdm_add_wifi_ssids_to_whitelist, mdm_is_network_blocked
mdm_wifi_sec_type_e mdm_get_minimum_required_security ( void  )

API to get the current minimum security level.

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

Admin can get current minimum security level to connect to a Wi-Fi AP. The possible values, from the lowest to highest, are: SECURITY_LEVEL_NONE SECURITY_LEVEL_OPEN SECURITY_LEVEL_WEP SECURITY_LEVEL_WPA_PSK SECURITY_LEVEL_WPA2_PSK SECURITY_LEVEL_EAP_PEAP SECURITY_LEVEL_EAP_TLS SECURITY_LEVEL_EAP_TTLS SECURITY_LEVEL_EAP_SIM SECURITY_LEVEL_EAP_AKA

Returns
mdm_wifi_sec_type_e : Representing the network security level.
Return values
SECURITY_LEVEL_NONEWi-Fi security level none
SECURITY_LEVEL_OPENGeneral Wi-Fi security level open
SECURITY_LEVEL_WEPWi-Fi security level wep
SECURITY_LEVEL_WPA_PSKWi-Fi security level wpa psk
SECURITY_LEVEL_WPA2_PSKWi-Fi security level wpa2 psk
SECURITY_LEVEL_EAP_PEAPWi-Fi security level eap peap
SECURITY_LEVEL_EAP_TLSWi-Fi security level eap tls
SECURITY_LEVEL_EAP_TTLSWi-Fi security level eap ttls
SECURITY_LEVEL_EAP_SIMWi-Fi security level eap sim
SECURITY_LEVEL_EAP_AKAWi-Fi security level eap aka
See also
mdm_set_minimum_required_security
mdm_status_t mdm_get_password_hidden ( void  )

API to get a Wi-Fi profile from the admin.

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

Get the hidden state of the WLAN enterprise network.

if(ret == MDM_TRUE) {
// hidden
} else if (ret == MDM_FALSE) {
// not hidden
} else {
// fail
}
Returns
mdm_status_t : Whether the password will be hidden from user.
See also
mdm_set_password_hidden
mdm_data_t* mdm_get_wifi_ap_setting ( void  )

API to get the current Wi-Fi AP or Wi-Fi tethering or HotSpot setting of the device.

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

Admin can remove an enterprise WLAN configuration. The network name is removed from the APs list, so that the user does not need to remove it manually.

if(lp_data) {
//Success
mdm_wifi_configuration_t *p_wifi_info = (wifi_configuration_t *)lp_data->data;
//Free after use
mdm_free_data(lp_data);
} else {
//Fail
}
Returns
mdm_data_t * : The Wi-Fi configuration of the Wi-Fi AP , NULL if operation failed.
See also
mdm_set_wifi_ap_setting
mdm_data_t* mdm_get_wifi_dhcpinfo ( void  )

API to get the DHCP-assigned addresses from the last successful DHCP request, if any.

Attention
Deprecated Since Knox_wearable 2.3.0. Use wifi_manager_ap_get_dns_address, wifi_manager_ap_get_gateway_address, wifi_manager_ap_get_ip_address and wifi_manager_ap_get_subnet_mask instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.5
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:

Admin can get the DHCP address from the last succeeded DHCP request.

mdm_data_t *lp_data = NULL;
if (lp_data) {
dhcp_info_t *lp_dhcp_info = (dhcp_info_t *)lp_data->data;
if(lp_dhcp_info) {
printf("dns1 : %s", lp_dhcp_info->dns1);
printf("dns2 : %s", lp_dhcp_info->dns2);
printf("gateway : %s", lp_dhcp_info->gateway);
printf("ipAddress : %s", lp_dhcp_info->ipAddress);
printf("netmask : %s", lp_dhcp_info->netmask);
}
mdm_free_data(lp_data);
} else {
//mdm_get_wifi_dhcpinfo fail
}
Returns
mdm_data_t * : The DHCP-assigned addresses from the last successful DHCP request or null if the operation failed.
mdm_data_t* mdm_get_wifi_ssid ( void  )

API to get the Service Set Identifier (SSID) of the current 802.11 network.

Attention
Deprecated Since Knox_wearable 2.3.0. Use wifi_manager_ap_get_essid instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.1.5
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:

Admin can check the Service Set Identifier (SSID) of the current 802.11 network.

if (lp_data) {
char *ssid = (char *)lp_data->data;
if(ssid != NULL) {
printf("SSID : %s\n", ssid );
}
mdm_free_data(lp_data);
}
Returns
mdm_data_t * : The SSID of a the current 802.11 network.
mdm_data_t* mdm_get_wifi_ssids_from_blacklist ( void  )

API to retrieve the blacklist of Wi-Fi network SSIDs for all admins.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.1.5
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this API to retrieve the list of Wi-Fi network SSIDs which are blacklisted. The Wi-Fi networks with matching SSIDs will be prevented from connecting to the device.
if (lp_data){
// success
GList *blacklist = (GList *)lp_data->data;
while(blacklist) {
char *ssid = (char *)blacklist->data;
// Using blacklist for preventing connection.
blacklist = g_list_next(blacklist);
}
// Free after use
mdm_free_data(lp_data);
} else {
// fail
}
Returns
mdm_data_t * : Blacklisted SSIDs for all admins or null if operation failed.
See also
mdm_add_wifi_ssids_to_blacklist, mdm_remove_wifi_ssids_from_blacklist, mdm_clear_wifi_ssids_blacklist
mdm_data_t* mdm_get_wifi_ssids_from_whitelist ( void  )

API to retrieve the whitelist of Wi-Fi network SSIDs for all admins.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.1.5
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this API to retrieve the list of Wi-Fi network SSIDs which are whitelisted. The Wi-Fi networks with matching SSIDs will be prevented from connecting to the device. The black list will be in effect only after being activated using mdm_activate_bluetooth_device_restriction().
if (lp_data){
// success
GList *whitelist = (GList *)lp_data->data;
// Using whitelist for not preventing connection.
// Free after use
mdm_free_data(lp_data);
} else {
// fail
}
Returns
mdm_data_t : Whitelisted SSIDs for all admins or null if operation failed.
See also
mdm_add_wifi_ssids_to_whitelist, mdm_remove_wifi_ssids_from_whitelist, mdm_clear_wifi_ssids_whitelist
mdm_status_t mdm_is_network_blocked ( const char *  ssid)

API to check if a network with the given SSID is blocked.

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

Admin can check whether network is blocked or not.

if(ret == MDM_TRUE) {
// Blocked
} else if(ret == MDM_FALSE) {
// Unblocked
} else {
// Fail
}
Parameters
[in]ssidThe SSID of an Enterprise WLAN Network.
Returns
mdm_status_t : Whether network is blocked
Return values
MDM_TRUEThe network is blocked
MDM_FALSEThe network is not blocked
MDM_STATUS_ERRORError
See also
mdm_get_blocked_networks
mdm_status_t mdm_is_network_secure ( const char *  ssid)

API to get the enterprise WLAN EAP type.

Attention
Deprecated Since Knox_wearable 2.3.0. Use wifi_manager_ap_get_security_type instead.
Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.1.5
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:

Admin can check whether WLAN AP is secure or not (any type of protection).

if(is_secure == MDM_TRUE) {
//Secure
} else {
//Not secure
}
Parameters
[in]ssidThe SSID of an Enterprise WLAN Network.
Returns
mdm_status_t : Current status.
Return values
MDM_TRUESecure
MDM_FALSENot secure
MDM_STATUS_ERRORFail
mdm_status_t mdm_is_wifi_ap_setting_user_modification_allowed ( void  )

API to check whether modification of Wi-Fi AP Setting by the user is allowed or not.

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

Admin can use this API to check if the user is denied from modifying the Hot Spot settings. If modification is denied, the UI will be grayed out so user will not be able to modify the settings. If modification is allowed user will be able to modify the Wi-Fi AP settings.

if (ret == MDM_TRUE){
// active
} else {
// deactive
}
Returns
mdm_status_t : The current prevention status.
Return values
MDM_TRUEActivated
MDM_FALSEDeactivated
MDM_STATUS_ERRORError
See also
mdm_allow_wifi_ap_setting_user_modification
mdm_status_t mdm_is_wifi_hidden_ssid ( void  )

MDM_TRUE if this network does not broadcast its SSID, so an SSID-specific probe request must be used for scans.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.5
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can check if this network is hidden or not.
if (status == MDM_TRUE) {
//hidden
} else {
//public
}
Returns
mdm_status_t : The current prevention status.
Return values
MDM_TRUEHidden SSID
MDM_FALSEPublic SSID
mdm_status_t mdm_is_wifi_ssid_restriction_active ( void  )

API to get active state of the Bluetooth device restriction.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.1.5
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this API to check whether the SSID based Wi-Fi network blacklist and whitelist policy is activated or not for that admin. The SSID based Wi-Fi network whitelist-blacklist policies will not be applied unless activated using mdm_activate_wifi_ssid_restriction.
if (ret == MDM_TRUE){
// active
} else {
// deactive
}
Returns
mdm_status_t : The current status.
Return values
MDM_TRUEPolicy is activated
MDM_FALSEPolicy is deactivated
MDM_STATUS_ERRORError
See also
mdm_activate_wifi_ssid_restriction
mdm_status_t mdm_is_wifi_state_change_allowed ( void  )

API to check if Wi-Fi state change is allowed or not.

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

Admin can use this API to check if the user is allowed or not to change the Wi-Fi state.

if (ret != MDM_STATUS_ERROR) {
if (ret == MDM_TRUE){
// change of the Wi-Fi state is allowed
} else {
// change of the Wi-Fi state is restricted
}
} else {
// failure
}
Returns
mdm_status_t : Whether change is allowed
Return values
MDM_TRUEChange Wi-Fi state is allowed
MDM_FALSERestricted
MDM_STATUS_ERRORFailure
See also
mdm_set_wifi_state_change_allowed
mdm_result_t mdm_remove_wifi_ssids_from_blacklist ( GList *  SSIDs)

API to remove a list of Wi-Fi network SSIDs from the Wi-Fi network blacklist.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.5
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this API to remove Wi-Fi SSIDs from the blacklist. The connections with matching SSID will be allowed after this. The blacklist will be in effect only after being activated using mdm_activate_wifi_ssid_restriction().
Remarks
WiFi status type #MDM_WIFI_BLOCKED_NETWORK_POLICY_CHANGED is written to MDM_POLICY_ON_WIFI notification file. You can register a callback for this event using mdm_register_policy_receiver.
GList *SSIDs = NULL;
SSIDs = g_list_append(SSIDs, "ssid1");
SSIDs = g_list_append(SSIDs, "ssid2");
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
g_list_free(devices);
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
Parameters
[in]SSIDsWi-Fi network SSID list to be removed from the black list. Only SSIDs that are already on black list are removed. For example, if black list contains [ "SSID1", "SSID2" ] and SSIDs contain [ "SSID1" ], final black list will be [ "SSID2" ].
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_add_wifi_ssids_to_blacklist, mdm_clear_wifi_ssids_blacklist, mdm_get_wifi_ssids_from_blacklist
mdm_result_t mdm_remove_wifi_ssids_from_whitelist ( GList *  SSIDs)

API to remove a list of Wi-Fi network SSIDs from the Wi-Fi network whitelist.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2.5
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this API to remove Wi-Fi network SSIDs from the whitelist. Once removed from whitelist, if there is a similar Wi-Fi network SSID in blacklist, then connection to that Wi-Fi network will be blocked. The black list will be in effect only after being activated using mdm_activate_bluetooth_device_restriction().
Remarks
WiFi status type #MDM_WIFI_BLOCKED_NETWORK_POLICY_CHANGED is written to MDM_POLICY_ON_WIFI notification file. You can register a callback for this event using mdm_register_policy_receiver.
GList *SSIDs = NULL;
SSIDs = g_list_append(SSIDs, "ssid1");
SSIDs = g_list_append(SSIDs, "ssid2");
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
g_list_free(devices);
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
Parameters
[in]SSIDsWi-Fi network SSID list to be removed from the white list. Only SSIDs that are already on white list are removed. For example, if white list contains [ "SSID1", "SSID2" ] and SSIDs contain [ "SSID1" ], final white list will be [ "SSID2" ].
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_add_wifi_ssids_to_whitelist, mdm_clear_wifi_ssids_whitelist, mdm_get_wifi_ssids_from_whitelist
mdm_result_t mdm_set_allow_user_policy_changes ( mdm_status_t  enable)

API to allow or disallow modify all Wi-Fi network settings.

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

When this policy is in effect (value false) the user is only allowed to modify user and/or password of a Wi-Fi network, also user can not remove the enterprise network. Otherwise, the user can modify all Wi-Fi network settings normally.

Remarks
Restriction of WiFi state changing wifi_noti_t is written to MDM_POLICY_ON_WIFI_CHANGE notification file. You can register a callback for this event using mdm_register_policy_receiver.
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
Parameters
[in]enableMDM_ENABLED to allow changes in all Wi-Fi network settings. MDM_DISABLED to allow changes only in user and/or password.
Returns
mdm_result_t : MDM_RESULT_SUCCESS if the value was set correctly, MDM_RESULT_FAIL on errors.
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_allow_user_policy_changes
mdm_result_t mdm_set_allow_wifi ( mdm_status_t  state)

API to allow or restrict the use of Wi-Fi.

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

Use this API to allow or restrict the use of Wi-Fi on a device on behalf of the end user without any user interaction.

Remarks
WiFi status type #MDM_WIFI_ALLOWED is written to MDM_POLICY_ON_WIFI notification file. You can register a callback for this event using mdm_register_policy_receiver.
if (ret == MDM_RESULT_SUCCESS) {
//Success
} else {
//Fail
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
Parameters
[in]stateMDM_RESTRICTED — Restrict the use of Wi-Fi on a device. If set to restricted, the user will not be able to turn it on from device settings or quick panel menu.
MDM_ALLOWED — Allow the use of Wi-Fi on a device, if the status is set to allowed. Note that if Wi-Fi capability is allowed after being restricted it will be turned off by default so the user has to turn it on manually from device settings or quick panel menu, provided that there were no access points configured yet. Otherwise default auto connection to recently configured wifi network will take place, unless explicitely blocked with mdm_set_automatic_connection_to_wifi.
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_allow_wifi
mdm_set_automatic_connection_to_wifi
mdm_result_t mdm_set_automatic_connection_to_wifi ( bool  enable)

API to allow or disallow the user to automatically connect to a known Wi-Fi network.

Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
When this policy is set to false user cannot automatically connect to the known Wi-Fi access points which are already stored on the device.
Remarks
Auto-connect restriction wifi_noti_t is written to MDM_POLICY_ON_WIFI_AUTOCONNECT_CHANGE notification file. You can register a callback for this event using mdm_register_policy_receiver.
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
Parameters
[in]enableTrue to allow automatic connection to a known Wi-Fi network or false to disallow it.
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_automatic_connection_to_wifi
mdm_result_t mdm_set_minimum_required_security ( mdm_wifi_sec_type_e  secType)

API to set a minimum security level to connect to a Wi-Fi AP.

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

Admin can use this API to block user to modify Enterprise Wi-Fi settings except user and password.

Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
Parameters
[in]secTypeThe minimum required security.
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_minimum_required_security
mdm_result_t mdm_set_password_hidden ( mdm_status_t  passHidden)

API to set the hidden state of the WLAN enterprise network.

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

This policy hides the password characters of Wi-Fi connection with asterisks. The default value is MDM_TRUE.

Remarks
Restriction of WiFi state changing wifi_noti_t is written to MDM_POLICY_ON_WIFI_CHANGE notification file. You can register a callback for this event using mdm_register_policy_receiver.
if(ret == MDM_RESULT_SUCCESS) {
//Success
} else {
//Fail
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
Parameters
[in]passHiddenWhether the password will be hidden from user(MDM_TRUE/MDM_FALSE)
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_password_hidden
mdm_result_t mdm_set_wifi_ap_setting ( const char *  ssid,
mdm_wifi_sec_type_e  securityType,
const char *  password 
)

API to configure the Wi-Fi AP or Wi-Fi tethering or HotSpot setting of the device.

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

Admin can remove an enterprise WLAN configuration. The network name is removed from the APs list, so that the user does not need to remove it manually.

mdm_result_t ret = mdm_set_wifi_ap_setting(ssid, securityType, password);
if(ret == MDM_RESULT_SUCCESS) {
//Success
} else {
//Fail
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
Parameters
[in]ssidThe SSID of a Enterprise WLAN Network.
[in]securityTypesecurity type of the Wi-Fi AP should be one of SECURITY_LEVEL_OPEN or SECURITY_LEVEL_WPA_PSK. Any other type will fail the API.
[in]passwordpassword to be used when security type is SECURITY_LEVEL_WPA_PSK, will be ignored for SECURITY_LEVEL_OPEN security type. Minimum of 8 characters is required for SECURITY_TYPE_WPA_PSK security type.
Returns
mdm_result_t : MDM_RESULT_SUCCESS on removal success, MDM_RESULT_FAIL on removal failure.
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_wifi_ap_setting
mdm_result_t mdm_set_wifi_state_change_allowed ( bool  allow)

API to allow or disallow Wi-Fi State Change (to ON/OFF).

Since (Tizen):
2.3.2.3
Feature:
http://developer.samsung.com/tizen/feature/mdm
Usage:
Admin can use this API to allow or disallow Wi-Fi state change. If the admin sets the value to true then the user will be able to change the Wi-Fi state. If the value is set to disabled then the user will not be able to change the state.
Remarks
WiFi state wifi_noti_t is written to MDM_POLICY_ON_WIFI_STATE notification file. Restriction of WiFi state changing wifi_noti_t is written to MDM_POLICY_ON_WIFI_CHANGE notification file. You can register a callbacks for both events using mdm_register_policy_receiver.
if (ret == MDM_RESULT_SUCCESS){
// success
} else {
// fail
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/mdm.wifi
Parameters
[in]allowTrue to let the user change the Wi-Fi state or false otherwise.
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_state_change_allowed