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_NOTI_API_H_
19 #define OMA_DM_NOTI_API_H_
23 #endif /* __cplusplus */
25 #include "oma_dm_api_common.h"
28 * @file oma_dm_noti_api.h
29 * @brief Support to use framework event module for agent
37 * API to Init fota noti ui config.
38 * @remarks This function is use to init fota noti ui config.
44 sync_agent_dm_mo_error_e err = SYNC_AGENT_DM_MO_SUCCESS;
46 err_code = sync_agent_dm_push_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 fota noti ui config.
67 sync_agent_dm_error_e sync_agent_dm_push_init();
70 * API to Denit fota noti ui config.
71 * @remarks This function is use to denit fota noti ui config.
77 sync_agent_dm_mo_error_e err = SYNC_AGENT_DM_MO_SUCCESS;
79 err_code = sync_agent_dm_push_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 fota noti ui config.
100 sync_agent_dm_error_e sync_agent_dm_push_deinit();
103 * API to Software update button in fota noti ui event API.
104 * @remarks This function is use to software update.
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";
115 err_code = sync_agent_dm_push_software_update(server_id, session_id);
116 if(err != SYNC_AGENT_DM_MO_SUCCESS) {
122 * @param[in] server_id server id
123 * @param[in] session_id session id
125 * @return SYNC_AGENT_DM_MO_SUCCESS on success, SYNC_AGENT_DM_MO_FAIL on error
127 * @pre This function should be called if click software update button.
136 sync_agent_dm_error_e sync_agent_dm_fota_update_noti(char *server_id, char *session_id);
139 * API to Cancel button in fota noti ui event API.
140 * @remarks This function is use to cancel fota flow.
146 sync_agent_dm_mo_error_e err = SYNC_AGENT_DM_MO_SUCCESS;
148 err_code = sync_agent_dm_push_cancel();
149 if(err != SYNC_AGENT_DM_MO_SUCCESS) {
158 * @return SYNC_AGENT_DM_MO_SUCCESS on success, SYNC_AGENT_DM_MO_FAIL on error
160 * @pre This function should be called if click cancel button.
169 sync_agent_dm_error_e sync_agent_dm_fota_cancel_noti();
172 * API to Download button in fota noti ui event API.
173 * @remarks This function is use to download fota delta file.
179 sync_agent_dm_mo_error_e err = SYNC_AGENT_DM_MO_SUCCESS;
180 int response_type = 1;
182 err_code = sync_agent_dm_push_download(response_type);
183 if(err != SYNC_AGENT_DM_MO_SUCCESS) {
190 * @param[in] response_type event response result
192 * @return SYNC_AGENT_DM_MO_SUCCESS on success, SYNC_AGENT_DM_MO_FAIL on error
194 * @pre This function should be called if click download button.
203 sync_agent_dm_error_e sync_agent_dm_fota_download_noti(int response_type);
206 * API to Install button in fota noti ui event API.
207 * @remarks This function is use to install fota.
213 sync_agent_dm_mo_error_e err = SYNC_AGENT_DM_MO_SUCCESS;
214 int response_type = 1;
216 err_code = sync_agent_dm_push_install(response_type);
217 if(err != SYNC_AGENT_DM_MO_SUCCESS) {
224 * @param[in] response_type event response result
226 * @return SYNC_AGENT_DM_MO_SUCCESS on success, SYNC_AGENT_DM_MO_FAIL on error
228 * @pre This function should be called if click install button.
237 sync_agent_dm_error_e sync_agent_dm_fota_install_noti(int response_type);
240 * API to Remind interval save button in fota noti ui event API.
241 * @remarks This function is use to set remind interval.
247 sync_agent_dm_mo_error_e err = SYNC_AGENT_DM_MO_SUCCESS;
248 int response_type = 1;
250 err_code = sync_agent_dm_fota_install(response_type);
251 if(err != SYNC_AGENT_DM_MO_SUCCESS) {
258 * @param[in] interval_type remind interval value
260 * @return SYNC_AGENT_DM_MO_SUCCESS on success, SYNC_AGENT_DM_MO_FAIL on error
262 * @pre This function should be called if click remind interval button.
271 sync_agent_dm_error_e sync_agent_dm_fota_set_interval_noti(int interval_type);
279 #endif /* __cplusplus */
280 #endif /* OMA_DM_NOTI_API_H_ */