package com.zd.system.api.camera;

import com.zd.common.core.constant.ServiceNameConstants;
import com.zd.common.core.domain.R;
import com.zd.common.core.enums.HardwareOperate;
import com.zd.system.api.camera.factory.RemoteCameraFallBackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(contextId = "remoteCameraService",value = ServiceNameConstants.CAMERA_SERVICE,fallbackFactory= RemoteCameraFallBackFactory.class)
public interface RemoteCameraService {
    @RequestMapping("/service/mqtt/send/{num}/{hardwareOperate}")
    public R sends(@PathVariable("num") String num, @PathVariable("hardwareOperate") HardwareOperate hardwareOperate);

    /**
     * 视频头开始录制
     * @param hostname IP地址
     */
    @RequestMapping("/api/onvif/startRecord")
    public R startRecord(@RequestParam("hostname") String hostname);

    /**
     * 视频头结束录制获取录制mp4
     * @param hostname IP地址
     */
    @RequestMapping("/api/onvif/stopRecord")
    public R stopRecord(@RequestParam("hostname") String hostname);
}
