58dba0102a59f22183166accc2bba8aace85c1bd
[platform/core/system/sync-agent.git] / include / event / oma_dm_noti_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_NOTI_API_H_
19 #define OMA_DM_NOTI_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_noti_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 fota noti ui config.
38  * @remarks This function is use to init fota noti 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_push_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 fota noti ui config.
59  * @post
60  *
61  * @par Since:
62  *
63  *
64  * @see
65  *
66  */
67         sync_agent_dm_error_e sync_agent_dm_push_init();
68
69 /**
70  * API to Denit fota noti ui config.
71  * @remarks This function is use to denit fota noti 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_push_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 fota noti ui config.
92  * @post
93  *
94  * @par Since:
95  *
96  *
97  * @see
98  *
99  */
100         sync_agent_dm_error_e sync_agent_dm_push_deinit();
101
102 /**
103  * API to Software update button in fota noti ui event API.
104  * @remarks This function is use to software update.
105  *
106  * @par Usage:
107  * @code
108  *
109  *
110         sync_agent_dm_mo_error_e err = SYNC_AGENT_DM_MO_SUCCESS;
111         sync_agent_dm_service_server_type_e server_type = UI_SAMSUNG_FUMO_TYPE;
112         char *server_id = "xxxx";
113         char *session_id = "111";
114
115         err_code = sync_agent_dm_push_software_update(server_id, session_id);
116         if(err != SYNC_AGENT_DM_MO_SUCCESS) {
117                 //error handling
118         }
119         ...
120  *
121  * @endcode
122  * @param[in] server_id server id
123  * @param[in] session_id session id
124  *
125  * @return SYNC_AGENT_DM_MO_SUCCESS on success, SYNC_AGENT_DM_MO_FAIL on error
126  *
127  * @pre  This function should be called if click software update button.
128  * @post
129  *
130  * @par Since:
131  *
132  *
133  * @see
134  *
135  */
136         sync_agent_dm_error_e sync_agent_dm_fota_update_noti(char *server_id, char *session_id);
137
138 /**
139  * API to Cancel button in fota noti ui event API.
140  * @remarks This function is use to cancel fota flow.
141  *
142  * @par Usage:
143  * @code
144  *
145  *
146         sync_agent_dm_mo_error_e err = SYNC_AGENT_DM_MO_SUCCESS;
147
148         err_code = sync_agent_dm_push_cancel();
149         if(err != SYNC_AGENT_DM_MO_SUCCESS) {
150                 //error handling
151         }
152         ...
153  *
154  * @endcode
155  *
156  *
157  *
158  * @return SYNC_AGENT_DM_MO_SUCCESS on success, SYNC_AGENT_DM_MO_FAIL on error
159  *
160  * @pre  This function should be called if click cancel button.
161  * @post
162  *
163  * @par Since:
164  *
165  *
166  * @see
167  *
168  */
169         sync_agent_dm_error_e sync_agent_dm_fota_cancel_noti();
170
171 /**
172  * API to Download button in fota noti ui event API.
173  * @remarks This function is use to download fota delta file.
174  *
175  * @par Usage:
176  * @code
177  *
178  *
179         sync_agent_dm_mo_error_e err = SYNC_AGENT_DM_MO_SUCCESS;
180         int response_type = 1;
181
182         err_code = sync_agent_dm_push_download(response_type);
183         if(err != SYNC_AGENT_DM_MO_SUCCESS) {
184                 //error handling
185         }
186         ...
187  *
188  * @endcode
189  *
190  * @param[in] response_type event response result
191  *
192  * @return SYNC_AGENT_DM_MO_SUCCESS on success, SYNC_AGENT_DM_MO_FAIL on error
193  *
194  * @pre  This function should be called if click download button.
195  * @post
196  *
197  * @par Since:
198  *
199  *
200  * @see
201  *
202  */
203         sync_agent_dm_error_e sync_agent_dm_fota_download_noti(int response_type);
204
205 /**
206  * API to Install button in fota noti ui event API.
207  * @remarks This function is use to install fota.
208  *
209  * @par Usage:
210  * @code
211  *
212  *
213         sync_agent_dm_mo_error_e err = SYNC_AGENT_DM_MO_SUCCESS;
214         int response_type = 1;
215
216         err_code = sync_agent_dm_push_install(response_type);
217         if(err != SYNC_AGENT_DM_MO_SUCCESS) {
218                 //error handling
219         }
220         ...
221  *
222  * @endcode
223  *
224  * @param[in] response_type event response result
225  *
226  * @return SYNC_AGENT_DM_MO_SUCCESS on success, SYNC_AGENT_DM_MO_FAIL on error
227  *
228  * @pre  This function should be called if click install button.
229  * @post
230  *
231  * @par Since:
232  *
233  *
234  * @see
235  *
236  */
237         sync_agent_dm_error_e sync_agent_dm_fota_install_noti(int response_type);
238
239 /**
240  * API to Remind interval save button in fota noti ui event API.
241  * @remarks This function is use to set remind interval.
242  *
243  * @par Usage:
244  * @code
245  *
246  *
247         sync_agent_dm_mo_error_e err = SYNC_AGENT_DM_MO_SUCCESS;
248         int response_type = 1;
249
250         err_code = sync_agent_dm_fota_install(response_type);
251         if(err != SYNC_AGENT_DM_MO_SUCCESS) {
252                 //error handling
253         }
254         ...
255  *
256  * @endcode
257  *
258  * @param[in] interval_type remind interval value
259  *
260  * @return SYNC_AGENT_DM_MO_SUCCESS on success, SYNC_AGENT_DM_MO_FAIL on error
261  *
262  * @pre  This function should be called if click remind interval button.
263  * @post
264  *
265  * @par Since:
266  *
267  *
268  * @see
269  *
270  */
271         sync_agent_dm_error_e sync_agent_dm_fota_set_interval_noti(int interval_type);
272
273 /**
274  *      @}
275  */
276
277 #ifdef __cplusplus
278 }
279 #endif                          /* __cplusplus */
280 #endif                          /* OMA_DM_NOTI_API_H_ */