package com.dji.sample.map.service.impl;

import com.dji.sdk.cloudapi.map.OfflineMapGetRequest;
import com.dji.sdk.cloudapi.map.OfflineMapGetResponse;
import com.dji.sdk.cloudapi.map.OfflineMapSyncProgress;
import com.dji.sdk.cloudapi.map.api.AbstractOfflineMapService;
import com.dji.sdk.cloudapi.property.DockDroneOfflineMapEnable;
import com.dji.sdk.mqtt.MqttReply;
import com.dji.sdk.mqtt.requests.TopicRequestsRequest;
import com.dji.sdk.mqtt.requests.TopicRequestsResponse;
import com.dji.sdk.mqtt.state.TopicStateRequest;
import com.dji.sdk.mqtt.state.TopicStateResponse;
import lombok.extern.slf4j.Slf4j;
import org.springframework.messaging.MessageHeaders;
import org.springframework.stereotype.Service;


/**
 * @author hqjiang
 * @version 1.0
 * @date 2024/8/28
 */
@Service
@Slf4j
public class OfflineMapService extends AbstractOfflineMapService {

    @Override
    public TopicStateResponse<MqttReply> dockDroneOfflineMapEnable(TopicStateRequest<DockDroneOfflineMapEnable> request, MessageHeaders headers) {
        log.info("==========dockDroneOfflineMapEnable=========request:"+ request.toString() + ",headers:" + headers.toString());
        return new TopicStateResponse<MqttReply>().setData(MqttReply.error("dockDroneOfflineMapEnable not implemented"));
    }

    @Override
    public TopicRequestsResponse<MqttReply> offlineMapSyncProgress(TopicRequestsRequest<OfflineMapSyncProgress> request, MessageHeaders headers) {
        log.info("==========offlineMapSyncProgress=========request:"+ request.toString() + ",headers:" + headers.toString());
        return new TopicRequestsResponse<MqttReply>().setData(MqttReply.error("offlineMapSyncProgress not implemented"));
    }

    @Override
    public TopicRequestsResponse<MqttReply<OfflineMapGetResponse>> offlineMapGet(TopicRequestsRequest<OfflineMapGetRequest> request, MessageHeaders headers) {
        log.info("==========offlineMapGet=========request:"+ request.toString() + ",headers:" + headers.toString());
        return new TopicRequestsResponse<MqttReply<OfflineMapGetResponse>>().setData(MqttReply.error("offlineMapGet not implemented"));
    }
}
