Knox Tizen Wearable SDK
knox_custom.h
1 /*
2  * libknoxcustom
3  * Copyright (c) 2012 Samsung Electronics Co., Ltd.
4  * All rights reserved.
5  *
6  * This software contains confidential and proprietary information
7  * of Samsung Electronics Co., Ltd.
8  * The user of this software agrees not to disclose, disseminate or copy such
9  * Confidential Information and shall use the software only in accordance with
10  * the terms of the license agreement the user entered into with Samsung.
11  */
12 
13 
14 #ifndef __KNOX_CUSTOM_H__
15 #define __KNOX_CUSTOM_H__
16 
17 #include "knoxcustom/knox_custom_device_manager.h"
18 #include "knoxcustom/knox_custom_prokiosk_manager.h"
19 #include "knoxcustom/knox_custom_settings_manager.h"
20 #include "knoxcustom/knox_custom_system_manager.h"
21 
22 
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26 
64 
107 int knox_custom_get_service_ext(const char * pkg_name);
108 
141 
174 int knox_custom_register_client(const char * pkg_name);
175 
208 int knox_custom_deregister_client(const char * pkg_name);
209 
210 /*
211  * @brief API to check if KnoxCustom client is registered.
212  *
213  * @since_Knox_wearable 2.3.0
214  *
215  * @since_tizen 4.0.0.3
216  *
217  * @feature %http://developer.samsung.com/tizen/feature/knox.custom
218  *
219  * @par Usage:
220  * This API returns registration status of a client.
221  *
222  * @note This call does not require calling #knox_custom_get_service().
223  *
224  * @code{.c}
225 
226  knox_custom_status_t status = knox_custom_is_client_registered("com.3rdparty.knox_custom_client");
227  if (status != KNOX_CUSTOM_TRUE)
228  {
229  knox_custom_result_t ret = knox_custom_register_client("com.3rdparty.knox_custom_client");
230  if (ret == KNOX_CUSTOM_RESULT_SUCCESS)
231  {
232  ret = knox_custom_get_service();
233  if (ret == KNOX_CUSTOM_RESULT_SUCCESS)
234  {
235  // Calling KnoxCustom APIs.
236  }
237  knox_custom_release_service();
238  }
239  }
240 
241  * @endcode
242  *
243  * @param[in] pkg_name The package name of the KnoxCustom client.
244  *
245  * @return #knox_custom_status_t : Whether client is registered
246  *
247  * @retval #KNOX_CUSTOM_TRUE Client is registered
248  * @retval #KNOX_CUSTOM_FALSE Client is not registred
249  * @retval #KNOX_CUSTOM_STATUS_ERROR Error
250  *
251  * @see knox_custom_register_client, knox_custom_deregister_client
252  */
253 knox_custom_status_t knox_custom_is_client_registered(const char *pkg_name);
254 
278 
279 
284 #ifdef __cplusplus
285 }
286 #endif
287 
288 #endif /* __KNOX_CUSTOM_H__ */
int knox_custom_register_client(const char *pkg_name)
API to register a Knox Custom client (application) that can set or apply secure policies to the Galax...
void knox_custom_free_data(knox_custom_data_t *data)
API to free pre-allocated knox_custom_data_t structure.
This structure is used to store GList.
knox_result_t knox_custom_get_service(void)
API to connect to the Knox Custom server daemon, and to verify whether caller is registered or not...
int knox_custom_get_service_ext(const char *pkg_name)
API to connect to the Knox Custom server daemon.
knox_result_t knox_custom_release_service(void)
API to close the connection, and release the resources.
knox_result_t
KNOX_CUSTOM API result.
int knox_custom_deregister_client(const char *pkg_name)
API to de-register the Knox Custom client that can set or apply secure policies to the Galaxy Watch d...
knox_custom_status_t
KNOX_CUSTOM Policy status.