diff options
Diffstat (limited to 'include/dm-engine/lawmo')
-rwxr-xr-x | include/dm-engine/lawmo/lawmo_account.h | 83 | ||||
-rwxr-xr-x | include/dm-engine/lawmo/lawmo_engine.h | 107 | ||||
-rwxr-xr-x | include/dm-engine/lawmo/lawmo_engine_internal.h | 45 |
3 files changed, 235 insertions, 0 deletions
diff --git a/include/dm-engine/lawmo/lawmo_account.h b/include/dm-engine/lawmo/lawmo_account.h new file mode 100755 index 0000000..19eadf6 --- /dev/null +++ b/include/dm-engine/lawmo/lawmo_account.h @@ -0,0 +1,83 @@ +/* + * oma-dm-agent + * Copyright (c) 2012 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * @DM_Error.h + * @version 0.1 + * @brief This file is the header file of defined lawmo account + */ +#ifndef LAWMO_ACCOUNT_H_ +#define LAWMO_ACCOUNT_H_ + +/*dm-agent*/ +#include "common/dm_error.h" + +/** + * @par Description: API to register lawmo account + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * @param[in] item id + * @param[in] user data + * + * @return 1 success + * 0 error + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +int register_lawmo_account(int item_id, void *user_data); + +/** + * @par Description: API to deregister lawmo account + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * @param[in] item id + * @param[in] user data + * + * @return 1 success + * 0 error + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +int deregister_lawmo_account(int item_id, void *user_data); + +#endif /* LAWMO_ACCOUNT_H_ */ diff --git a/include/dm-engine/lawmo/lawmo_engine.h b/include/dm-engine/lawmo/lawmo_engine.h new file mode 100755 index 0000000..b411985 --- /dev/null +++ b/include/dm-engine/lawmo/lawmo_engine.h @@ -0,0 +1,107 @@ +/* + * oma-dm-agent + * Copyright (c) 2012 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef LAWMO_ENGINE_H_ +#define LAWMO_ENGINE_H_ + +/*dm-agent*/ +#include "common/dm_error.h" +#include "dm-engine/lawmo/lawmo_engine_internal.h" + +/** + * @par Description: API to execute lawmo operation + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * @param[in] full_path mo full path + * @param[in] value value + * @param[in] check operation check operation + * + * @return DM_OK success + * DM_ERRORS fail + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +DM_ERROR lawmo_exec(char *full_path, char *correlator, LAWMO_Result_code * lawmo_return, int check_operation); + +/** + * @par Description: API to execute lawmo operation + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * @param[in] full_path mo full path + * @param[out] lawmo state data lawmo state data + * + * @return DM_OK success + * DM_ERRORS fail + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +DM_ERROR get_current_lawmo_state(char *full_path, char **lawmo_state_data); + +/** + * @par Description: API to execute lawmo operation + * + * + * @par Purpose: + * @par Typical use case: + * @par Method of function operation: + * @par Important notes: + * @param[in] full_path mo full path + * @param[in] lawmo state lawmo state + * + * @return DM_OK success + * DM_ERRORS fail + * + * @par Errors: + * + * @pre None. + * @post + * @see + * @remarks None. + * + * @par Sample Code: + * @code + * @endcode + */ +DM_ERROR set_current_lawmo_state(char *full_path, LAWMO_State lawmo_state); + +#endif /* LAWMO_ENGINE_H_ */ diff --git a/include/dm-engine/lawmo/lawmo_engine_internal.h b/include/dm-engine/lawmo/lawmo_engine_internal.h new file mode 100755 index 0000000..bd52aeb --- /dev/null +++ b/include/dm-engine/lawmo/lawmo_engine_internal.h @@ -0,0 +1,45 @@ +/* + * oma-dm-agent + * Copyright (c) 2012 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the License); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef LAWMO_ENGINE_INTERNAL_H_ +#define LAWMO_ENGINE_INTERNAL_H_ + +typedef enum { + + FULLY_LOCKED, //the device is in Fully Locked state. + PARTIALLY_LOCKED, //The device is in Partially Locked state. + UNLOCKED //The device is in Unlocked state. +} LAWMO_State; + +typedef enum { + OPERATION_SUCCEEDED = 1200, + WIPE_OPEARTION_SUCCEEDED_WITH_DATA_WIPED = 1201, + WIPE_OPERATION_SUCCEEDED_WITH_BOTH_DATA_AND_ASSOCIATED_WIPE_LIST_WITHIN_MANAGEMENT_TREE_WIPED = 1202, + + /*SUCCESSFUL = VENDOR SPECIFIED */ + + CLIENT_ERROR = 1400, + USER_CANCELLED = 1401, + FULLY_LOCK_DEVICE_FAILED = 1402, + PARTIALLY_LOCK_DEVICE_FAILED = 1403, + UNLOCK_DEVICE_FAILED = 1404, + WIPE_DEVICES_DATA_FAILED = 1405, + WIPE_OPERATION_NOT_PERFORMED = 1406 + /*CLIENT ERROR = VENDOR SPECIFIED */ +} LAWMO_Result_code; + +#endif /* LAWMO_ENGINE_INTERNAL_H_ */ |