Tizen 2.1 base
[platform/core/system/sync-agent.git] / include / event / oma_dm_cp_api.h
1 /*
2  * sync-agent
3  * Copyright (c) 2012 Samsung Electronics Co., Ltd.
4  *
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
8  *
9  *     http://www.apache.org/licenses/LICENSE-2.0
10  *
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.
16  */
17
18 #ifndef OMA_DM_CP_API_H_
19 #define OMA_DM_CP_API_H_
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif                          /* __cplusplus */
24
25 #include "oma_dm_api_common.h"
26
27 /**
28  * @file        oma_dm_cp_api.h
29  * @brief       Support to use framework event module for agent
30  */
31
32 /** @addtogroup event
33  *      @{
34  */
35
36 /**
37  * API to Init cp ui config event API.
38  * @remarks This function is use to init cp ui config.
39  *
40  * @par Usage:
41  * @code
42  *
43  *
44         sync_agent_dm_mo_error_e err = SYNC_AGENT_DM_MO_SUCCESS;
45
46         err_code = sync_agent_dm_cp_init();
47         if(err != SYNC_AGENT_DM_MO_SUCCESS) {
48                 //error handling
49         }
50         ...
51  *
52  * @endcode
53  *
54  *
55  *
56  * @return SYNC_AGENT_DM_MO_SUCCESS on success, SYNC_AGENT_DM_MO_FAIL on error
57  *
58  * @pre  This function should be called if need to init cp ui config.
59  * @post
60  *
61  * @par Since:
62  *
63  *
64  * @see
65  *
66  */
67         sync_agent_dm_error_e sync_agent_dm_cp_init();
68
69 /**
70  * API to Deinit cp ui config event API.
71  * @remarks This function is use to deinit cp ui config.
72  *
73  * @par Usage:
74  * @code
75  *
76  *
77         sync_agent_dm_mo_error_e err = SYNC_AGENT_DM_MO_SUCCESS;
78
79         err_code = sync_agent_dm_cp_deinit();
80         if(err != SYNC_AGENT_DM_MO_SUCCESS) {
81                 //error handling
82         }
83         ...
84  *
85  * @endcode
86  *
87  *
88  *
89  * @return SYNC_AGENT_DM_MO_SUCCESS on success, SYNC_AGENT_DM_MO_FAIL on error
90  *
91  * @pre  This function should be called if need to deinit cp ui config.
92  * @post
93  *
94  * @par Since:
95  *
96  *
97  * @see
98  *
99  */
100         sync_agent_dm_error_e sync_agent_dm_cp_deinit();
101
102 /**
103  * API to Check pin code event API.
104  * @remarks This function is use to check pin code.
105  *
106  * @par Usage:
107  * @code
108  *
109  *
110         sync_agent_dm_mo_error_e err = SYNC_AGENT_DM_MO_SUCCESS;
111         int ext_id = 1;
112         int response_type = 1;
113         char *user_pin = "1234";
114         int pin_check = 0;
115
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) {
118                 //error handling
119         }
120         ...
121  *
122  * @endcode
123  *
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
128  *
129  * @return SYNC_AGENT_DM_MO_SUCCESS on success, SYNC_AGENT_DM_MO_FAIL on error
130  *
131  * @pre  This function should be called if need to check pin code.
132  * @post
133  *
134  * @par Since:
135  *
136  *
137  * @see
138  *
139  */
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);
141
142 /**
143  *      @}
144  */
145
146 #ifdef __cplusplus
147 }
148 #endif                          /* __cplusplus */
149 #endif                          /* OMA_DM_CP_API_H_ */