| | |
| | | package com.dji.sample.manage.service; |
| | | |
| | | import com.dji.sample.common.model.PaginationData; |
| | | import com.dji.sample.component.mqtt.model.CommonTopicReceiver; |
| | | import com.dji.sample.manage.model.dto.DeviceFirmwareDTO; |
| | | import com.dji.sample.manage.model.dto.DeviceFirmwareNoteDTO; |
| | | import com.dji.sample.manage.model.dto.DeviceFirmwareUpgradeDTO; |
| | | import com.dji.sample.manage.model.param.DeviceFirmwareQueryParam; |
| | | import com.dji.sample.manage.model.param.DeviceFirmwareUploadParam; |
| | | import com.dji.sample.manage.model.param.DeviceOtaCreateParam; |
| | | import org.springframework.messaging.MessageHeaders; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.util.List; |
| | | import java.util.Optional; |
| | |
| | | * @param headers |
| | | */ |
| | | void handleOtaProgress(CommonTopicReceiver receiver, MessageHeaders headers); |
| | | |
| | | /** |
| | | * Query firmware version information by page. |
| | | * |
| | | * @param workspaceId |
| | | * @param param |
| | | * @return |
| | | */ |
| | | PaginationData<DeviceFirmwareDTO> getAllFirmwarePagination(String workspaceId, DeviceFirmwareQueryParam param); |
| | | |
| | | /** |
| | | * Checks for file existence based on md5. |
| | | * |
| | | * @param workspaceId |
| | | * @param fileMd5 |
| | | * @return |
| | | */ |
| | | Boolean checkFileExist(String workspaceId, String fileMd5); |
| | | |
| | | /** |
| | | * Import firmware file for device upgrades. |
| | | * @param workspaceId |
| | | * @param creator |
| | | * @param param |
| | | * @param file |
| | | */ |
| | | void importFirmwareFile(String workspaceId, String creator, DeviceFirmwareUploadParam param, MultipartFile file); |
| | | |
| | | /** |
| | | * Save the file information of the firmware. |
| | | * @param firmware |
| | | */ |
| | | void saveFirmwareInfo(DeviceFirmwareDTO firmware); |
| | | |
| | | /** |
| | | * Update the file information of the firmware. |
| | | * @param firmware |
| | | */ |
| | | void updateFirmwareInfo(DeviceFirmwareDTO firmware); |
| | | } |