Knox Tizen Wearable SDK
mdm_client_type.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 /*
20  *@brief This file serves as an interface between the Application and MDM server daemon.
21  */
22 
23 #ifndef LIBMDM_MDM_MDM_CLIENT_TYPE_H
24 #define LIBMDM_MDM_MDM_CLIENT_TYPE_H
25 
26 #include <stdint.h>
27 #include <glib.h>
28 #include <tizen_error.h>
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 #ifndef MDM_DEPRECATED_API
35 #define MDM_DEPRECATED_API __attribute__((deprecated))
36 #endif
37 
48 typedef enum {
72  MDM_MAX_CB
74 
81 typedef void (*mdm_client_callback_function)(int oper, void *cb_data, void *user_data);
82 
89 typedef void (*mdm_client_callback_function_ext)(void *cb_data, void *user_data);
90 
97 typedef void (*mdm_client_callback_function_free)(void *data);
98 
104 typedef enum _mdm_result {
105  MDM_RESULT_SERVICE_NOT_ENABLED = TIZEN_ERROR_NOT_PERMITTED,
106  MDM_RESULT_ACCESS_DENIED = TIZEN_ERROR_PERMISSION_DENIED,
107  MDM_RESULT_INVALID_PARAM = TIZEN_ERROR_INVALID_PARAMETER,
108  MDM_RESULT_NOT_SUPPORTED = TIZEN_ERROR_NOT_SUPPORTED,
109  MDM_RESULT_FAIL = TIZEN_ERROR_UNKNOWN,
110  MDM_RESULT_SUCCESS = TIZEN_ERROR_NONE,
111  MDM_NOT_AN_OWNER = TIZEN_ERROR_END_OF_COLLECTION + 1
112 } mdm_result_t;
113 
119 typedef enum _mdm_status {
128  MDM_FALSE = 0,
129  MDM_TRUE = 1,
130 } mdm_status_t;
131 
137 typedef enum _mdm_status_enabled {
138  STATUS_ENABLED = 0,
139  STATUS_DISABLED = 1,
140  STATUS_ENABLED_ERROR = -1
142 
148 typedef enum _mdm_status_allowed {
149  STATUS_ALLOWED = 0,
150  STATUS_RESTRICTED = 1,
151  STATUS_ALLOWED_ERROR = -1
153 
159 typedef enum _mdm_status_true { STATUS_TRUE = 1, STATUS_FALSE = 0, STATUS_TRUE_ERROR = -1 } mdm_status_true;
160 
167 typedef struct _mem_header {
168  int id;
169  void (*free_func)(void *block);
170 } mem_header_t;
171 
177 typedef struct _mdm_data {
178  mdm_result_t ret;
180  void * data;
181 } mdm_data_t;
182 
200 typedef enum {
205 
212 typedef struct {
213  const char * package_name;
214  const char * privilege;
215  mdm_privacy_permission_state_t state;
216  int uid;
218 
222 typedef enum {
223  MDM_SERVER_LOG_LEVEL_DEBUG,
224  MDM_SERVER_LOG_LEVEL_INFO,
225  MDM_SERVER_LOG_LEVEL_WARN,
226  MDM_SERVER_LOG_LEVEL_ERROR,
227  MDM_SERVER_LOG_LEVEL_SILENT,
229 
234 #ifdef __cplusplus
235 }
236 #endif
237 
238 
239 #endif // LIBMDM_MDM_MDM_CLIENT_TYPE_H
mdm_privacy_permission_state_t state
mdm_status_enabled
MDM Policy enabled/disabled status.
This structure is used to store GList.
Place at the front of any structure or block of memory that is intended to be disowned by the allocat...
void(* mdm_client_callback_function_free)(void *data)
Policy callback user data memory free function.
mdm_privacy_permission_state_t
Runtime permission policy value stored in the following states.
mdm_policy_cb_t
Enumerate policy callback.
void(* mdm_client_callback_function_ext)(void *cb_data, void *user_data)
Policy callback function pointer.
mdm_status_t
MDM Policy status.
int uid
void(* mdm_client_callback_function)(int oper, void *cb_data, void *user_data)
Policy callback function pointer.
mdm_status_allowed
MDM Policy allowed/restricted status.
This structure represents entry information about single runtime permission specification.
mdm_result_t ret
mdm_status_true
MDM Policy true/false status.
mdm_result_t
MDM API result.
mem_header_t mem_header
const char * package_name
const char * privilege
mdm_server_log_level_t
Definitions of log levels for MDM server.