Knox Tizen Wearable SDK
Custom Admin group

Custom Admin group provides APIs to register, or enroll a Knox Custom client (application) that can manage the Galaxy Watch device. More...

Data Structures

struct  custom_mem_header_t
 Place at the front of any structure or block of memory that is intended to be disowned by the allocator, to be discarded by a subsequent owner. More...
 
struct  knox_custom_data_t
 This structure is used to store GList. More...
 

Enumerations

Functions

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. More...
 
int knox_custom_get_service_ext (const char *pkg_name)
 API to connect to the Knox Custom server daemon. More...
 
knox_result_t knox_custom_release_service (void)
 API to close the connection, and release the resources. More...
 
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 Galaxy Watch device. More...
 
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 device. More...
 
void knox_custom_free_data (knox_custom_data_t *data)
 API to free pre-allocated knox_custom_data_t structure. More...
 

Detailed Description

Custom Admin group provides APIs to register, or enroll a Knox Custom client (application) that can manage the Galaxy Watch device.

Custom Admin group

This group provides APIs to register and connect the Knox Custom client with the Knox Custom Server daemon. It also provides APIs to unregister a Knox Custom client.

Required Header

#include <knox_custom.h>

Enumeration Type Documentation

KNOX_CUSTOM Policy status.

See also
Enumerator
KNOX_CUSTOM_STATUS_ERROR 

KNOX_CUSTOM Policy status error.

KNOX_CUSTOM_ENABLED 

KNOX_CUSTOM Policy status enabled.

KNOX_CUSTOM_DISABLED 

KNOX_CUSTOM Policy status disabled.

KNOX_CUSTOM_FALSE 

KNOX_CUSTOM Policy status false.

KNOX_CUSTOM_TRUE 

KNOX_CUSTOM Policy status true.

Definition at line 59 of file knox_custom_client_type.h.

KNOX_CUSTOM API result.

See also
Enumerator
KNOX_RESULT_SERVICE_NOT_ENABLED 

KNOX_CUSTOM API result service is not enabled.

KNOX_RESULT_ACCESS_DENIED 

KNOX_CUSTOM API result permission denied.

KNOX_RESULT_INVALID_PARAM 

KNOX_CUSTOM API result invalid parameter.

KNOX_RESULT_INVALID_PACKAGE 

KNOX_CUSTOM API result invalid package.

KNOX_RESULT_NOT_SUPPORTED 

KNOX_CUSTOM API result not supported.

KNOX_RESULT_FAIL 

KNOX_CUSTOM API result fail.

KNOX_RESULT_SUCCESS 

KNOX_CUSTOM API result success.

KNOX_RESULT_PROKIOSK_ALREADY_ENABLED 

KNOX_CUSTOM API prokiosk mode already enabled.

KNOX_RESULT_PROKIOSK_NOT_ENABLED 

KNOX_CUSTOM API prokiosk mode is not enabled.

KNOX_RESULT_PACKAGE_NOT_FOUND 

KNOX_CUSTOM_API package not installed.

KNOX_RESULT_POLICY_RESTRICTED 

KNOX_CUSTOM_API DPM error

KNOX_RESULT_WIDGET_OVER_MAX_COUNT 

KNOX_CUSTOM_API the number of widget is over max count

KNOX_RESULT_WIDGET_ALREADY_ADDED 

KNOX_CUSTOM_API widget is already added

KNOX_RESULT_NOT_ENOUGH_SPACE 

KNOX_CUSTOM API no space left on device.

KNOX_RESULT_NOW_IN_PROGRESS 

KNOX_CUSTOM API operation now in progress.

Definition at line 35 of file knox_custom_client_type.h.

Function Documentation

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 device.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage:
To de-register a previously registered Knox Custom client from the Knox Custom server.
ret = knox_custom_deregister_client("com.3rdparty.knox_custom_client");

.

Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.admin
Parameters
[in]pkg_nameClient package name
Returns
KNOX_RESULT_SUCCESS will show on success, while an error code will show if there is an error
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_INVALID_PARAMInvalid parameter
See also
knox_custom_register_client
void knox_custom_free_data ( knox_custom_data_t data)

API to free pre-allocated knox_custom_data_t structure.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage:
To release the previously allocated memory after use.
knox_custom_data_t *lp_data = knox_custom_get_homeactivity()
if (lp_data && lp_data->data) {
char *packagename = g_strdup((char *)lp_data->data);
}
Parameters
[in]dataA pointer to the data to be freed.
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.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage:
After registering the Knox Custom client, call this API to connect with the Knox Custom server daemon. After receiving "SUCCESS" from the Knox Custom server daemon, other Knox Custom APIs can be called. At the end, knox_custom_release_service must be called even if knox_custom_get_service returned error.
Returns
KNOX_RESULT_SUCCESS will show on success, while an error code will show if there is an error
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_INVALID_PARAMInvalid parameter
See also
knox_custom_release_service
int knox_custom_get_service_ext ( const char *  pkg_name)

API to connect to the Knox Custom server daemon.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Purpose:
To verify if the caller is registered or not. And, to get the Knox Custom client information in order to communicate with the Knox Custom server daemon. Calling this function is the first step to call the Knox Custom APIs.
Usage:
After receiving "SUCCESS" from the Knox Custom server daemon, other Knox Custom APIs can be called. This API is available for testing purposes only.
int ret = knox_custom_get_service_ext("com.samsung.knox_custom_test_tool");
if (ret == KNOX_RESULT_SUCCESS) {
call Knox Custom APIs
}
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.admin
Parameters
[in]pkg_namecaller's package name.
Permission:
Usage of this API is restricted to registered clients only.
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_INVALID_PARAMInvalid parameter
Returns
KNOX_RESULT_SUCCESS will show on success, while an error code will show if there is an error
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 Galaxy Watch device.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage:
Admin has to register the client first, before calling any other Knox Custom APIs. Only a registered client can get the service from the Knox Custom server daemon.
ret = knox_custom_register_client("com.3rdparty.knox_custom_client");
Privilege Level:
public
Privilege:
http://developer.samsung.com/tizen/privilege/knoxcustom.admin
Parameters
[in]pkg_nameClient package name
Returns
KNOX_RESULT_SUCCESS will show on success, while an error code will show if there is an error.
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_INVALID_PARAMInvalid parameter
See also
knox_custom_deregister_client
knox_result_t knox_custom_release_service ( void  )

API to close the connection, and release the resources.

Since (Knox_wearable):
1.0.0
Since (Tizen):
2.3.2
Feature:
http://developer.samsung.com/tizen/feature/knox.custom
Usage:
As for the last step, admin must call this function to clean up the Knox Custom framework.
Returns
KNOX_RESULT_SUCCESS on success, an error code on error
Return values
KNOX_RESULT_SUCCESSSuccessful
KNOX_RESULT_FAILGeneral failure
KNOX_RESULT_NOT_SUPPORTEDNot supported
KNOX_RESULT_INVALID_PARAMInvalid parameter
See also
knox_custom_register_client