Lines Matching refs:ota_handle

46 static int _dm_cota_send_new_config_to_user(void *ota_handle)  in _dm_cota_send_new_config_to_user()  argument
57 IOT_OTA_Ioctl(ota_handle, IOT_OTAG_COTA_CONFIG_ID, (void *)&config_id, 1); in _dm_cota_send_new_config_to_user()
58 IOT_OTA_Ioctl(ota_handle, IOT_OTAG_COTA_CONFIG_SIZE, &config_size, 4); in _dm_cota_send_new_config_to_user()
59 IOT_OTA_Ioctl(ota_handle, IOT_OTAG_COTA_SIGN, (void *)&sign, 1); in _dm_cota_send_new_config_to_user()
60 IOT_OTA_Ioctl(ota_handle, IOT_OTAG_COTA_SIGN_METHOD, (void *)&sign_method, in _dm_cota_send_new_config_to_user()
62 IOT_OTA_Ioctl(ota_handle, IOT_OTAG_COTA_URL, (void *)&url, 1); in _dm_cota_send_new_config_to_user()
63 IOT_OTA_Ioctl(ota_handle, IOT_OTAG_COTA_GETTYPE, (void *)&get_type, 1); in _dm_cota_send_new_config_to_user()
123 void *ota_handle = NULL; in dm_cota_perform_sync() local
131 res = dm_ota_get_ota_handle(&ota_handle); in dm_cota_perform_sync()
136 if (ota_handle == NULL) { in dm_cota_perform_sync()
139 IOT_OTA_Ioctl(ota_handle, IOT_OTAG_OTA_TYPE, &ota_type, 4); in dm_cota_perform_sync()
146 IOT_OTA_Ioctl(ota_handle, IOT_OTAG_RESET_FETCHED_SIZE, ota_handle, 4); in dm_cota_perform_sync()
151 file_download = IOT_OTA_FetchYield(ota_handle, output, output_len, 1); in dm_cota_perform_sync()
153 IOT_OTA_ReportProgress(ota_handle, IOT_OTAP_FETCH_FAILED, NULL); in dm_cota_perform_sync()
163 IOT_OTA_Ioctl(ota_handle, IOT_OTAG_FETCHED_SIZE, &file_downloaded, 4); in dm_cota_perform_sync()
164 IOT_OTA_Ioctl(ota_handle, IOT_OTAG_FILE_SIZE, &file_size, 4); in dm_cota_perform_sync()
177 IOT_OTA_ReportProgress(ota_handle, percent_now, NULL); in dm_cota_perform_sync()
183 if (IOT_OTA_IsFetchFinish(ota_handle)) { in dm_cota_perform_sync()
185 IOT_OTA_Ioctl(ota_handle, IOT_OTAG_CHECK_CONFIG, &file_isvalid, 4); in dm_cota_perform_sync()
206 void *ota_handle = NULL; in dm_cota_get_config() local
209 res = dm_ota_get_ota_handle(&ota_handle); in dm_cota_get_config()
214 return iotx_ota_get_config(ota_handle, config_scope, get_type, in dm_cota_get_config()
222 void *ota_handle = NULL; in dm_cota_status_check() local
225 res = dm_ota_get_ota_handle(&ota_handle); in dm_cota_status_check()
230 if (IOT_OTA_IsFetching(ota_handle)) { in dm_cota_status_check()
233 IOT_OTA_Ioctl(ota_handle, IOT_OTAG_OTA_TYPE, &ota_type, 4); in dm_cota_status_check()
239 res = _dm_cota_send_new_config_to_user(ota_handle); in dm_cota_status_check()