From 1af77ab5f7c11a4b3d59c1989b51b9fca29679ce Mon Sep 17 00:00:00 2001
From: 648540858 <648540858@qq.com>
Date: 星期二, 18 十月 2022 22:18:49 +0800
Subject: [PATCH] Merge pull request #645 from IKangXu/wvp-28181-2.0

---
 src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/ISIPCommanderForPlatform.java |   34 +++++++++++++++++++---------------
 1 files changed, 19 insertions(+), 15 deletions(-)

diff --git a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/ISIPCommanderForPlatform.java b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/ISIPCommanderForPlatform.java
index d000f5a..13a36d7 100644
--- a/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/ISIPCommanderForPlatform.java
+++ b/src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/ISIPCommanderForPlatform.java
@@ -4,7 +4,10 @@
 import com.genersoft.iot.vmp.gb28181.event.SipSubscribe;
 import com.genersoft.iot.vmp.service.bean.GPSMsgInfo;
 
+import javax.sip.InvalidArgumentException;
+import javax.sip.SipException;
 import javax.sip.header.WWWAuthenticateHeader;
+import java.text.ParseException;
 import java.util.List;
 
 public interface ISIPCommanderForPlatform {
@@ -14,15 +17,15 @@
      * @param parentPlatform
      * @return
      */
-    boolean register(ParentPlatform parentPlatform, SipSubscribe.Event errorEvent , SipSubscribe.Event okEvent);
-    boolean register(ParentPlatform parentPlatform, String callId, WWWAuthenticateHeader www, SipSubscribe.Event errorEvent , SipSubscribe.Event okEvent, boolean registerAgain);
+    void register(ParentPlatform parentPlatform, SipSubscribe.Event errorEvent , SipSubscribe.Event okEvent) throws InvalidArgumentException, ParseException, SipException;
+    void register(ParentPlatform parentPlatform, String callId, WWWAuthenticateHeader www, SipSubscribe.Event errorEvent , SipSubscribe.Event okEvent, boolean registerAgain, boolean isRegister) throws SipException, InvalidArgumentException, ParseException;
 
     /**
      * 鍚戜笂绾у钩鍙版敞閿�
      * @param parentPlatform
      * @return
      */
-    boolean unregister(ParentPlatform parentPlatform, SipSubscribe.Event errorEvent , SipSubscribe.Event okEvent);
+    void unregister(ParentPlatform parentPlatform, SipSubscribe.Event errorEvent , SipSubscribe.Event okEvent) throws InvalidArgumentException, ParseException, SipException;
 
 
     /**
@@ -30,7 +33,7 @@
      * @param parentPlatform
      * @return callId(浣滀负鎺ュ彈鍥炲鐨勫垽瀹�)
      */
-    String keepalive(ParentPlatform parentPlatform);
+    String keepalive(ParentPlatform parentPlatform,SipSubscribe.Event errorEvent , SipSubscribe.Event okEvent) throws SipException, InvalidArgumentException, ParseException;
 
 
     /**
@@ -42,8 +45,8 @@
      * @param size
      * @return
      */
-    boolean catalogQuery(DeviceChannel channel, ParentPlatform parentPlatform, String sn, String fromTag, int size);
-    boolean catalogQuery(List<DeviceChannel> channels, ParentPlatform parentPlatform, String sn, String fromTag);
+    void catalogQuery(DeviceChannel channel, ParentPlatform parentPlatform, String sn, String fromTag, int size) throws SipException, InvalidArgumentException, ParseException;
+    void catalogQuery(List<DeviceChannel> channels, ParentPlatform parentPlatform, String sn, String fromTag) throws InvalidArgumentException, ParseException, SipException;
 
     /**
      * 鍚戜笂绾у洖澶岲eviceInfo鏌ヨ淇℃伅
@@ -52,7 +55,7 @@
      * @param fromTag
      * @return
      */
-    boolean deviceInfoResponse(ParentPlatform parentPlatform, String sn, String fromTag);
+    void deviceInfoResponse(ParentPlatform parentPlatform, String sn, String fromTag) throws SipException, InvalidArgumentException, ParseException;
 
     /**
      * 鍚戜笂绾у洖澶岲eviceStatus鏌ヨ淇℃伅
@@ -61,7 +64,7 @@
      * @param fromTag
      * @return
      */
-    boolean deviceStatusResponse(ParentPlatform parentPlatform, String sn, String fromTag);
+    void deviceStatusResponse(ParentPlatform parentPlatform, String sn, String fromTag) throws SipException, InvalidArgumentException, ParseException;
 
     /**
      * 鍚戜笂绾у洖澶嶇Щ鍔ㄤ綅缃闃呮秷鎭�
@@ -70,7 +73,7 @@
      * @param subscribeInfo 璁㈤槄鐩稿叧鐨勪俊鎭�
      * @return
      */
-    boolean sendNotifyMobilePosition(ParentPlatform parentPlatform, GPSMsgInfo gpsMsgInfo, SubscribeInfo subscribeInfo);
+    void sendNotifyMobilePosition(ParentPlatform parentPlatform, GPSMsgInfo gpsMsgInfo, SubscribeInfo subscribeInfo) throws InvalidArgumentException, ParseException, NoSuchFieldException, SipException, IllegalAccessException;
 
     /**
      * 鍚戜笂绾у洖澶嶆姤璀︽秷鎭�
@@ -78,21 +81,21 @@
      * @param deviceAlarm 鎶ヨ淇℃伅淇℃伅
      * @return
      */
-    boolean sendAlarmMessage(ParentPlatform parentPlatform, DeviceAlarm deviceAlarm);
+    void sendAlarmMessage(ParentPlatform parentPlatform, DeviceAlarm deviceAlarm) throws SipException, InvalidArgumentException, ParseException;
 
     /**
      * 鍥炲catalog浜嬩欢-澧炲姞/鏇存柊
      * @param parentPlatform
      * @param deviceChannels
      */
-    boolean sendNotifyForCatalogAddOrUpdate(String type, ParentPlatform parentPlatform, List<DeviceChannel> deviceChannels, SubscribeInfo subscribeInfo, Integer index);
+    void sendNotifyForCatalogAddOrUpdate(String type, ParentPlatform parentPlatform, List<DeviceChannel> deviceChannels, SubscribeInfo subscribeInfo, Integer index) throws InvalidArgumentException, ParseException, NoSuchFieldException, SipException, IllegalAccessException;
 
     /**
      * 鍥炲catalog浜嬩欢-鍒犻櫎
      * @param parentPlatform
      * @param deviceChannels
      */
-    boolean sendNotifyForCatalogOther(String type, ParentPlatform parentPlatform, List<DeviceChannel> deviceChannels, SubscribeInfo subscribeInfo, Integer index);
+    void sendNotifyForCatalogOther(String type, ParentPlatform parentPlatform, List<DeviceChannel> deviceChannels, SubscribeInfo subscribeInfo, Integer index) throws InvalidArgumentException, ParseException, NoSuchFieldException, SipException, IllegalAccessException;
 
     /**
      * 鍥炲recordInfo
@@ -101,7 +104,7 @@
      * @param fromTag fromTag
      * @param recordInfo 褰曞儚淇℃伅
      */
-    boolean recordInfo(DeviceChannel deviceChannel, ParentPlatform parentPlatform, String fromTag, RecordInfo recordInfo);
+    void recordInfo(DeviceChannel deviceChannel, ParentPlatform parentPlatform, String fromTag, RecordInfo recordInfo) throws SipException, InvalidArgumentException, ParseException;
 
     /**
      * 褰曞儚鎾斁鎺ㄩ�佸畬鎴愭椂鍙戦�丮ediaStatus娑堟伅
@@ -109,12 +112,13 @@
      * @param sendRtpItem
      * @return
      */
-    boolean sendMediaStatusNotify(ParentPlatform platform, SendRtpItem sendRtpItem);
+    void sendMediaStatusNotify(ParentPlatform platform, SendRtpItem sendRtpItem) throws SipException, InvalidArgumentException, ParseException;
 
     /**
      * 鍚戝彂璧风偣鎾殑涓婄骇鍥炲bye
      * @param platform 骞冲彴淇℃伅
      * @param callId  callId
      */
-    void streamByeCmd(ParentPlatform platform, String callId);
+    void streamByeCmd(ParentPlatform platform, String callId) throws SipException, InvalidArgumentException, ParseException;
+    void streamByeCmd(ParentPlatform platform, SendRtpItem sendRtpItem) throws SipException, InvalidArgumentException, ParseException;
 }

--
Gitblit v1.8.0