Knox Tizen Wearable SDK
mdm.h
1 /*
2  * libmdm
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 #ifndef LIBMDM_MDM_H
13 #define LIBMDM_MDM_H
14 
15 #include "mdm/apn.h"
16 #include "mdm/application.h"
17 #include "mdm/bluetooth.h"
18 #include "mdm/browser.h"
19 #include "mdm/container.h"
20 #include "mdm/date_time.h"
21 #include "mdm/device_inventory.h"
22 #include "mdm/eas.h"
23 #include "mdm/email.h"
24 #include "mdm/enterprise_device.h"
25 #include "mdm/firewall.h"
26 #include "mdm/kiosk.h"
27 #include "mdm/license.h"
28 #include "mdm/location.h"
29 #include "mdm/log_manager.h"
30 #include "mdm/misc.h"
31 #include "mdm/password.h"
32 #include "mdm/phone_restriction.h"
33 #include "mdm/phone_restriction_sim.h"
34 #include "mdm/remote.h"
35 #include "mdm/restriction.h"
36 #include "mdm/roaming.h"
37 #include "mdm/security.h"
38 #include "mdm/vpn.h"
39 #include "mdm/wifi.h"
40 
51 typedef enum {
186  MDM_POLICY_NOTI_MAX2
188 
189 #define MDMAPI_DUALSIM
190 
191 #ifdef __cplusplus
192 extern "C" {
193 #endif
194 
201 typedef struct policy_receiver_s policy_receiver_t;
202 
211 
218 typedef void (*on_policy_receiver_callback)(int status, void *p_user_data);
219 
269 
321 MDM_DEPRECATED_API int mdm_get_service_ext(const char *pkg_name);
322 
358 
406 mdm_status_t mdm_is_client_registered(const char *pkg_name);
407 
451 int mdm_register_client(const char *pkg_name);
452 
506 int mdm_deregister_client(const char *pkg_name);
507 
567 policy_receiver_handle mdm_register_policy_receiver(mdm_policy_noti_t noti, void *user_data,
568  on_policy_receiver_callback callback);
569 
611 
643 void mdm_free_data(mdm_data_t *data);
644 
645 /*
646  * @brief API to set the domain name to be modifed/read.
647  *
648  * @since_mdm 1.0.0
649  *
650  * @since_tizen 2.3.1.5
651  *
652  * @feature %http://developer.samsung.com/tizen/feature/mdm
653  *
654  * @par Usage:
655  * This function sets the active domain to be modified by MDM policies.
656  * If this function is not called to set a domain, then when a policy function
657  * is called, it requests that its operations be executed on the device.
658  * The function does not validate the entered domain name.
659  *
660  * @code{.c}
661 
662  mdm_result_t res;
663 
664  mdm_set_domain("domain-1");
665  res = mdm_set_as_default_account(1)
666 
667  mdm_set_domain("domain-2");
668  res = mdm_add_new_email_account(2);
669 
670  * @endcode
671  *
672  * @privlevel public
673  *
674  * @param[in] domain_name The domain name to be modifed/read.
675  *
676  * @return #mdm_result_t : MDM_RESULT_SUCCESS on success, an error code on error
677  *
678  * @retval #MDM_RESULT_SUCCESS Successful
679  * @retval #MDM_RESULT_FAIL General failure
680  * @retval #MDM_RESULT_NOT_SUPPORTED Not supported
681  * @retval #MDM_RESULT_INVALID_PARAM Invalid parameter
682  * @retval #MDM_RESULT_ACCESS_DENIED The application does not have the privilege to call this function.
683 
684  *
685  */
686 mdm_result_t mdm_set_domain(char *domain_name);
687 
734  mdm_client_callback_function_free free_cb, void *userData);
735 
755 
756 
761 #ifdef __cplusplus
762 }
763 #endif
764 
765 #endif // LIBMDM_MDM_H
This structure is used to store GList.
void(* mdm_client_callback_function_free)(void *data)
Policy callback user data memory free function.
void mdm_free_data(mdm_data_t *data)
API to free an mdm_data_t structure.
mdm_policy_cb_t
Enumerate policy callback.
mdm_status_t
MDM Policy status.
mdm_result_t mdm_get_last_error(void)
API to get the error code of the last MDM function called in current thread.
int mdm_register_client_callback(mdm_policy_cb_t policy, mdm_client_callback_function cb, mdm_client_callback_function_free free_cb, void *userData)
API to register a callback function for the given policy.
void(* mdm_client_callback_function)(int oper, void *cb_data, void *user_data)
Policy callback function pointer.
mdm_result_t mdm_deregister_policy_receiver(policy_receiver_t *handle)
API to deregister the policy change callback function.
void(* on_policy_receiver_callback)(int status, void *p_user_data)
Policy receiver callback to be called in case of policy change.
Definition: mdm.h:218
mdm_result_t mdm_get_service(void)
API to connect to MDM server daemon, and get caller information.
mdm_result_t mdm_release_service(void)
API to close the connection and release the resources.
policy_receiver_handle mdm_register_policy_receiver(mdm_policy_noti_t noti, void *user_data, on_policy_receiver_callback callback)
API to register a callback function that is called when a policy is changed during runtime...
mdm_policy_noti_t
Enumerate policy change notification type.
Definition: mdm.h:51
struct policy_receiver_s policy_receiver_t
Policy receiver handle type.
Definition: mdm.h:201
mdm_result_t
MDM API result.
int mdm_deregister_client(const char *pkg_name)
API to close current session with MDM server.
policy_receiver_t * policy_receiver_handle
Definition: mdm.h:210
mdm_status_t mdm_is_client_registered(const char *pkg_name)
API to check if an MDM client is registered in MDM Server.
int mdm_register_client(const char *pkg_name)
API to register an MDM client.
int mdm_get_service_ext(const char *pkg_name)
API to connect to the MDM server daemon and get caller information.