Knox Tizen Wearable SDK
Custom Device Manager group

Device Manager group provides the APIs related to device management. More...

Functions

knox_custom_data_tknox_custom_get_sdk_version (void)
 API to get the Knox Custom SDK version. More...
 
knox_result_t knox_custom_get_permission (const char *permission)
 API to check if a specific Knox Customization privilege is granted to the application or not. More...
 

Detailed Description

Device Manager group provides the APIs related to device management.

Custom Device Manager group

This group provides APIs to check the SDK version and to check the privileges granted to an application.

Required Header

#include <knox_custom.h>

Function Documentation

knox_result_t knox_custom_get_permission ( const char *  permission)

API to check if a specific Knox Customization privilege is granted to the application or not.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage:
The admin can call this API to check if a specific Knox Customization privilege is granted to the application or not.
ret = knox_custom_get_permission("http://developer.samsung.com/tizen/privilege/knoxcustom.setting");
if (ret == KNOX_RESULT_SUCCESS) {
//privilige granted
} else {
// privilige not granted
}
Parameters
[in]permissionprivilege of knox custom
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_INVALID_PARAMInvalid parameter
Returns
KNOX_RESULT_SUCCESS on success, an error code on error
knox_custom_data_t* knox_custom_get_sdk_version ( void  )

API to get the Knox Custom SDK version.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage:
The admin can use this API to get the value of the Knox Custom SDK version.
knox_custom_data_t * lp_data = NULL;
char * custom_sdk_version= NULL;
if((lp_data!=NULL) && (lp_data->ret ==KNOX_RESULT_SUCCESS) ) {
custom_sdk_version = g_strdup((char *)lp_data->data);
printf("Knox Custom SDK version: '%s'\n", custom_sdk_version);
} else {
fprintf(stderr, "Failed to get Knox custom SDK version!\n");
}
Returns
String value of Knox Custom SDK version on success, NULL on fail.