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_FOTA_API_H_
19 #define OMA_DM_FOTA_API_H_
23 #endif /* __cplusplus */
25 #include "oma_dm_api_common.h"
28 * @file oma_dm_fota_api.h
29 * @brief Support to use framework event module for agent
37 * API to Init fota ui config event API.
38 * @remarks This function is use to init fota ui config.
44 sync_agent_dm_mo_error_e err = SYNC_AGENT_DM_MO_SUCCESS;
46 err_code = sync_agent_dm_fota_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 ui config.
67 sync_agent_dm_error_e sync_agent_dm_fota_init();
70 * API to Deinit fota ui config event API.
71 * @remarks This function is use to deinit fota ui config.
77 sync_agent_dm_mo_error_e err = SYNC_AGENT_DM_MO_SUCCESS;
79 err_code = sync_agent_dm_fota_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 ui config.
100 sync_agent_dm_error_e sync_agent_dm_fota_deinit();
103 * API to Software update button in fota 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;
113 err_code = sync_agent_dm_fota_software_update(server_type);
114 if(err != SYNC_AGENT_DM_MO_SUCCESS) {
121 * @param[in] server_type server type
123 * @return SYNC_AGENT_DM_MO_SUCCESS on success, SYNC_AGENT_DM_MO_FAIL on error
125 * @pre This function should be called if click software update button.
134 sync_agent_dm_error_e sync_agent_dm_fota_software_update(sync_agent_dm_service_server_type_e server_type);
137 * API to Cancel button in fota ui event API.
138 * @remarks This function is use to cancel fota flow.
144 sync_agent_dm_mo_error_e err = SYNC_AGENT_DM_MO_SUCCESS;
146 err_code = sync_agent_dm_fota_cancel();
147 if(err != SYNC_AGENT_DM_MO_SUCCESS) {
156 * @return SYNC_AGENT_DM_MO_SUCCESS on success, SYNC_AGENT_DM_MO_FAIL on error
158 * @pre This function should be called if click cancel button.
167 sync_agent_dm_error_e sync_agent_dm_fota_cancel();
170 * API to Download button in fota ui event API.
171 * @remarks This function is use to download fota delta file.
177 sync_agent_dm_mo_error_e err = SYNC_AGENT_DM_MO_SUCCESS;
178 int response_type = 1;
180 err_code = sync_agent_dm_fota_download(response_type);
181 if(err != SYNC_AGENT_DM_MO_SUCCESS) {
188 * @param[in] response_type event response result
190 * @return SYNC_AGENT_DM_MO_SUCCESS on success, SYNC_AGENT_DM_MO_FAIL on error
192 * @pre This function should be called if click download button.
201 sync_agent_dm_error_e sync_agent_dm_fota_download(int response_type);
204 * API to Install button in fota ui event API.
205 * @remarks This function is use to install fota.
211 sync_agent_dm_mo_error_e err = SYNC_AGENT_DM_MO_SUCCESS;
212 int response_type = 1;
214 err_code = sync_agent_dm_fota_install(response_type);
215 if(err != SYNC_AGENT_DM_MO_SUCCESS) {
222 * @param[in] response_type event response result
224 * @return SYNC_AGENT_DM_MO_SUCCESS on success, SYNC_AGENT_DM_MO_FAIL on error
226 * @pre This function should be called if click install button.
235 sync_agent_dm_error_e sync_agent_dm_fota_install(int response_type);
238 * API to Remind interval save button in fota ui event API.
239 * @remarks This function is use to set remind interval.
245 sync_agent_dm_mo_error_e err = SYNC_AGENT_DM_MO_SUCCESS;
246 int interval_type = 1;
248 err_code = sync_agent_dm_fota_install(interval_type);
249 if(err != SYNC_AGENT_DM_MO_SUCCESS) {
256 * @param[in] interval_type remind interval value
258 * @return SYNC_AGENT_DM_MO_SUCCESS on success, SYNC_AGENT_DM_MO_FAIL on error
260 * @pre This function should be called if click remind interval button.
269 sync_agent_dm_error_e sync_agent_dm_fota_set_interval(int interval_type);
277 #endif /* __cplusplus */
278 #endif /* OMA_DM_FOTA_API_H_ */