|
@@ -7,7 +7,7 @@ import com.wdkl.ncs.android.middleware.tcp.enums.TcpType;
|
|
|
|
|
|
public class OtherUtil {
|
|
|
//分机SOS呼叫,不需要传toId
|
|
|
- public static TcpModel SOSCall(Integer fromId){
|
|
|
+ public static TcpModel sosCall(Integer fromId){
|
|
|
TcpModel tcpModel = new TcpModel();
|
|
|
tcpModel.setType(TcpType.SOS);
|
|
|
tcpModel.setAction(TcpAction.SOSAction.CALL);
|
|
@@ -15,7 +15,7 @@ public class OtherUtil {
|
|
|
return tcpModel;
|
|
|
}
|
|
|
|
|
|
- public static TcpModel SOSCancel(Integer fromId, Integer toId){
|
|
|
+ public static TcpModel sosCancel(Integer fromId, Integer toId){
|
|
|
TcpModel tcpModel = new TcpModel();
|
|
|
tcpModel.setType(TcpType.SOS);
|
|
|
tcpModel.setAction(TcpAction.SOSAction.CANCEL);
|
|
@@ -24,14 +24,40 @@ public class OtherUtil {
|
|
|
return tcpModel;
|
|
|
}
|
|
|
|
|
|
+ public static TcpModel nursing(Integer fromId){
|
|
|
+ TcpModel tcpModel = new TcpModel();
|
|
|
+ tcpModel.setType(TcpType.SIDE);
|
|
|
+ tcpModel.setAction(TcpAction.SideAction.NURSING);
|
|
|
+ tcpModel.setFromId(fromId);
|
|
|
+ return tcpModel;
|
|
|
+ }
|
|
|
+
|
|
|
+ public static TcpModel nursingEnd(Integer fromId){
|
|
|
+ TcpModel tcpModel = new TcpModel();
|
|
|
+ tcpModel.setType(TcpType.SIDE);
|
|
|
+ tcpModel.setAction(TcpAction.SideAction.NURSING_END);
|
|
|
+ tcpModel.setFromId(fromId);
|
|
|
+ return tcpModel;
|
|
|
+ }
|
|
|
+
|
|
|
//发送sos相关tcp
|
|
|
public static void sendSosCall(Integer fromId) {
|
|
|
- TcpModel tcpModel = OtherUtil.SOSCall(fromId);
|
|
|
+ TcpModel tcpModel = OtherUtil.sosCall(fromId);
|
|
|
TcpClient.getInstance().sendMsg(tcpModel.toJson());
|
|
|
}
|
|
|
|
|
|
public static void cancelSosCall(Integer fromId, Integer toId) {
|
|
|
- TcpModel tcpModel = OtherUtil.SOSCancel(fromId, toId);
|
|
|
+ TcpModel tcpModel = OtherUtil.sosCancel(fromId, toId);
|
|
|
+ TcpClient.getInstance().sendMsg(tcpModel.toJson());
|
|
|
+ }
|
|
|
+
|
|
|
+ public static void sendNursing(Integer fromId) {
|
|
|
+ TcpModel tcpModel = OtherUtil.nursing(fromId);
|
|
|
+ TcpClient.getInstance().sendMsg(tcpModel.toJson());
|
|
|
+ }
|
|
|
+
|
|
|
+ public static void sendNursingEnd(Integer fromId) {
|
|
|
+ TcpModel tcpModel = OtherUtil.nursingEnd(fromId);
|
|
|
TcpClient.getInstance().sendMsg(tcpModel.toJson());
|
|
|
}
|
|
|
}
|