3 * Copyright (c) 2012 Samsung Electronics Co., Ltd.
5 * Licensed under the Apache License, Version 2.0 (the License);
6 * you may not use this file except in compliance with the License.
7 * You may obtain a copy of the License at
9 * http://www.apache.org/licenses/LICENSE-2.0
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS,
13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 * See the License for the specific language governing permissions and
15 * limitations under the License.
18 #ifndef OMA_DM_CP_API_H_
19 #define OMA_DM_CP_API_H_
23 #endif /* __cplusplus */
25 #include "oma_dm_api_common.h"
28 * @file oma_dm_cp_api.h
29 * @brief Support to use framework event module for agent
37 * API to Init cp ui config event API.
38 * @remarks This function is use to init cp ui config.
44 sync_agent_dm_mo_error_e err = SYNC_AGENT_DM_MO_SUCCESS;
46 err_code = sync_agent_dm_cp_init();
47 if(err != SYNC_AGENT_DM_MO_SUCCESS) {
56 * @return SYNC_AGENT_DM_MO_SUCCESS on success, SYNC_AGENT_DM_MO_FAIL on error
58 * @pre This function should be called if need to init cp ui config.
67 sync_agent_dm_error_e sync_agent_dm_cp_init();
70 * API to Deinit cp ui config event API.
71 * @remarks This function is use to deinit cp ui config.
77 sync_agent_dm_mo_error_e err = SYNC_AGENT_DM_MO_SUCCESS;
79 err_code = sync_agent_dm_cp_deinit();
80 if(err != SYNC_AGENT_DM_MO_SUCCESS) {
89 * @return SYNC_AGENT_DM_MO_SUCCESS on success, SYNC_AGENT_DM_MO_FAIL on error
91 * @pre This function should be called if need to deinit cp ui config.
100 sync_agent_dm_error_e sync_agent_dm_cp_deinit();
103 * API to Check pin code event API.
104 * @remarks This function is use to check pin code.
110 sync_agent_dm_mo_error_e err = SYNC_AGENT_DM_MO_SUCCESS;
112 int response_type = 1;
113 char *user_pin = "1234";
116 err_code = sync_agent_dm_cp_check_pin_code(ext_id, response_type, user_pin, &pin_check);
117 if(err != SYNC_AGENT_DM_MO_SUCCESS) {
124 * @param[in] ext_id generated id by dm agent
125 * @param[in] response_type response result
126 * @param[in] user_pin input user pin value
127 * @param[out] pin_check pin validation value
129 * @return SYNC_AGENT_DM_MO_SUCCESS on success, SYNC_AGENT_DM_MO_FAIL on error
131 * @pre This function should be called if need to check pin code.
140 sync_agent_dm_error_e sync_agent_dm_cp_check_pin_code(int ext_id, int response_type, char *user_pin, int *pin_check);
148 #endif /* __cplusplus */
149 #endif /* OMA_DM_CP_API_H_ */