Knox Tizen Wearable SDK
restriction.h
1 /*
2  * Copyright (c) 2000-2017 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * PROPRIETARY/CONFIDENTIAL
5  *
6  * This software is the confidential and proprietary information of
7  * SAMSUNG ELECTRONICS ("Confidential Information").
8  * You shall not disclose such Confidential Information and shall
9  * use it only in accordance with the terms of the license agreement
10  * you entered into with SAMSUNG ELECTRONICS.
11  * SAMSUNG make no representations or warranties about the suitability
12  * of the software, either express or implied, including but not
13  * limited to the implied warranties of merchantability, fitness for
14  * a particular purpose, or non-infringement.
15  * SAMSUNG shall not be liable for any damages suffered by licensee as
16  * a result of using, modifying or distributing this software or its derivatives.
17  */
18 
19 #ifndef LIBMDM_MDM_RESTRICTION_H
20 #define LIBMDM_MDM_RESTRICTION_H
21 
22 #include <stdbool.h>
23 #include "mdm_client_type.h"
24 
25 #ifdef __cplusplus
26 extern "C" {
27 #endif
28 
29 
40 typedef enum {
43 } status_t;
44 
51 typedef enum {
54 } noti_t;
55 
66 typedef enum {
71  KNOX_MDM_NOTIFICATION_EXTERNAL = 4
73 
84 typedef enum {
89 
95 typedef struct {
96  char * package_name;
100 
106 typedef enum {
111 
151 
190 mdm_result_t mdm_get_location_provider_state(char *p_provider, mdm_status_t *p_status);
191 
245 mdm_result_t mdm_set_location_provider_state(const char *p_provider, mdm_status_t enable);
246 
247 /*
248  * @brief API to check whether background data is enabled or not.
249  *
250  * @since_mdm 1.0.0
251  *
252  * @since_tizen 2.2.1.1
253  *
254  * @feature %http://developer.samsung.com/tizen/feature/mdm
255  *
256  * @par Usage:
257  * Admin can check whether background usage of data is allowed or not. The default value is true..
258  * @code{.c}
259  mdm_status_t status = mdm_get_allow_background_data();
260  if (status == MDM_STATUS_ERROR) {
261  // function error
262  } else {
263  // function success
264  printf ("status: %d", status);
265  }
266  *
267  * @endcode
268  *
269  * @return #mdm_status_t : Current mode of operation: one of #MDM_ALLOWED or #MDM_RESTRICTED
270  *
271  * @see mdm_set_allow_background_data
272  *
273  */
274 mdm_status_t mdm_get_allow_background_data(void);
275 
276 #ifndef MDM_FOR_SOLIS_PROF
277 
278 /*
279  * @brief API to check whether the backup is enabled or not.
280  *
281  * @since_mdm 1.0.0
282  *
283  * @since_tizen 2.2.1.1
284  *
285  * @feature %http://developer.samsung.com/tizen/feature/mdm
286  *
287  * @par Usage:
288  * Admin could check whether backup is allowed or not.The default value is true.
289  * @code{.c}
290  mdm_status_t status = mdm_get_allow_backup();
291  if (status == MDM_STATUS_ERROR) {
292  // function error
293  } else {
294  // function success
295  printf ("status: %d", status);
296  }
297  *
298  * @endcode
299  *
300  * @return #mdm_status_t : Current mode of operation: one of #MDM_ALLOWED or #MDM_RESTRICTED
301  *
302  * @see mdm_set_allow_backup
303  *
304  */
305 mdm_status_t mdm_get_allow_backup(void);
306 
336 
337 #endif /* MDM_FOR_SOLIS_PROF */
338 
368 
369 /*
370  * @brief API to check whether clipboard is enabled or not
371  *
372  * @since_mdm 1.0.0
373  *
374  * @since_tizen 2.2.1.1
375  *
376  * @feature %http://developer.samsung.com/tizen/feature/mdm
377  *
378  * @par Usage:
379  * Admin can check whether cut, copy, paste operation is allowed or not. The default value is true.
380  * @code{.c}
381  mdm_status_t status = mdm_get_allow_clipboard();
382  if (status == MDM_STATUS_ERROR) {
383  // function error
384  } else {
385  // function success
386  printf ("status: %d", status);
387  }
388  *
389  * @endcode
390  *
391  * @return #mdm_status_t : Current mode of operation: one of #MDM_ALLOWED or #MDM_RESTRICTED
392  *
393  * @see mdm_set_allow_clipboard
394  *
395  */
396 mdm_status_t mdm_get_allow_clipboard(void);
397 
428 
429 #ifndef MDM_FOR_SOLIS_PROF
430 
459 
460 /*
461  * @brief API to check whether the microphone capability is enabled or not
462  *
463  * @since_mdm 1.0.0
464  *
465  * @since_tizen 2.2.1.1
466  *
467  * @feature %http://developer.samsung.com/tizen/feature/mdm
468  *
469  * @par Usage:
470  * Admin can check whether Microphone capability is enabled or not and take appropriate action based on enterprise
471  policy. The default value is true.
472  * @code{.c}
473  mdm_status_t status = mdm_get_allow_mock_location();
474  if (status == MDM_STATUS_ERROR) {
475  // function error
476  } else {
477  // function success
478  printf ("status: %d", status);
479  }
480  *
481  * @endcode
482  *
483  * @return #mdm_status_t : Current mode of operation: one of #MDM_ALLOWED or #MDM_RESTRICTED
484  *
485  * @see mdm_set_allow_mock_location
486  *
487  */
488 mdm_status_t mdm_get_allow_mock_location(void);
489 
490 #endif /* MDM_FOR_SOLIS_PROF */
491 
520 
521 #ifndef MDM_FOR_SOLIS_PROF
522 
523 /*
524  * @brief API to check if non-market application installation is allowed or not allowed
525  *
526  * @since_mdm 1.0.0
527  *
528  * @since_tizen 2.2.1.1
529  *
530  * @feature %http://developer.samsung.com/tizen/feature/mdm
531  *
532  * @par Usage:
533  * Admin can check whether non-market application installation is allowed on device or not. The default value is true.
534  * @code{.c}
535  mdm_status_t status = mdm_get_allow_nonmarket_app();
536  if (status == MDM_STATUS_ERROR) {
537  // function error
538  } else {
539  // function success
540  printf ("status: %d", status);
541  }
542  *
543  * @endcode
544  *
545  * @return #mdm_status_t : Current mode of operation: one of #MDM_ALLOWED or #MDM_RESTRICTED
546  *
547  * @see mdm_set_allow_nonmarket_app
548  *
549  */
550 mdm_status_t mdm_get_allow_nonmarket_app(void);
551 
552 #endif /* MDM_FOR_SOLIS_PROF */
553 
583 
612 
645 
646 /*
647  * @brief API to check if the end user is allowed to change the USB debugging state.
648  *
649  * @since_mdm 2.2.0
650  *
651  * @since_tizen 3.0.0.1
652  *
653  * @feature %http://developer.samsung.com/tizen/feature/mdm
654  *
655  * @par Usage:
656  * Use this API to check if end users are allowed to access developer mode (USB debugging) on the device.
657  *
658  * @code{.c}
659  mdm_status_t status = knox_mdm_get_allow_usb_debugging_change();
660  if (status == MDM_STATUS_ERROR) {
661  // function error
662  } else {
663  // function success
664  printf ("status: %d", status);
665  }
666  *
667  * @endcode
668  *
669  * @return #mdm_status_t : Current mode of operation: one of #MDM_ALLOWED or #MDM_RESTRICTED
670  *
671  * @retval #MDM_RESTRICTED End users are blocked from changing the USB debugging state.
672  * @retval #MDM_ALLOWED End users are allowed to change the USB debugging state.
673  * @retval #MDM_STATUS_ERROR general error
674  *
675  * @see knox_mdm_set_allow_usb_debugging_change
676  */
677 mdm_status_t knox_mdm_get_allow_usb_debugging_change(void);
678 
679 #ifndef MDM_FOR_SOLIS_PROF
680 
681 /*
682  * @brief API to check whether Samsung USB Kies is enabled or not
683  *
684  * @since_mdm 1.0.0
685  *
686  * @since_tizen 2.2.1.1
687  *
688  * @feature %http://developer.samsung.com/tizen/feature/mdm
689  *
690  * @par Usage:
691  * Admin can check whether device detection from Samsung Kies is allowed or not. The default value is true.
692  * @code{.c}
693  mdm_status_t status = mdm_get_allow_usb_kies();
694  if (status == MDM_STATUS_ERROR) {
695  // function error
696  } else {
697  // function success
698  printf ("status: %d", status);
699  }
700  *
701  * @endcode
702  *
703  * @return #mdm_status_t : Current mode of operation: one of #MDM_ALLOWED or #MDM_RESTRICTED
704  *
705  * @see mdm_set_allow_usb_kies_availability
706  *
707  */
708 mdm_status_t mdm_get_allow_usb_kies(void);
709 
710 /*
711  * @brief API to check whether the USB Mass Storage is enabled or not
712  *
713  * @since_mdm 1.0.0
714  *
715  * @since_tizen 2.2.1.1
716  *
717  * @feature %http://developer.samsung.com/tizen/feature/mdm
718  *
719  * @par Usage:
720  * Admin could can check that whether device can act as USB mass storage or not. The default value is true.
721  * @code{.c}
722  mdm_status_t status = mdm_get_allow_usb_mass_storage();
723  if (status == MDM_STATUS_ERROR) {
724  // function error
725  } else {
726  // function success
727  printf ("status: %d", status);
728  }
729  *
730  * @endcode
731  *
732  * @return #mdm_status_t : Current mode of operation: one of #MDM_ALLOWED or #MDM_RESTRICTED
733  *
734  * @see mdm_set_allow_usb_mass_storage
735  *
736  */
737 mdm_status_t mdm_get_allow_usb_mass_storage(void);
738 
739 #endif /* MDM_FOR_SOLIS_PROF */
740 
741 /*
742  * @brief API to check whether USB media player is enabled or not
743  *
744  * @since_mdm 1.0.0
745  *
746  * @since_tizen 2.2.1.1
747  *
748  * @feature %http://developer.samsung.com/tizen/feature/mdm
749  *
750  * @par Usage:
751  * Admin can check whether USB media player is allowed or not. The default value is true.
752  * @code{.c}
753  mdm_status_t status = mdm_get_allow_usb_media_player();
754  if (status == MDM_STATUS_ERROR) {
755  // function error
756  } else {
757  // function success
758  printf ("status: %d", status);
759  }
760  *
761  * @endcode
762  *
763  * @return #mdm_status_t : Current mode of operation: one of #MDM_ALLOWED or #MDM_RESTRICTED
764  *
765  * @see mdm_set_allow_usb_media_player_availability
766  *
767  */
768 mdm_status_t mdm_get_allow_usb_media_player(void);
769 
770 #ifndef MDM_FOR_SOLIS_PROF
771 
772 /*
773  * @brief API to check whether USB tethering is enabled or not
774  *
775  * @since_mdm 1.0.0
776  *
777  * @since_tizen 2.2.1.1
778  *
779  * @feature %http://developer.samsung.com/tizen/feature/mdm
780  *
781  * @par Usage:
782  * Admin can check whether the device can share its network data via USB or not. The default value is true.
783  * @code{.c}
784  mdm_status_t status = mdm_get_allow_usb_tethering();
785  if (status == MDM_STATUS_ERROR) {
786  // function error
787  } else {
788  // function success
789  printf ("status: %d", status);
790  }
791  *
792  * @endcode
793  *
794  * @return #mdm_status_t : Current mode of operation: one of #MDM_ALLOWED or #MDM_RESTRICTED
795  *
796  * @see mdm_set_allow_usb_tethering
797  *
798  */
799 mdm_status_t mdm_get_allow_usb_tethering(void);
800 
801 /*
802  * @brief API to check whether Wi-Fi tethering is enabled or not
803  *
804  * @since_mdm 1.0.0
805  *
806  * @since_tizen 2.2.1.1
807  *
808  * @feature %http://developer.samsung.com/tizen/feature/mdm
809  *
810  * @par Usage:
811  * Admin can check whether device can share its network data via Wi-Fi or not. The default value is true.
812  * @code{.c}
813  mdm_status_t status = mdm_get_allow_wifi_tethering();
814  if (status == MDM_STATUS_ERROR) {
815  // function error
816  } else {
817  // function success
818  printf ("status: %d", status);
819  }
820  *
821  * @endcode
822  *
823  * @return #mdm_status_t : Current mode of operation: one of #MDM_ALLOWED or #MDM_RESTRICTED
824  *
825  * @see mdm_set_allow_wifi_tethering
826  *
827  */
828 mdm_status_t mdm_get_allow_wifi_tethering(void);
829 
830 /*
831  * @brief API to check if native VPN functionality is allowed or disallowed
832  *
833  * @since_mdm 1.0.0
834  *
835  * @since_tizen 2.2.1.1
836  *
837  * @feature %http://developer.samsung.com/tizen/feature/mdm
838  *
839  * @par Usage:
840  * Admin can check whether user can use native VPN functionality on device or not. The default value is true.
841  * @code{.c}
842  mdm_status_t status = mdm_get_allow_vpn();
843  if (status == MDM_STATUS_ERROR) {
844  // function error
845  } else {
846  // function success
847  printf ("status: %d", status);
848  }
849  *
850  * @endcode
851  *
852  * @return #mdm_status_t : Current mode of operation: one of #MDM_ALLOWED or #MDM_RESTRICTED
853  *
854  * @see mdm_set_allow_vpn
855  *
856  */
857 mdm_status_t mdm_get_allow_vpn(void);
858 
859 /*
860  * @brief API to check whether the USB Host Storage is enabled or not
861  *
862  * @since_mdm 1.0.0
863  *
864  * @since_tizen 2.2.1.1
865  *
866  * @feature %http://developer.samsung.com/tizen/feature/mdm
867  *
868  * @par Usage:
869  * Admin can check whether the device can act as USB host storage or not. The default value is true.
870  * @code{.c}
871  mdm_status_t status = mdm_get_allow_usb_host_storage();
872  if (status == MDM_STATUS_ERROR) {
873  // function error
874  } else {
875  // function success
876  printf ("status: %d", status);
877  }
878  *
879  * @endcode
880  *
881  * @return #mdm_status_t : Current mode of operation: one of #MDM_ALLOWED or #MDM_RESTRICTED
882  *
883  * @see mdm_set_allow_usb_host_storage
884  *
885  */
886 mdm_status_t mdm_get_allow_usb_host_storage(void);
887 
888 /*
889  * @brief API to allow or disallow installation of non market application on device
890  *
891  * @since_mdm 1.0.0
892  *
893  * @since_tizen 2.2.1.1
894  *
895  * @feature %http://developer.samsung.com/tizen/feature/mdm
896  *
897  * @par Usage:
898  * Admin could set this policy to disallow installation of non market application on device.
899  * If it set to false,non market application functionality will be disabled and user will not be able to turn it on
900  until the admin enables it again.
901  * If it set to true, non market application UI control will be enabled. Enable won't really enable the functionality,
902  it just enables corresponding UI setting for user change
903  * @code{.c}
904  mdm_result_t ret = mdm_set_allow_nonmarket_apps(MDM_RESTRICTED);
905  if (ret != MDM_RESULT_SUCCESS) {
906  // function error
907  } else {
908  // function success
909  }
910  *
911  * @endcode
912  *
913  * @privlevel public
914  * @privilege %http://developer.samsung.com/tizen/privilege/mdm.restriction
915  *
916  * @param[in] value
917  * #MDM_ALLOWED = 0,
918  * #MDM_RESTRICTED = 1,
919  *
920  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
921  *
922  * @retval #MDM_RESULT_SUCCESS Successful
923  * @retval #MDM_RESULT_FAIL General failure
924  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
925  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
926  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
927  *
928  * @par Permission:
929  * Usage of this API is restricted to registered clients only.
930  *
931  * @see mdm_get_allow_nonmarket_apps
932  *
933  */
934 mdm_result_t mdm_set_allow_nonmarket_apps(mdm_status_t value);
935 
936 #endif /* MDM_FOR_SOLIS_PROF */
937 
938 /*
939  * @brief API to enable or disable background data
940  *
941  * @since_mdm 1.0.0
942  *
943  * @since_tizen 2.2.1.1
944  *
945  * @feature %http://developer.samsung.com/tizen/feature/mdm
946  *
947  * @par Usage:
948  * Admin can use this policy to disallow any background data usage.
949  * This action blocks any kind of syncing to a server. If it is set to false,
950  * background data functionality will be disabled and user will not be able to turn it on until the admin enables it again.
951  * If it set to true, background data UI control will be enabled.
952  * Enable won't really enable the functionality, it just enables corresponding UI setting for user change.
953  *
954  * @remark
955  * Background data restriction #mdm_status_t is written to #MDM_POLICY_ON_BG_SYNC notification file.
956  * You can register a callback for this event using #mdm_register_policy_receiver.
957  *
958  * @code{.c}
959  mdm_result_t ret = mdm_set_allow_background_data(MDM_RESTRICTED);
960  if (ret != MDM_RESULT_SUCCESS) {
961  // function error
962  } else {
963  // function success
964  }
965  *
966  * @endcode
967  *
968  * @privlevel public
969  * @privilege %http://developer.samsung.com/tizen/privilege/mdm.restriction
970  *
971  * @param[in] value
972  * #MDM_ALLOWED = 0,
973  * #MDM_RESTRICTED = 1,
974  *
975  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
976  *
977  * @retval #MDM_RESULT_SUCCESS Successful
978  * @retval #MDM_RESULT_FAIL General failure
979  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
980  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
981  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
982  *
983  * @par Permission:
984  * Usage of this API is restricted to registered clients only.
985  *
986  * @see mdm_get_allow_background_data
987  *
988  */
989 mdm_result_t mdm_set_allow_background_data(mdm_status_t value);
990 
991 #ifndef MDM_FOR_SOLIS_PROF
992 
993 /*
994  * @brief API to enable or disable the backup
995  *
996  * @since_mdm 1.0.0
997  *
998  * @since_tizen 2.2.1.1
999  *
1000  * @feature %http://developer.samsung.com/tizen/feature/mdm
1001  *
1002  * @par Usage:
1003  * Admin can use this policy to disallow backup. User will not be allowed to backup his data on the server
1004  * @code{.c}
1005  mdm_result_t ret = mdm_set_allow_backup(MDM_RESTRICTED);
1006  if (ret != MDM_RESULT_SUCCESS) {
1007  // function error
1008  } else {
1009  // function success
1010  }
1011  *
1012  * @endcode
1013  *
1014  * @privlevel public
1015  * @privilege %http://developer.samsung.com/tizen/privilege/mdm.restriction
1016  *
1017  * @param[in] value
1018  * #MDM_ALLOWED = 0,
1019  * #MDM_RESTRICTED = 1,
1020  *
1021  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
1022  *
1023  * @retval #MDM_RESULT_SUCCESS Successful
1024  * @retval #MDM_RESULT_FAIL General failure
1025  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
1026  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
1027  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
1028  *
1029  * @par Permission:
1030  * Usage of this API is restricted to registered clients only.
1031  *
1032  * @see mdm_get_allow_backup
1033  *
1034  */
1035 mdm_result_t mdm_set_allow_backup(mdm_status_t value);
1036 
1090 
1091 #endif /* MDM_FOR_SOLIS_PROF */
1092 
1142 
1143 #ifndef MDM_FOR_SOLIS_PROF
1144 
1193 
1194 #endif /* MDM_FOR_SOLIS_PROF */
1195 
1246 
1247 #ifndef MDM_FOR_SOLIS_PROF
1248 
1292 
1293 /*
1294  * @brief API to enable or disable mock locations
1295  *
1296  * @since_mdm 1.0.0
1297  *
1298  * @since_tizen 2.2.1.1
1299  *
1300  * @feature %http://developer.samsung.com/tizen/feature/mdm
1301  *
1302  * @par Usage:
1303  * Admin could set this policy to mock its location. If set to true, the device can change its actual longtitude and
1304  latitude of the device and GPS applications will show the fake location set instead of actual location
1305  * @code{.c}
1306  mdm_result_t ret = mdm_set_allow_mock_location(MDM_RESTRICTED);
1307  if (ret != MDM_RESULT_SUCCESS) {
1308  // function error
1309  } else {
1310  // function success
1311  }
1312  *
1313  * @endcode
1314  *
1315  * @privlevel public
1316  * @privilege %http://developer.samsung.com/tizen/privilege/mdm.restriction
1317  *
1318  * @param[in] value
1319  * MDM_ALLOWED = 0,
1320  * MDM_RESTRICTED = 1,
1321  *
1322  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
1323  *
1324  * @retval #MDM_RESULT_SUCCESS Successful
1325  * @retval #MDM_RESULT_FAIL General failure
1326  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
1327  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
1328  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
1329  *
1330  * @par Permission:
1331  * Usage of this API is restricted to registered clients only.
1332  *
1333  * @see mdm_get_allow_mock_location
1334  *
1335  */
1336 mdm_result_t mdm_set_allow_mock_location(mdm_status_t value);
1337 
1338 #endif /* MDM_FOR_SOLIS_PROF */
1339 
1387 
1432 
1481 
1530 
1531 /*
1532  * @brief API to allow the end users to make changes to the USB debugging state.
1533  *
1534  * @since_mdm 2.2.0
1535  *
1536  * @since_tizen 3.0.0.1
1537  *
1538  * @feature %http://developer.samsung.com/tizen/feature/mdm
1539  *
1540  * @par Usage:
1541  * Use this API to allow or restrict end users from enabling developer mode (USB debugging).
1542  * Restricting access to USB debugging prevents the extraction of vital information (eg. Logs) from the device.
1543  *
1544  * @remark
1545  * Restriction of changing USB debugging state #mdm_status_t is written to #MDM_POLICY_ON_USB_DEBUGGING_CHANGE notification file.
1546  * You can register a callback for this event using #mdm_register_policy_receiver.
1547  *
1548  * @code{.c}
1549  mdm_result_t ret = knox_mdm_set_allow_usb_debugging_change(MDM_RESTRICTED);
1550  if (ret != MDM_RESULT_SUCCESS) {
1551  // function error
1552  } else {
1553  // function success
1554  }
1555  *
1556  * @endcode
1557  *
1558  * @privlevel public
1559  * @privilege %http://developer.samsung.com/tizen/privilege/mdm.restriction
1560  *
1561  * @param[in] status #MDM_ALLOWED – Allows the end user to change the USB debugging state.
1562  * \n #MDM_RESTRICTED – Restricts the end user from changing the USB debugging state.
1563  *
1564  * @return #mdm_result_t : MDM_RESULT_SUCCESS upon successful configuration of end user permission to access USB debugging, or an error
1565  code from the values listed below upon failure.
1566  *
1567  * @retval #MDM_RESULT_SUCCESS Successful
1568  * @retval #MDM_RESULT_FAIL General failure
1569  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
1570  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
1571  * @retval #MDM_RESULT_ACCESS_DENIED The application doesn’t have the privilege to call this function.
1572  *
1573  * @par Permission:
1574  * Usage of this API is restricted to registered clients only.
1575  *
1576  * @see knox_mdm_get_allow_usb_debugging_change
1577  */
1578 mdm_result_t knox_mdm_set_allow_usb_debugging_change(mdm_status_t status);
1579 
1580 #ifndef MDM_FOR_SOLIS_PROF
1581 
1582 /*
1583  * @brief API to enable or disable Samsung Kies
1584  *
1585  * @since_mdm 1.0.0
1586  *
1587  * @since_tizen 2.2.1.1
1588  *
1589  * @feature %http://developer.samsung.com/tizen/feature/mdm
1590  *
1591  * @par Usage:
1592  * Admin could set this policy to disallow device detection from Samsung Kies
1593  * @code{.c}
1594  mdm_result_t ret = mdm_set_allow_usb_kies_availability(MDM_RESTRICTED);
1595  if (ret != MDM_RESULT_SUCCESS) {
1596  // function error
1597  } else {
1598  // function success
1599  }
1600  *
1601  * @remark
1602  * Samsung Kies restriction #mdm_status_t is written to #MDM_POLICY_ON_USB_KIES notification file.
1603  * You can register a callback for this event using #mdm_register_policy_receiver.
1604  *
1605  * @endcode
1606  *
1607  * @privlevel public
1608  * @privilege %http://developer.samsung.com/tizen/privilege/mdm.restriction
1609  *
1610  * @param[in] value
1611  * MDM_ALLOWED = 0,
1612  * MDM_RESTRICTED = 1,
1613  *
1614  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
1615  *
1616  * @retval #MDM_RESULT_SUCCESS Successful
1617  * @retval #MDM_RESULT_FAIL General failure
1618  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
1619  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
1620  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
1621  *
1622  * @par Permission:
1623  * Usage of this API is restricted to registered clients only.
1624  *
1625  * @see mdm_get_allow_usb_kies
1626  *
1627  */
1628 mdm_result_t mdm_set_allow_usb_kies_availability(mdm_status_t value);
1629 
1630 /*
1631  * @brief API to enable or disable the USB Mass Storage
1632  *
1633  * @since_mdm 1.0.0
1634  *
1635  * @since_tizen 2.2.1.1
1636  *
1637  * @feature %http://developer.samsung.com/tizen/feature/mdm
1638  *
1639  * @par Usage:
1640  * Admin could set this policy to block USB access. This will block any kind of browsing device directory through sdb.
1641  * @code{.c}
1642  mdm_result_t ret = mdm_set_allow_usb_mass_storage(MDM_RESTRICTED);
1643  if (ret != MDM_RESULT_SUCCESS) {
1644  // function error
1645  } else {
1646  // function success
1647  }
1648  *
1649  * @endcode
1650  *
1651  * @privlevel public
1652  * @privilege %http://developer.samsung.com/tizen/privilege/mdm.restriction
1653  *
1654  * @param[in] value
1655  * MDM_ALLOWED = 0,
1656  * MDM_RESTRICTED = 1,
1657  *
1658  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
1659  *
1660  * @retval #MDM_RESULT_SUCCESS Successful
1661  * @retval #MDM_RESULT_FAIL General failure
1662  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
1663  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
1664  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
1665  *
1666  * @par Permission:
1667  * Usage of this API is restricted to registered clients only.
1668  *
1669  * @see mdm_get_allow_usb_mass_storage
1670  *
1671  */
1672 mdm_result_t mdm_set_allow_usb_mass_storage(mdm_status_t value);
1673 
1674 #endif /* MDM_FOR_SOLIS_PROF */
1675 
1676 /*
1677  * @brief API to enable or disable USB media player
1678  *
1679  * @since_mdm 1.0.0
1680  *
1681  * @since_tizen 2.2.1.1
1682  *
1683  * @feature %http://developer.samsung.com/tizen/feature/mdm
1684  *
1685  * @par Usage:
1686  * Admin can use this policy to disallow USB media player for device
1687  * @code{.c}
1688  mdm_result_t ret = mdm_set_allow_usb_media_player_availability(MDM_RESTRICTED);
1689  if (ret != MDM_RESULT_SUCCESS) {
1690  // function error
1691  } else {
1692  // function success
1693  }
1694  *
1695  * @remark
1696  * USB media player restriction #mdm_status_t is written to #MDM_POLICY_ON_MTP notification file.
1697  * You can register a callback for this event using #mdm_register_policy_receiver.
1698  *
1699  * @endcode
1700  *
1701  * @privlevel public
1702  * @privilege %http://developer.samsung.com/tizen/privilege/mdm.restriction
1703  *
1704  * @param[in] value
1705  * MDM_ALLOWED = 0,
1706  * MDM_RESTRICTED = 1,
1707  *
1708  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
1709  *
1710  * @retval #MDM_RESULT_SUCCESS Successful
1711  * @retval #MDM_RESULT_FAIL General failure
1712  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
1713  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
1714  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
1715  *
1716  * @par Permission:
1717  * Usage of this API is restricted to registered clients only.
1718  *
1719  * @see mdm_get_allow_usb_media_player
1720  *
1721  */
1722 mdm_result_t mdm_set_allow_usb_media_player_availability(mdm_status_t value);
1723 
1724 #ifndef MDM_FOR_SOLIS_PROF
1725 
1726 /*
1727  * @brief API to enable or disable USB tethering
1728  *
1729  * @since_mdm 1.0.0
1730  *
1731  * @since_tizen 2.2.1.1
1732  *
1733  * @feature %http://developer.samsung.com/tizen/feature/mdm
1734  *
1735  * @par Usage:
1736  * Admin can use this policy to prevents the device from being able to share its carrier data connection with other
1737  * devices around it through USB connection.
1738  * If it set to false,USB tethering functionality will be disabled
1739  * and user will not be able to turn it on until the admin enables it again.
1740  * If it set to true, USB tethering UI control will be enabled.
1741  * Enable won't really enable the functionality and it just enables corresponding UI setting for user change
1742  *
1743  * @remark
1744  * USB tethering restriction #mdm_status_t is written to #MDM_POLICY_ON_USB_TETHERING notification file.
1745  * You can register a callback for this event using #mdm_register_policy_receiver.
1746  *
1747  * @code{.c}
1748  mdm_result_t ret = mdm_set_allow_usb_tethering(MDM_RESTRICTED);
1749  if (ret != MDM_RESULT_SUCCESS) {
1750  // function error
1751  } else {
1752  // function success
1753  }
1754  *
1755  * @endcode
1756  *
1757  * @privlevel public
1758  * @privilege %http://developer.samsung.com/tizen/privilege/mdm.restriction
1759  *
1760  * @param[in] value
1761  * MDM_ALLOWED = 0,
1762  * MDM_RESTRICTED = 1,
1763  *
1764  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
1765  *
1766  * @retval #MDM_RESULT_SUCCESS Successful
1767  * @retval #MDM_RESULT_FAIL General failure
1768  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
1769  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
1770  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
1771  *
1772  * @par Permission:
1773  * Usage of this API is restricted to registered clients only.
1774  *
1775  * @see mdm_get_allow_usb_tethering
1776  *
1777  */
1778 mdm_result_t mdm_set_allow_usb_tethering(mdm_status_t value);
1779 
1780 /*
1781  * @brief API to enable or disable Wi-Fi tethering
1782  *
1783  * @since_mdm 1.0.0
1784  *
1785  * @since_tizen 2.2.1.1
1786  *
1787  * @feature %http://developer.samsung.com/tizen/feature/mdm
1788  *
1789  * @par Usage:
1790  * Admin can use this policy to prevents the device from being able to share its carrier data connection with other
1791  devices around it through Wi-Fi.
1792  * If it set to false, Wi-Fi tethering functionality will be disabled and user will not be able to turn it on until the
1793  admin enables it again.
1794  * If it set to true, Wi-Fi tethering UI control will be enabled. Enable won't really enable the functionality and it
1795  just enables corresponding UI setting for user change
1796  *
1797  * @remark
1798  * Restriction of WiFi tethering #wifi_noti_t is written to #MDM_POLICY_ON_WIFI_TETHERING notification file.
1799  * You can register a callback for this event using #mdm_register_policy_receiver.
1800  *
1801  * @code{.c}
1802  mdm_result_t ret = mdm_set_allow_wifi_tethering(MDM_RESTRICTED);
1803  if (ret != MDM_RESULT_SUCCESS) {
1804  // function error
1805  } else {
1806  // function success
1807  }
1808  *
1809  * @endcode
1810  *
1811  * @privlevel public
1812  * @privilege %http://developer.samsung.com/tizen/privilege/mdm.restriction
1813  *
1814  * @param[in] value
1815  * MDM_ALLOWED = 0,
1816  * MDM_RESTRICTED = 1,
1817  *
1818  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
1819  *
1820  * @retval #MDM_RESULT_SUCCESS Successful
1821  * @retval #MDM_RESULT_FAIL General failure
1822  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
1823  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
1824  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
1825  *
1826  * @par Permission:
1827  * Usage of this API is restricted to registered clients only.
1828  *
1829  * @see mdm_get_allow_wifi_tethering
1830  *
1831  */
1832 mdm_result_t mdm_set_allow_wifi_tethering(mdm_status_t value);
1833 
1834 /*
1835  * @brief API to allow or disallow the user ability to use native VPN functionality
1836  *
1837  * @since_mdm 1.0.0
1838  *
1839  * @since_tizen 2.2.1.1
1840  *
1841  * @feature %http://developer.samsung.com/tizen/feature/mdm
1842  *
1843  * @par Usage:
1844  * Admin can use this policy to disallow native VPN functionality on the device.
1845  * If set to false, user will not be able establish VPN sessions and the UI for using VPN through Settings application
1846  will be in accessible
1847  * @code{.c}
1848  mdm_result_t ret = mdm_set_allow_vpn(MDM_RESTRICTED);
1849  if (ret != MDM_RESULT_SUCCESS) {
1850  // function error
1851  } else {
1852  // function success
1853  }
1854  *
1855  * @endcode
1856  *
1857  * @privlevel public
1858  * @privilege %http://developer.samsung.com/tizen/privilege/mdm.restriction
1859  *
1860  * @param[in] value
1861  * MDM_ALLOWED = 0,
1862  * MDM_RESTRICTED = 1,
1863  *
1864  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
1865  *
1866  * @retval #MDM_RESULT_SUCCESS Successful
1867  * @retval #MDM_RESULT_FAIL General failure
1868  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
1869  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
1870  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
1871  *
1872  * @par Permission:
1873  * Usage of this API is restricted to registered clients only.
1874  *
1875  * @see mdm_get_allow_vpn
1876  *
1877  */
1878 mdm_result_t mdm_set_allow_vpn(mdm_status_t value);
1879 
1880 /*
1881  * @brief API to enable or disable the USB Host Storage
1882  *
1883  * @since_mdm 1.0.0
1884  *
1885  * @since_tizen 2.2.1.1
1886  *
1887  * @par Usage:
1888  * Admin can set this policy to block USB host access. This will block any kind of browsing device directory through
1889  sdb.
1890  *
1891  * @feature %http://developer.samsung.com/tizen/feature/mdm
1892  *
1893  * @code{.c}
1894  mdm_result_t ret = mdm_set_allow_usb_host_storage(MDM_RESTRICTED);
1895  if (ret != MDM_RESULT_SUCCESS) {
1896  // function error
1897  } else {
1898  // function success
1899  }
1900  *
1901  * @endcode
1902  *
1903  * @privlevel public
1904  * @privilege %http://developer.samsung.com/tizen/privilege/mdm.restriction
1905  *
1906  * @param[in] value
1907  * MDM_ALLOWED = 0,
1908  * MDM_RESTRICTED = 1,
1909  *
1910  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
1911  *
1912  * @retval #MDM_RESULT_SUCCESS Successful
1913  * @retval #MDM_RESULT_FAIL General failure
1914  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
1915  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
1916  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
1917  *
1918  * @par Permission:
1919  * Usage of this API is restricted to registered clients only.
1920  *
1921  * @see mdm_get_allow_usb_host_storage
1922  *
1923  */
1924 mdm_result_t mdm_set_allow_usb_host_storage(mdm_status_t value);
1925 
1926 #endif /* MDM_FOR_SOLIS_PROF */
1927 
1957 
2000 
2035 
2081 mdm_result_t mdm_allow_power_off(bool enabled);
2082 
2083 #ifndef MDM_FOR_SOLIS_PROF
2084 
2113 
2154 
2155 #endif /* MDM_FOR_SOLIS_PROF */
2156 
2191 
2227 
2274 
2305 
2306 /*
2307  * This is deprecated function. DO NOT USE THEM!!!
2308  * Left for compatibility reason
2309  */
2310 mdm_status_t mdm_get_allow_firmware_update(void);
2311 
2312 #ifndef MDM_FOR_SOLIS_PROF
2313 
2314 /*
2315  * @brief API to get the enabled or disabled state of a given default restriction policy
2316  *
2317  * @since_mdm 1.0.0
2318  *
2319  * @since_tizen 2.2.1.1
2320  *
2321  * @feature %http://developer.samsung.com/tizen/feature/mdm
2322  *
2323  * @par Usage:
2324  * Admin can use this API to get the enabled or disabled state of a pre-condition policies. Currently available policies
2325  are sdb and app_mgr.
2326  * @code{.c}
2327  mdm_status_t state = 0;
2328  mdm_result_t ret = mdm_get_default_restriction("app_mgr", &state);
2329  if (ret != MDM_RESULT_SUCCESS) {
2330  // failed getting policy state
2331  } else {
2332  // success getting policy state
2333  printf ("state: %d", state);
2334  }
2335  *
2336  * @endcode
2337  *
2338  * @param[in] target The case sensitive default restriction name. Sample values are sdb, app_mgr.
2339  * @param[in] p_status Get information of location.
2340  *
2341  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
2342  *
2343  * @retval #MDM_RESULT_SUCCESS Successful
2344  * @retval #MDM_RESULT_FAIL General failure
2345  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
2346  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
2347  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
2348  *
2349  * @see mdm_set_default_restriction
2350  *
2351  */
2352 mdm_result_t mdm_get_default_restriction(const char *target, mdm_status_t *p_status);
2353 
2354 /*
2355  * @brief API to enable or disable a given default restriction policy
2356  *
2357  * @since_mdm 1.0.0
2358  *
2359  * @since_tizen 2.2.1.1
2360  *
2361  * @feature %http://developer.samsung.com/tizen/feature/mdm
2362  *
2363  * @par Usage:
2364  * Admin can use this API to enable or disable a default restriction policy.
2365  * If it set to RESTRICTED, relevant functionality will be disabled and user will not be able to access until the admin
2366  enables it again.
2367  * if it set to ALLOWED, relevant functionality will be enabled.
2368  * Currently avaiable policies are sdb and app_mgr.
2369  * @code{.c}
2370  mdm_result_t ret = mdm_set_default_restriction(MDM_RESTRICTED, "app_mgr");
2371  if (ret != MDM_RESULT_SUCCESS) {
2372  // failed
2373  } else {
2374  // success
2375  printf ("state: %d", state);
2376  }
2377  *
2378  * @endcode
2379  *
2380  * @privlevel public
2381  * @privilege %http://developer.samsung.com/tizen/privilege/mdm.restriction
2382  *
2383  * @param[in] enable True to enable the location provider, false to disable the provider
2384  * @param[in] target The case sensitive default restriction name. Sample values are sdb, app_mgr.
2385  *
2386  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
2387  *
2388  * @retval #MDM_RESULT_SUCCESS Successful
2389  * @retval #MDM_RESULT_FAIL General failure
2390  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
2391  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
2392  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
2393  *
2394  * @par Permission:
2395  * Usage of this API is restricted to registered clients only.
2396  *
2397  * @see mdm_get_location_provider_state
2398  *
2399  */
2400 mdm_result_t mdm_set_default_restriction(mdm_status_t enabled, const char *target);
2401 
2402 #endif /* MDM_FOR_SOLIS_PROF */
2403 
2459 mdm_result_t knox_mdm_add_notification_white_list(const char * package_name,
2460  const knox_mdm_notification_type_e noti_type,
2461  const knox_mdm_notification_level_e noti_level);
2462 
2516 
2565 
2618 
2674  const knox_mdm_notification_level_e level);
2675 
2729 
2778 
2828 
2888 mdm_result_t knox_mdm_set_allow_power_saving_mode(knox_mdm_power_saving_mode_t mode, mdm_status_t allow);
2889 
2934 mdm_status_t knox_mdm_get_allow_power_saving_mode(knox_mdm_power_saving_mode_t mode);
2935 
2936 /*
2937  * @brief API to set the end users' permission to change power saving mode.
2938  *
2939  * @since_mdm 2.2.0
2940  *
2941  * @since_tizen 3.0.0.1
2942  *
2943  * @feature %http://developer.samsung.com/tizen/feature/mdm
2944  *
2945  * @par Usage:
2946  * The admin could set this policy to block the end user from changing power saving mode:
2947  * \n • If set to MDM_RESTRICTED, the end user isn’t allowed to change power saving mode.
2948  * \n • If it set to MDM_ALLOWED, the end user is allowed to change power saving mode.
2949  * By default all power saving modes are allowed. When power saving mode change is restricted,
2950  * the end user will be unable to enter any power saving mode other than what they are currently on.
2951  * The end user will also be unable to exit power saving mote.
2952  * \n\n Note — this API takes priority over knox_mdm_set_allow_power_saving_mode.
2953  *
2954  * @remark
2955  * Restriction of changing power saving mode #mdm_status_t is written to #MDM_POLICY_ON_POWER_SAVING_MODE notification file.
2956  * You can register a callback for this event using #mdm_register_policy_receiver.
2957  *
2958  * @code{.c}
2959  mdm_result_t ret = mdm_get_service();
2960 
2961  if ( ret == MDM_RESULT_SUCCESS) {
2962  ret = knox_mdm_set_allow_power_saving_mode_change(MDM_RESTRICTED);
2963 
2964  if (ret == MDM_RESULT_SUCCESS) {
2965  // function success
2966  } else {
2967  // function error
2968  }
2969  }
2970  mdm_release_service();
2971  *
2972  * @endcode
2973  *
2974  * @privlevel public
2975  * @privilege %http://developer.samsung.com/tizen/privilege/mdm.restriction
2976  *
2977  * @param[in] allow When set to #MDM_ALLOWED, specified power saving mode is allowed. When set to #MDM_RESTRICTED
2978  * specified power saving mode is disabled.
2979  *
2980  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
2981  *
2982  * @retval #MDM_RESULT_SUCCESS Successful
2983  * @retval #MDM_RESULT_FAIL General failure
2984  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
2985  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
2986  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
2987  *
2988  * @par Permission:
2989  * Usage of this API is restricted to registered clients only.
2990  *
2991  * @see knox_mdm_get_allow_power_saving_mode, knox_mdm_set_allow_power_saving_mode,
2992  knox_mdm_get_allow_power_saving_mode_change
2993  */
2994 mdm_result_t knox_mdm_set_allow_power_saving_mode_change(mdm_status_t allow);
2995 
2996 /*
2997  * @brief API to check if the end user has permission to change power saving mode.
2998  *
2999  * @since_mdm 2.2.0
3000  *
3001  * @since_tizen 3.0.0.1
3002  *
3003  * @feature %http://developer.samsung.com/tizen/feature/mdm
3004  *
3005  * @par Usage:
3006  * Use this API to check if end users can change power saving mode or not. The default value is allowed.
3007  *
3008  * @code{.c}
3009  mdm_result_t ret = mdm_get_service();
3010 
3011  if ( ret == MDM_RESULT_SUCCESS) {
3012  mdm_status_t status = knox_mdm_get_allow_power_saving_mode_change();
3013  if (status == MDM_STATUS_ERROR) {
3014  // function error
3015  } else {
3016  // function success
3017  if ( status == MDM_ALLOWED ) {
3018  // power saving mode change is allowed
3019  } else {
3020  // power saving mode change is restricted
3021  }
3022  }
3023  }
3024  mdm_release_service();
3025  *
3026  * @endcode
3027  *
3028  * @return #mdm_status_t : Current mode of operation: one of #MDM_ALLOWED or #MDM_RESTRICTED
3029  *
3030  * @see knox_mdm_set_allow_power_saving_mode, knox_mdm_set_allow_power_saving_mode_change,
3031  knox_mdm_get_allow_power_saving_mode
3032  *
3033  */
3034 mdm_status_t knox_mdm_get_allow_power_saving_mode_change(void);
3035 
3036 /*
3037  * @brief Function blocks end users from changing airplane mode settings.
3038  *
3039  * @since_mdm 2.2.0
3040  *
3041  * @since_tizen 3.0.0.1
3042  *
3043  * @feature %http://developer.samsung.com/tizen/feature/mdm
3044  *
3045  * @par Usage:
3046  * The admin can use this API to block end users from modifying data airplane mode settings.
3047  *
3048  * @remark
3049  * Changing airplane mode restriction is written to #MDM_POLICY_ON_AIRPLANE_CHANGE notification file.
3050  * You can register a callback for this event using #mdm_register_policy_receiver.
3051  *
3052  * @code{.c}
3053  mdm_result_t result = knox_mdm_set_allow_airplane_mode_change(MDM_RESTRICTED);
3054  if(result == MDM_RESULT_SUCCESS) {
3055  // Success
3056  ...
3057  } else {
3058  // Error
3059  ...
3060  }
3061  * @endcode
3062  *
3063  * @param[in] status #MDM_RESTRICTED blocks end users from modifying airplane mode settings.
3064  * \n #MDM_ALLOWED allows end users to modify airplane mode settings.
3065  *
3066  * @privlevel public
3067  * @privilege %http://developer.samsung.com/tizen/privilege/mdm.restriction
3068  *
3069  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
3070  *
3071  * @retval #MDM_RESULT_SUCCESS Successful
3072  * @retval #MDM_RESULT_FAIL General failure
3073  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
3074  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
3075  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
3076  *
3077  * @see knox_mdm_get_allow_airplane_mode_change
3078  */
3079 mdm_result_t knox_mdm_set_allow_airplane_mode_change(const mdm_status_t status);
3080 
3081 /*
3082  * @brief Function to check if the end user is allowed to make changes to airplane mode settings.
3083  *
3084  * @since_mdm 2.2.0
3085  *
3086  * @since_tizen 3.0.0.1
3087  *
3088  * @feature %http://developer.samsung.com/tizen/feature/mdm
3089  *
3090  * @par Usage:
3091  * Use this API to check if the end user is allowed to modify airplane mode settings.
3092  *
3093  * @code{.c}
3094  mdm_status_t status = knox_mdm_get_allow_airplane_mode_change();
3095  if(result == MDM_RESTRICTED) {
3096  // Changes are blocked
3097  ...
3098  } else if(result == MDM_ALLOWED) {
3099  // Changes are allowed
3100  ...
3101  }
3102  else
3103  {
3104  // ERROR
3105  ...
3106  }
3107  * @endcode
3108  *
3109  * @return #mdm_status_t : The current prevention status.
3110  *
3111  * @retval #MDM_RESTRICTED The end user is restricted from modifying airplane mode settings.
3112  * @retval #MDM_ALLOWED The end user is allowed to modify airplane mode settings.
3113  * @retval #MDM_STATUS_ERROR On any error.
3114  *
3115  * @see knox_mdm_set_allow_airplane_mode_change
3116  */
3117 mdm_status_t knox_mdm_get_allow_airplane_mode_change(void);
3118 
3166 
3204 
3209 #ifdef __cplusplus
3210 }
3211 #endif
3212 
3213 #endif //LIBMDM_MDM_RESTRICTION_H
mdm_status_t mdm_get_allow_settings_changes(void)
API to check whether user is allowed to make changes in device settings through settings application ...
noti_t
MDM restriction location notify.
Definition: restriction.h:51
mdm_result_t mdm_set_location_provider_state(const char *p_provider, mdm_status_t enable)
API to enable or disable a given location provider.
mdm_data_t * mdm_get_all_location_providers(void)
API to get all available location services on the device.
mdm_result_t mdm_set_allow_settings_changes(mdm_status_t value)
API to allow or deny changes to Settings applications.
This structure is used to store GList.
mdm_data_t * knox_mdm_get_notification_white_list(bool all_admin)
API to get the contents of the application notification white list.
mdm_result_t mdm_set_allow_clipboard(mdm_status_t value)
API to enable or disable Clipboard.
mdm_result_t mdm_get_location_provider_state(char *p_provider, mdm_status_t *p_status)
API to get the enabled or disabled state of a given location provider.
mdm_status_t mdm_is_stop_system_app_allowed(void)
API to check whether the user is allowed to stop a system application.
mdm_status_t mdm_get_allow_screen_capture(void)
API to check whether screen capture setting is enabled or not.
mdm_status_t mdm_get_allow_license_activation(void)
API to block other MDM clients ability to activate license.
mdm_result_t mdm_set_allow_cellular_data(mdm_status_t value)
API to enable or disable cellular data.
mdm_result_t knox_mdm_delete_notification_white_list(const char *package_name, const knox_mdm_notification_type_e type)
API to delete an application from the notification white list.
mdm_status_t
MDM Policy status.
knox_mdm_notification_type_e type
Definition: restriction.h:97
knox_mdm_power_saving_mode_t
Power saving modes.
Definition: restriction.h:106
mdm_status_t mdm_get_allow_cellular_data(void)
API to check if cellular data is enabled or disabled.
mdm_result_t mdm_set_allow_home_key(mdm_status_t value)
API to allow or disallow the user ability of home key on the device.
mdm_status_t mdm_get_allow_factory_reset(void)
API to check if an end user is allowed to perform a factory reset on a device.
knox_mdm_notification_level_e
MDM notification level displayed on Lock Screen.
Definition: restriction.h:84
mdm_status_t knox_mdm_get_allow_power_saving_mode(knox_mdm_power_saving_mode_t mode)
API to check whether a specific power saving mode is allowed or not.
mdm_result_t knox_mdm_delete_notification_black_list(const char *package_name, const knox_mdm_notification_type_e type)
API to delete an application from the notification black list.
mdm_result_t knox_mdm_clear_notification_black_list(void)
API to clear the application notification black list of its contents.
status_t
MDM restriction location setting.
Definition: restriction.h:40
mdm_status_t knox_mdm_get_allow_airplane_mode(void)
Function returns the current status of airplane mode.
mdm_result_t mdm_set_allow_factory_reset(mdm_status_t value)
API to configure end user permission to perform a factory reset on a device.
mdm_status_t mdm_get_allow_bluetooth_tethering(void)
API to check whether Bluetooth tethering is enabled or not.
mdm_result_t knox_mdm_clear_notification_white_list(void)
API to clear the application notification white list of its contents.
mdm_status_t knox_mdm_get_allow_firmware_update(void)
API to check if end users are allowed to perform a firmware update.
knox_mdm_notification_level_e level
Definition: restriction.h:98
mdm_result_t mdm_allow_firmware_recovery(bool enabled)
API to set an end user&#39;s permission to perform a firmware recovery.
mdm_result_t mdm_allow_power_off(bool enabled)
API to allow or disallow the user to power off the device.
mdm_result_t mdm_set_allow_nfc(mdm_status_t value)
API to enable or disable NFC.
Application notification details.
Definition: restriction.h:95
mdm_result_t
MDM API result.
mdm_result_t mdm_set_allow_bluetooth_tethering(mdm_status_t value)
API to enable or disable Bluetooth Tethering.
mdm_data_t * knox_mdm_get_notification_black_list(bool all_admin)
API to get the contents of the application notification black list.
mdm_status_t mdm_is_power_off_allowed(void)
API to check whether the user is allowed to power off the device.
mdm_status_t mdm_get_allow_home_key(void)
API to check whether the home key is enabled or not.
mdm_status_t mdm_get_allow_usb_debugging(void)
API to check if USB debugging is allowed on a device.
mdm_result_t knox_mdm_set_allow_power_saving_mode(knox_mdm_power_saving_mode_t mode, mdm_status_t allow)
API that allows or disallows end users from entering a specified power saving mode.
mdm_result_t knox_mdm_add_notification_black_list(const char *package_name, const knox_mdm_notification_type_e type, const knox_mdm_notification_level_e level)
API to add an application to the notification black list.
mdm_result_t knox_mdm_set_allow_airplane_mode(const mdm_status_t status)
Function turn airplane mode on/off.
mdm_result_t mdm_allow_stop_system_app(bool enabled)
API to allow or disallow the user to stop a system application.
mdm_status_t mdm_is_firmware_recovery_allowed(void)
API to check if the end user is allowed to perform a firmware recovery.
mdm_result_t knox_mdm_add_notification_white_list(const char *package_name, const knox_mdm_notification_type_e noti_type, const knox_mdm_notification_level_e noti_level)
API to add an application to the notification white list.
mdm_result_t mdm_set_allow_screen_capture(mdm_status_t value)
API to enable or disable screen capture.
mdm_status_t mdm_get_allow_nfc(void)
API to check whether NFC is enabled or not.
mdm_result_t knox_mdm_set_allow_firmware_update(mdm_status_t value)
API to block end users from performing a firmware update.
mdm_result_t mdm_set_allow_usb_debugging(mdm_status_t value)
API to enable or disable USB debugging.
knox_mdm_notification_type_e
MDM notification type.
Definition: restriction.h:66
mdm_result_t mdm_set_allow_license_activation(mdm_status_t is_blocked)
API to block other clients ability to activate license.