From 5d901b5e3f033e8b04e53420d68626cbd87431c8 Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期五, 06 五月 2022 10:12:34 +0800
Subject: [PATCH] 使用阿里代码规范。规范代码写法

---
 src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/ISIPCommander.java |   96 +++++++++++++++++++++++++++++++++++++----------
 1 files changed, 75 insertions(+), 21 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/ISIPCommander.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/ISIPCommander.java
index b06fa77..f4bcbb6 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/ISIPCommander.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/ISIPCommander.java
@@ -1,13 +1,16 @@
 package com.genersoft.iot.vmp.gb28181.transmit.cmd;
 
-import com.genersoft.iot.vmp.gb28181.bean.Device;
+import com.genersoft.iot.vmp.common.StreamInfo;
+import com.genersoft.iot.vmp.gb28181.bean.*;
 import com.genersoft.iot.vmp.gb28181.event.SipSubscribe;
 import com.genersoft.iot.vmp.media.zlm.ZLMHttpHookSubscribe;
-import com.genersoft.iot.vmp.media.zlm.dto.IMediaServerItem;
 import com.genersoft.iot.vmp.media.zlm.dto.MediaServerItem;
+import com.genersoft.iot.vmp.service.bean.SSRCInfo;
+
+import javax.sip.Dialog;
 
 /**    
- * @Description:璁惧鑳藉姏鎺ュ彛锛岀敤浜庡畾涔夎澶囩殑鎺у埗銆佹煡璇㈣兘鍔�   
+ * @description:璁惧鑳藉姏鎺ュ彛锛岀敤浜庡畾涔夎澶囩殑鎺у埗銆佹煡璇㈣兘鍔�   
  * @author: swwheihei
  * @date:   2020骞�5鏈�3鏃� 涓嬪崍9:16:34     
  */
@@ -20,7 +23,6 @@
 	 * @param channelId  棰勮閫氶亾
 	 * @param leftRight  闀滃ご宸︾Щ鍙崇Щ 0:鍋滄 1:宸︾Щ 2:鍙崇Щ
      * @param upDown     闀滃ご涓婄Щ涓嬬Щ 0:鍋滄 1:涓婄Щ 2:涓嬬Щ
-     * @param moveSpeed  闀滃ご绉诲姩閫熷害
 	 */
 	boolean ptzdirectCmd(Device device,String channelId,int leftRight, int upDown);
 	
@@ -50,7 +52,6 @@
 	 * @param device  鎺у埗璁惧
 	 * @param channelId  棰勮閫氶亾
      * @param inOut      闀滃ご鏀惧ぇ缂╁皬 0:鍋滄 1:缂╁皬 2:鏀惧ぇ
-     * @param zoomSpeed  闀滃ご缂╂斁閫熷害
 	 */
 	boolean ptzZoomCmd(Device device,String channelId,int inOut, int moveSpeed);
 	
@@ -85,15 +86,15 @@
 	 * @param channelId		棰勮閫氶亾
 	 * @param cmdString		鍓嶇鎺у埗鎸囦护涓�
 	 */
-	boolean fronEndCmd(Device device, String channelId, String cmdString);
+	boolean fronEndCmd(Device device, String channelId, String cmdString, SipSubscribe.Event errorEvent, SipSubscribe.Event okEvent);
 
 	/**
 	 * 璇锋眰棰勮瑙嗛娴�
 	 * @param device  瑙嗛璁惧
 	 * @param channelId  棰勮閫氶亾
 	 */
-	void playStreamCmd(IMediaServerItem mediaServerItem, Device device, String channelId, ZLMHttpHookSubscribe.Event event, SipSubscribe.Event errorEvent);
-	
+	void playStreamCmd(MediaServerItem mediaServerItem, SSRCInfo ssrcInfo, Device device, String channelId, ZLMHttpHookSubscribe.Event event, SipSubscribe.Event okEvent, SipSubscribe.Event errorEvent);
+
 	/**
 	 * 璇锋眰鍥炴斁瑙嗛娴�
 	 * 
@@ -102,15 +103,46 @@
 	 * @param startTime 寮�濮嬫椂闂�,鏍煎紡瑕佹眰锛歽yyy-MM-dd HH:mm:ss
 	 * @param endTime 缁撴潫鏃堕棿,鏍煎紡瑕佹眰锛歽yyy-MM-dd HH:mm:ss
 	 */
-	void playbackStreamCmd(IMediaServerItem mediaServerItem,Device device, String channelId, String startTime, String endTime, ZLMHttpHookSubscribe.Event event, SipSubscribe.Event errorEvent);
-	
+	void playbackStreamCmd(MediaServerItem mediaServerItem, SSRCInfo ssrcInf, Device device, String channelId, String startTime, String endTime,InviteStreamCallback inviteStreamCallback, InviteStreamCallback event, SipSubscribe.Event errorEvent);
+
+	/**
+	 * 璇锋眰鍘嗗彶濯掍綋涓嬭浇
+	 * 
+	 * @param device  瑙嗛璁惧
+	 * @param channelId  棰勮閫氶亾
+	 * @param startTime 寮�濮嬫椂闂�,鏍煎紡瑕佹眰锛歽yyy-MM-dd HH:mm:ss
+	 * @param endTime 缁撴潫鏃堕棿,鏍煎紡瑕佹眰锛歽yyy-MM-dd HH:mm:ss
+	 * @param downloadSpeed 涓嬭浇鍊嶉�熷弬鏁�
+	 */ 
+	void downloadStreamCmd(MediaServerItem mediaServerItem, SSRCInfo ssrcInfo, Device device, String channelId,
+						   String startTime, String endTime, int downloadSpeed, InviteStreamCallback inviteStreamCallback, InviteStreamCallback hookEvent,
+						   SipSubscribe.Event errorEvent);
+
 	/**
 	 * 瑙嗛娴佸仠姝�
-	 * 
-	 * @param ssrc  ssrc
 	 */
-	void streamByeCmd(String deviceId, String channelId, SipSubscribe.Event okEvent);
-	void streamByeCmd(String deviceId, String channelId);
+	void streamByeCmd(String deviceId, String channelId, String stream, String callId, SipSubscribe.Event okEvent);
+	void streamByeCmd(String deviceId, String channelId, String stream, String callId);
+
+	/**
+	 * 鍥炴斁鏆傚仠
+	 */
+	void playPauseCmd(Device device, StreamInfo streamInfo);
+
+	/**
+	 * 鍥炴斁鎭㈠
+	 */
+	void playResumeCmd(Device device, StreamInfo streamInfo);
+
+	/**
+	 * 鍥炴斁鎷栧姩鎾斁
+	 */
+	void playSeekCmd(Device device, StreamInfo streamInfo, long seekTime);
+
+	/**
+	 * 鍥炴斁鍊嶉�熸挱鏀�
+	 */
+	void playSpeedCmd(Device device, StreamInfo streamInfo, Double speed);
 
 	/**
 	 * 璇煶骞挎挱
@@ -148,7 +180,6 @@
 	 * 鎶ヨ甯冮槻/鎾ら槻鍛戒护
 	 * 
 	 * @param device  	瑙嗛璁惧
-	 * @param setGuard	true: SetGuard, false: ResetGuard
 	 */
 	boolean guardCmd(Device device, String guardCmdStr, SipSubscribe.Event errorEvent);
 	
@@ -218,7 +249,7 @@
 	 * 
 	 * @param device 瑙嗛璁惧
 	 */
-	boolean catalogQuery(Device device, SipSubscribe.Event errorEvent);
+	boolean catalogQuery(Device device, int sn, SipSubscribe.Event errorEvent);
 	
 	/**
 	 * 鏌ヨ褰曞儚淇℃伅
@@ -226,8 +257,9 @@
 	 * @param device 瑙嗛璁惧
 	 * @param startTime 寮�濮嬫椂闂�,鏍煎紡瑕佹眰锛歽yyy-MM-dd HH:mm:ss
 	 * @param endTime 缁撴潫鏃堕棿,鏍煎紡瑕佹眰锛歽yyy-MM-dd HH:mm:ss
+	 * @param sn
 	 */
-	boolean recordInfoQuery(Device device, String channelId, String startTime, String endTime);
+	boolean recordInfoQuery(Device device, String channelId, String startTime, String endTime, int sn,  Integer Secrecy, String type, SipSubscribe.Event okEvent, SipSubscribe.Event errorEvent);
 	
 	/**
 	 * 鏌ヨ鎶ヨ淇℃伅
@@ -271,11 +303,9 @@
 	 * 璁㈤槄銆佸彇娑堣闃呯Щ鍔ㄤ綅缃�
 	 * 
 	 * @param device	瑙嗛璁惧
-	 * @param expires	璁㈤槄瓒呮椂鏃堕棿锛堝��=0鏃朵负鍙栨秷璁㈤槄锛�
-	 * @param interval	涓婃姤鏃堕棿闂撮殧
 	 * @return			true = 鍛戒护鍙戦�佹垚鍔�
 	 */
-	boolean mobilePositionSubscribe(Device device, int expires, int interval);
+	boolean mobilePositionSubscribe(Device device, Dialog dialog, SipSubscribe.Event okEvent , SipSubscribe.Event errorEvent);
 
 	/**
 	 * 璁㈤槄銆佸彇娑堣闃呮姤璀︿俊鎭�
@@ -283,11 +313,35 @@
 	 * @param expires		璁㈤槄杩囨湡鏃堕棿锛�0 = 鍙栨秷璁㈤槄锛�
 	 * @param startPriority	鎶ヨ璧峰绾у埆锛堝彲閫夛級
 	 * @param endPriority	鎶ヨ缁堟绾у埆锛堝彲閫夛級
-	 * @param alarmMethods	鎶ヨ鏂瑰紡鏉′欢锛堝彲閫夛級
 	 * @param alarmType		鎶ヨ绫诲瀷
 	 * @param startTime		鎶ヨ鍙戠敓璧峰鏃堕棿锛堝彲閫夛級
 	 * @param endTime		鎶ヨ鍙戠敓缁堟鏃堕棿锛堝彲閫夛級
 	 * @return				true = 鍛戒护鍙戦�佹垚鍔�
 	 */
 	boolean alarmSubscribe(Device device, int expires, String startPriority, String endPriority, String alarmMethod, String alarmType, String startTime, String endTime);
+
+	/**
+	 * 璁㈤槄銆佸彇娑堣闃呯洰褰曚俊鎭�
+	 * @param device		瑙嗛璁惧
+	 * @return				true = 鍛戒护鍙戦�佹垚鍔�
+	 */
+	boolean catalogSubscribe(Device device, Dialog dialog, SipSubscribe.Event okEvent ,SipSubscribe.Event errorEvent);
+
+	/**
+	 * 鎷夋鎺у埗鍛戒护
+	 *
+	 * @param device    鎺у埗璁惧
+	 * @param channelId 閫氶亾id
+	 * @param cmdString 鍓嶇鎺у埗鎸囦护涓�
+	 */
+	boolean dragZoomCmd(Device device, String channelId, String cmdString);
+
+
+	/**
+	 * 鍚戣澶囧彂閫佹姤璀OTIFY娑堟伅锛� 鐢ㄤ簬浜掕仈缁撴瀯涓嬶紝姝ゆ椂灏嗚澶囧綋鎴愪竴涓钩绾у钩鍙扮湅寰�
+	 * @param device 璁惧
+	 * @param deviceAlarm 鎶ヨ淇℃伅淇℃伅
+	 * @return
+	 */
+	boolean sendAlarmMessage(Device device, DeviceAlarm deviceAlarm);
 }

--
Gitblit v1.8.0