| | |
| | | import com.hdl.linkpm.sdk.ota.bean.CloudDeviceFirmwaresBean; |
| | | import com.hdl.linkpm.sdk.ota.bean.CloudGatewayDriversBean; |
| | | import com.hdl.linkpm.sdk.ota.bean.DeviceFirmwareBean; |
| | | import com.hdl.linkpm.sdk.ota.bean.DownloadUrlBean; |
| | | import com.hdl.linkpm.sdk.ota.bean.GatewayDriverBean; |
| | | import com.hdl.photovoltaic.HDLApp; |
| | | import com.hdl.photovoltaic.config.UserConfigManage; |
| | |
| | | import com.hdl.photovoltaic.utils.AppManagerUtils; |
| | | import com.hdl.photovoltaic.utils.Md5Utils; |
| | | import com.hdl.sdk.link.common.exception.HDLLinkException; |
| | | import com.hdl.sdk.link.common.utils.ByteUtils; |
| | | import com.hdl.sdk.link.core.bean.eventbus.BaseEventBus; |
| | | import com.hdl.sdk.link.core.callback.HDLLinkCallBack; |
| | | |
| | |
| | | fos.flush(); |
| | | fos.close(); |
| | | is.close(); |
| | | //todo 用户终止家继续读取数据; |
| | | //todo 用户终止继续读取数据; |
| | | return false; |
| | | } |
| | | fos.write(buf, 0, len); |
| | |
| | | * @param describe 描述文本 |
| | | */ |
| | | public void eventBusPost(String fileFullPath, String type, int progressValue, String describe) { |
| | | HdlLogLogic.print("进度值====" + progressValue + ""); |
| | | |
| | | if (this.stopDownload) { |
| | | HdlFileLogic.getInstance().deleteFile(fileFullPath);//删除下载不完成数据; |
| | | HdlFileLogic.getInstance().deleteFile(fileFullPath);//删除下载不完整数据; |
| | | BaseEventBus baseEventBus = new BaseEventBus(); |
| | | baseEventBus.setTopic(localDownloadProgress); |
| | | Progress progress = new Progress(); |
| | |
| | | Progress progress = new Progress(); |
| | | progress.step = progressValue; |
| | | progress.describe = describe; |
| | | progress.type = type; |
| | | baseEventBus.setType(type); |
| | | baseEventBus.setData(progress); |
| | | EventBus.getDefault().post(baseEventBus); |
| | | // } |
| | | // }); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | |
| | | public int step; |
| | | //进度描述信息 |
| | | public String describe; |
| | | //表示是驱动,固件; |
| | | public String type; |
| | | } |
| | | |
| | | |