From 82adc0cb23f3ee47322e78889cdaba57e9309000 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期二, 21 三月 2023 15:55:24 +0800
Subject: [PATCH] 完善语音对讲级联

---
 src/main/java/com/genersoft/iot/vmp/service/IDeviceService.java |  134 +++++++++++++++++++++++++++++++++++++++++---
 1 files changed, 123 insertions(+), 11 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/service/IDeviceService.java b/src/main/java/com/genersoft/iot/vmp/service/IDeviceService.java
index 17cf7f4..072519b 100644
--- a/src/main/java/com/genersoft/iot/vmp/service/IDeviceService.java
+++ b/src/main/java/com/genersoft/iot/vmp/service/IDeviceService.java
@@ -1,58 +1,170 @@
 package com.genersoft.iot.vmp.service;
 
 import com.genersoft.iot.vmp.gb28181.bean.Device;
+import com.genersoft.iot.vmp.gb28181.bean.DeviceChannel;
 import com.genersoft.iot.vmp.gb28181.bean.SyncStatus;
+import com.genersoft.iot.vmp.vmanager.bean.BaseTree;
+import com.genersoft.iot.vmp.vmanager.bean.ResourceBaceInfo;
+
+import java.util.List;
 
 /**
  * 璁惧鐩稿叧涓氬姟澶勭悊
+ * @author lin
  */
 public interface IDeviceService {
 
     /**
+     * 璁惧涓婄嚎
+     * @param device 璁惧淇℃伅
+     */
+    void online(Device device);
+
+    /**
+     * 璁惧涓嬬嚎
+     * @param deviceId 璁惧缂栧彿
+     */
+    void offline(String deviceId);
+
+    /**
      * 娣诲姞鐩綍璁㈤槄
      * @param device 璁惧淇℃伅
-     * @return
+     * @return 甯冨皵
      */
     boolean addCatalogSubscribe(Device device);
 
     /**
      * 绉婚櫎鐩綍璁㈤槄
      * @param device 璁惧淇℃伅
-     * @return
+     * @return 甯冨皵
      */
     boolean removeCatalogSubscribe(Device device);
 
     /**
      * 娣诲姞绉诲姩浣嶇疆璁㈤槄
      * @param device 璁惧淇℃伅
-     * @return
+     * @return 甯冨皵
      */
     boolean addMobilePositionSubscribe(Device device);
 
     /**
      * 绉婚櫎绉诲姩浣嶇疆璁㈤槄
      * @param device 璁惧淇℃伅
-     * @return
+     * @return 甯冨皵
      */
     boolean removeMobilePositionSubscribe(Device device);
 
     /**
      * 绉婚櫎绉诲姩浣嶇疆璁㈤槄
      * @param deviceId 璁惧ID
-     * @return
+     * @return 鍚屾鐘舵��
      */
     SyncStatus getChannelSyncStatus(String deviceId);
 
     /**
-     * 璁剧疆閫氶亾鍚屾鐘舵��
+     * 鏌ョ湅鏄惁浠嶅湪鍚屾
      * @param deviceId 璁惧ID
+     * @return 甯冨皵
      */
-    void setChannelSyncReady(String deviceId);
+    Boolean isSyncRunning(String deviceId);
 
     /**
-     * 璁剧疆鍚屾缁撴潫
-     * @param deviceId 璁惧ID
-     * @param errorMsg 閿欒淇℃伅
+     * 閫氶亾鍚屾
+     * @param device 璁惧淇℃伅
      */
-    void setChannelSyncEnd(String deviceId, String errorMsg);
+    void sync(Device device);
+
+    /**
+     * 鏌ヨ璁惧淇℃伅
+     * @param deviceId 璁惧缂栧彿
+     * @return 璁惧淇℃伅
+     */
+    Device getDevice(String deviceId);
+
+    /**
+     * 鑾峰彇鎵�鏈夊湪绾胯澶�
+     * @return 璁惧鍒楄〃
+     */
+    List<Device> getAllOnlineDevice();
+
+    /**
+     * 鍒ゆ柇鏄惁娉ㄥ唽宸茬粡澶辨晥
+     * @param device 璁惧淇℃伅
+     * @return 甯冨皵
+     */
+    boolean expire(Device device);
+
+    /**
+     * 妫�鏌ヨ澶囩姸鎬�
+     * @param device 璁惧淇℃伅
+     */
+    void checkDeviceStatus(Device device);
+
+    /**
+     * 鏍规嵁IP鍜岀鍙h幏鍙栬澶囦俊鎭�
+     * @param host IP
+     * @param port 绔彛
+     * @return 璁惧淇℃伅
+     */
+    Device getDeviceByHostAndPort(String host, int port);
+
+    /**
+     * 鏇存柊璁惧
+     * @param device 璁惧淇℃伅
+     */
+    void updateDevice(Device device);
+
+    /**
+     * 鏍戝舰鏌ヨ鎺ュ彛
+     * @param deviceId 璁惧ID
+     * @param parentId 鐖禝D
+     * @param onlyCatalog 鍙幏鍙栫洰褰�
+     * @return
+     */
+    List<BaseTree<DeviceChannel>> queryVideoDeviceTree(String deviceId, String parentId, boolean onlyCatalog);
+
+    /**
+     * 鏌ヨ鏍戣妭鐐逛笅鐨勯�氶亾
+     * @param deviceId 璁惧ID
+     * @param parentId 鐖禝D
+     * @return
+     */
+    List<DeviceChannel> queryVideoDeviceInTreeNode(String deviceId, String parentId);
+
+    /**
+     * 妫�鏌ヨ澶囩紪鍙锋槸鍚﹀凡缁忓瓨鍦�
+     * @param deviceId 璁惧缂栧彿
+     * @return
+     */
+    boolean isExist(String deviceId);
+
+    /**
+     * 娣诲姞璁惧
+     * @param device
+     */
+    void addDevice(Device device);
+
+    /**
+     * 椤甸潰琛ㄥ崟鏇存柊璁惧淇℃伅
+     * @param device
+     */
+    void updateCustomDevice(Device device);
+
+    /**
+     * 鍒犻櫎璁惧
+     * @param deviceId
+     * @return
+     */
+    boolean delete(String deviceId);
+
+    /**
+     * 鑾峰彇缁熻淇℃伅
+     * @return
+     */
+    ResourceBaceInfo getOverview();
+
+    /**
+     * 鑾峰彇鎵�鏈夎澶�
+     */
+    List<Device> getAll();
 }

--
Gitblit v1.8.0