License policy group provides policies for device license control.
More...
License policy group provides policies for device license control.
License policy group.
Required Header
#include <mdm.h>
Overview
This group provides APIs to control the license of client.
mdm_data_t* mdm_activate_knox_license |
( |
const char * |
pkg, |
|
|
const char * |
license_key |
|
) |
| |
Asynchronous API to activate Knox Enterprise license.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This API is used to activate Knox license. Admin can use this API to activate Knox Enterprise license on device. Active/non-active admin can call this API. The final activation status will be notify asynchronously by the callback - MDM_CB_LICENSE_ACTIVATE_KNOX callback type. After the license activation the client application can be notify asynchronously about license validation - MDM_CB_LICENSE_KNOX_VALIDATE_RESULT callback type.
void __license_callback_(int oper, void *cb_data, void *user_data)
{
switch(oper) {
case MDM_CB_LICENSE_ACTIVATE_KNOX:
} else {
}
break;
case MDM_CB_LICENSE_KNOX_VALIDATE_RESULT:
} else {
}
break;
default:
break;
}
}
int fun()
{
char license_key[] = "key";
if (lp_data != NULL) {
mdm_license_status_t *license_status = (mdm_license_status_t *)lp_data->
data;
if(mdm_license_info_t != NULL) {
}
} else {
}
}
- Parameters
-
[in] | pkg | Name of package |
[in] | license_key | Key to activate knox license |
- Returns
- mdm_data_t * on success, NULL will be returned in error case.
- See also
- mdm_activate_license, mdm_deactivate_knox_license
mdm_data_t* mdm_activate_license |
( |
const char * |
pkg, |
|
|
const char * |
license_key |
|
) |
| |
Asynchronous API to activate Enterprise license.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- Admin can use this API to activate Enterprise license for the MDM client application. Active/non-active admin can call this API. The final activation status will be notify asynchronously by the callback - MDM_CB_LICENSE_ACTIVATE callback type. After the license activation the client application can be notify asynchronously about license validation status - MDM_CB_LICENSE_VALIDATE_RESULT callback type.
void __license_callback_(int oper, void *cb_data, void *user_data)
{
switch(oper) {
case MDM_CB_LICENSE_ACTIVATE:
} else {
}
break;
case MDM_CB_LICENSE_VALIDATE_RESULT:
} else {
}
break;
default:
break;
}
}
int fun()
{
char license_key[] = "LicenseKey";
if (lp_data != NULL) {
if (lp_data->
ret == MDM_ERR_NONE) {
} else {
}
} else {
}
return 0;
}
- Parameters
-
[in] | pkg | Package name of the MDM client application |
[in] | license_key | Key to activate license provided by the MDM client application |
- Returns
- mdm_data_t * on success or NULL on error.
- See also
- mdm_activate_knox_license
mdm_data_t* mdm_deactivate_knox_license |
( |
const char * |
pkg, |
|
|
const char * |
license_key |
|
) |
| |
Asynchronous API to deactivate Knox license.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.2.3
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
- This API is used to deactivate Knox license The final deactivation status will be notify asynchronously by the callback - MDM_CB_LICENSE_DEACTIVATE_KNOX type.
void __license_callback_(int oper, void *cb_data, void *user_data)
{
switch(oper) {
case MDM_CB_LICENSE_DEACTIVATE_KNOX:
} else {
}
break;
default:
break;
}
}
int fun()
{
char license_key[] = "key";
if (lp_data != NULL) {
mdm_license_status_t *license_status = (mdm_license_status_t *)lp_data->
data;
if(mdm_license_info_t != NULL) {
}
} else {
}
}
- Parameters
-
[in] | pkg | Name of package |
[in] | license_key | Key to activate license |
- Returns
- mdm_data_t * on success, NULL will be returned in error case.
- See also
mdm_data_t* mdm_get_api_call_data |
( |
const char * |
pkg | ) |
|
API to retrieve API call data for the given packagename on device.
- Since (Knox_wearable):
- 1.0.0
- Since (Tizen):
- 2.3.1.5
- Feature:
- http://developer.samsung.com/tizen/feature/mdm
- Usage:
Used to get the API call data as a key-value pair in JSONArray format as shown below: [{{ "log_date" :"DATE1" , "api_call" : {"API_1" : "CALLS_VALUE" , ... , "API_n" : "CALLS_VALUE"}}, {"log_date" :"DATE2" , "api_call" : {"API_1" : "CALLS_VALUE" , ... , "API_n" : "CALLS_VALUE"} }]
if (lp_data != NULL) {
if(lp_data->
data != NULL) {
char *json = (
char *)lp_data->
data;
}
} else {
}
- Parameters
-
[in] | pkg | The package name of the Client application. |
- Returns
- mdm_data_t * on success or NULL on error.
- Permission:
- Usage of this API is restricted by admin