Knox Tizen Wearable SDK
knox_custom_system_manager.h
1 /*
2  * libknoxcustom
3  * Copyright ⓒ Samsung Electronics, Co., Ltd. All rights reserved.
4  *
5  * This software contains confidential and proprietary information
6  * of Samsung Electronics Co., Ltd.
7  * The user of this software agrees not to disclose, disseminate or copy such
8  * Confidential Information and shall use the software only in accordance with
9  * the terms of the license agreement the user entered into with Samsung.
10  */
11 
12 
13 #ifndef __KNOX_CUSTOM_SYSTEM_MANAGER_H__
14 #define __KNOX_CUSTOM_SYSTEM_MANAGER_H__
15 
16 #include "knox_custom_client_type.h"
17 #ifdef __cplusplus
18 extern "C"
19 {
20 #endif
21 
26 #ifndef DOXYGEN_SKIP_EMERGENCY_CALL
27 
33 typedef enum {
34  KNOX_CUSTOM_EMERGENCY_FLAG_OFF = 0,
35  KNOX_CUSTOM_EMERGENCY_FLAG_ON,
36 } knox_custom_emergency_flag_mode;
37 
44 typedef enum {
45  KNOX_CUSTOM_EMERGENCY_NUMBER_WHITELIST_ADD = 0, /* Add emergency number */
46  KNOX_CUSTOM_EMERGENCY_NUMBER_WHITELIST_REMOVE , /* Delete emergency number */
47  KNOX_CUSTOM_EMERGENCY_NUMBER_WHITELIST_REMOVE_ALL, /* Delete all emergency number */
48 } knox_custom_emergency_number_whitelist_mode;
49 
56 typedef enum {
57  KNOX_CUSTOM_EMERGENCY_NUMBER_WHITELIST_FALSE = 0,
58  KNOX_CUSTOM_EMERGENCY_NUMBER_WHITELIST_TRUE,
59 } knox_custom_emergency_number_whitelist_state;
60 #endif /* DOXYGEN_SKIP_EMERGENCY_CALL */
61 
68 typedef enum {
72 
79 typedef enum {
80  KNOX_CUSTOM_AUTO_CALL_ANSWERING_NUMBER_WHITELIST_ADD = 0, /* Add auto call answering number */
81  KNOX_CUSTOM_AUTO_CALL_ANSWERING_NUMBER_WHITELIST_REMOVE, /* Delete auto call answering number */
82  KNOX_CUSTOM_AUTO_CALL_ANSWERING_NUMBER_WHITELIST_REMOVE_ALL, /* Delete all auto call answering number */
84 
91 typedef enum {
92  KNOX_CUSTOM_CLEAR_BOOT_ANIMATION = 1, /* Clear Boot Animation */
93  KNOX_CUSTOM_CLEAR_SHUTDOWN_ANIMATION, /* Clear Shutdown Animation */
94  KNOX_CUSTOM_CLEAR_ALL_ANIMATION, /* Clear Both Boot and Shutdown Animation */
96 
103 typedef enum {
110 
111 /*
112  * @brief Cool down changed callback function pointer
113  * @since_Knox_wearable 2.3.1
114  * @since_tizen 4.0.0.4
115  * @see knox_custom_set_cool_down_mode_changed_cb
116  *
117  * @param[in] mode Cool down mode
118  * @param[in] user_data User data
119  *
120  */
121 typedef void (*knox_custom_cool_down_mode_changed_cb)(knox_custom_cool_down_mode mode, void *user_data);
122 
161 
201 
243 knox_result_t knox_custom_set_home_key_doublepress(const char * package_name, const char * app_id);
244 
275 
314 knox_result_t knox_custom_set_boot_animation(const char * animation_path);
315 
353 knox_result_t knox_custom_set_shutdown_animation(const char * animation_path);
354 
395 knox_result_t knox_custom_clear_animation(knox_custom_clear_animation_mode mode);
396 
397 #ifndef DOXYGEN_SKIP_EMERGENCY_CALL
398 
439 knox_result_t knox_custom_set_emergency_flag(knox_custom_emergency_flag_mode mode);
440 
482 knox_result_t knox_custom_get_emergency_flag(knox_custom_emergency_flag_mode * mode);
483 
533 knox_result_t knox_custom_set_emergency_number_whitelist(const char * numberlist, knox_custom_emergency_number_whitelist_mode mode);
534 
566 knox_custom_data_t * knox_custom_get_emergency_number_whitelist(void);
567 
612 knox_result_t knox_custom_is_emergency_number_whitelist(const char * emergency_number, knox_custom_emergency_number_whitelist_state * state);
613 #endif /* DOXYGEN_SKIP_EMERGENCY_CALL */
614 
658 knox_result_t knox_custom_set_auto_call_answering_mode(knox_custom_auto_call_answering_mode mode);
659 
698 knox_result_t knox_custom_get_auto_call_answering_mode(knox_custom_auto_call_answering_mode * mode);
699 
748 knox_result_t knox_custom_set_auto_call_answering_number_whitelist(const char * numberlist, knox_custom_auto_call_answering_number_whitelist_mode mode);
749 
787 
829 knox_result_t knox_custom_is_incoming_call_number_in_whitelist(const char * incoming_call_number, knox_custom_status_t * status);
830 
866 
921 knox_result_t knox_custom_read_cool_down_mode(knox_custom_cool_down_mode *mode);
922 
923 /*
924  * @brief API to set callback function called when cool down mode is changed
925  *
926  * @since_Knox_wearable 2.3.1
927  *
928  * @since_tizen 4.0.0.4
929  *
930  * @feature %http://developer.samsung.com/tizen/feature/knox.custom
931  *
932  * @par Usage:
933  * The admin can use this API to get the cool down mode.
934  *
935  * @code{.c}
936  //callback function
937  void cool_down_mode_changed(knox_custom_cool_down_mode mode, void *user_data)
938  {
939  //do something with new state
940  }
941  ...
942  knox_result_t ret;
943  //set callback
944  ret = knox_custom_set_cool_down_mode_changed_cb(cool_down_mode_changed, NULL);
945  if (ret == KNOX_RESULT_SUCCESS) {
946  printf("Callback set success!");
947  } else {
948  printf("Failed to set callback!");
949  }
950  * @endcode
951  *
952  * @privlevel public
953  *
954  * @privilege %http://developer.samsung.com/tizen/privilege/knoxcustom.system
955  *
956  * @param[in] callback Callback function
957  * @param[in] user_data User data that is passed to the callback function
958  *
959  * @note Only one callback function can be set at the same time
960  *
961  * @retval #KNOX_RESULT_SUCCESS Successful
962  * @retval #KNOX_RESULT_FAIL General failure
963  * @retval #KNOX_RESULT_NOT_SUPPORTED Not supported
964  * @retval #KNOX_RESULT_INVALID_PARAM Invalid parameter
965  * @retval #KNOX_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
966  *
967  * @return #KNOX_RESULT_SUCCESS on success, other values on fail.
968  *
969  * @see knox_custom_read_cool_down_mode, knox_custom_unset_cool_down_mode_changed_cb
970  */
971 knox_result_t knox_custom_set_cool_down_mode_changed_cb(knox_custom_cool_down_mode_changed_cb callback, void *user_data);
972 
973 /*
974  * @brief API to remove callback function called when cool down mode is changed
975  *
976  * @since_Knox_wearable 2.3.1
977  *
978  * @since_tizen 4.0.0.4
979  *
980  * @feature %http://developer.samsung.com/tizen/feature/knox.custom
981  *
982  * @par Usage:
983  * The admin can use this API to get the cool down mode.
984  *
985  * @code{.c}
986  knox_result_t ret;
987  //set callback
988  ret = knox_custom_unset_cool_down_mode_changed_cb();
989  if (ret == KNOX_RESULT_SUCCESS) {
990  printf("Callback unset success!");
991  } else {
992  printf("Failed to unset callback!");
993  }
994  * @endcode
995  *
996  * @privlevel public
997  *
998  * @privilege %http://developer.samsung.com/tizen/privilege/knoxcustom.system
999  *
1000  * @retval #KNOX_RESULT_SUCCESS Successful
1001  * @retval #KNOX_RESULT_FAIL General failure
1002  * @retval #KNOX_RESULT_NOT_SUPPORTED Not supported
1003  * @retval #KNOX_RESULT_INVALID_PARAM Invalid parameter
1004  * @retval #KNOX_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
1005  *
1006  * @return #KNOX_RESULT_SUCCESS on success, other values on fail.
1007  *
1008  * @see knox_custom_read_cool_down_mode, knox_custom_set_cool_down_mode_changed_cb
1009  */
1010 knox_result_t knox_custom_unset_cool_down_mode_changed_cb(void);
1011 
1016 #ifdef __cplusplus
1017 }
1018 #endif
1019 
1020 #endif
knox_result_t knox_custom_clear_animation(knox_custom_clear_animation_mode mode)
API to clear animation.
knox_result_t knox_custom_get_auto_call_answering_mode(knox_custom_auto_call_answering_mode *mode)
API to get the status of automatic call answering mode.
knox_result_t knox_custom_set_boot_animation(const char *animation_path)
API to configure boot animation on the device.
knox_custom_auto_call_answering_number_whitelist_mode
Phone number whitelist mode for automatic call answering.
knox_custom_auto_call_answering_mode
Automatic call answering mode.
knox_result_t knox_custom_is_incoming_call_number_in_whitelist(const char *incoming_call_number, knox_custom_status_t *status)
API to check if the incoming call number is whitelisted or not.
knox_custom_data_t * knox_custom_get_home_key_doublepress(void)
API to get the package name that is set for home key double-press.
This structure is used to store GList.
knox_result_t knox_custom_set_auto_call_answering_mode(knox_custom_auto_call_answering_mode mode)
API to set the automatic call answering mode.
knox_result_t knox_custom_set_shutdown_animation(const char *animation_path)
API to configure shutdown animation on the device.
knox_result_t knox_custom_set_home_key_doublepress(const char *package_name, const char *app_id)
API to configure an application to launch when the end user double presses the physical home key...
knox_result_t
KNOX_CUSTOM API result.
knox_result_t knox_custom_read_cool_down_mode(knox_custom_cool_down_mode *mode)
API to get the current value of the device's cool down mode.
knox_result_t knox_custom_create_dump_state_log(void)
API to create dump state log.
knox_custom_data_t * knox_custom_get_auto_call_answering_number_whitelist(void)
API to get phone number whitelist for automatic call answering.
knox_custom_status_t
KNOX_CUSTOM Policy status.
knox_result_t knox_custom_set_enable_hid_state(void)
API to set the Bluetooth HID state.
knox_custom_clear_animation_mode
Clear Animation mode.
knox_result_t knox_custom_set_auto_call_answering_number_whitelist(const char *numberlist, knox_custom_auto_call_answering_number_whitelist_mode mode)
API to whitelist a number for automatic call answering.
knox_result_t knox_custom_set_back_key_longpress(const char *appid)
API to configure an application to launch when the physical back key is long-pressed.
knox_custom_cool_down_mode
Cool down mode.