同步专业版代码

This commit is contained in:
heavyrian2012
2022-01-29 11:43:44 +08:00
parent e3d9e0d183
commit 57e8814d9c
5 changed files with 20 additions and 7 deletions
@@ -19,12 +19,11 @@ public class OutputGetChannelInfo {
private String extra;
private String owner;
private int state;
//此字段已经废弃,为了兼容旧的SDK版本,以后会移除
@Deprecated()
private int status;
private long updateDt;
private String callback;
private int automatic;
private String secret;
public String getChannelId() {
@@ -115,6 +114,14 @@ public class OutputGetChannelInfo {
this.status = status;
}
public String getSecret() {
return secret;
}
public void setSecret(String secret) {
this.secret = secret;
}
public static OutputGetChannelInfo fromPbInfo(WFCMessage.ChannelInfo channelInfo) {
OutputGetChannelInfo out = new OutputGetChannelInfo();
out.automatic = channelInfo.getAutomatic();
@@ -126,8 +133,9 @@ public class OutputGetChannelInfo {
out.owner = channelInfo.getOwner();
out.portrait = channelInfo.getPortrait();
out.state = channelInfo.getStatus();
out.status = out.state;
out.status = channelInfo.getStatus();;
out.updateDt = channelInfo.getUpdateDt();
out.secret = channelInfo.getSecret();
return out;
}
}
@@ -8,4 +8,5 @@ public class PojoConferenceCreate {
public int bitrate;
public boolean advance;
public boolean recording;
public boolean permanent;
}
@@ -129,7 +129,7 @@ public class ProtoConstants {
//第3位表示是否允许给非订阅用户发送消息
//第4位表示是否私有,不可以被用户搜索和主动订阅
//第6位表示是否删除
//第8位表示是否是全局频道,全局频道没有订阅关系,会发送给系统内所有成员。
//第8位表示是否是全局频道,全局频道没有订阅关系,会发送给系统内所有成员。可以给非订阅用户单独发消息。
public interface ChannelState {
int Channel_State_Mask_FullInfo = 0x01;
int Channel_State_Mask_Unsubscribed_User_Access = 0x02;
@@ -17,7 +17,7 @@ public class ConferenceAdmin {
return AdminHttpUtils.httpJsonPost(path, data, PojoConferenceParticipantList.class);
}
public static IMResult<Void> createRoom(String roomId, String description, String pin, int maxPublisher, boolean advance, int bitrate, boolean recording) throws Exception {
public static IMResult<Void> createRoom(String roomId, String description, String pin, int maxPublisher, boolean advance, int bitrate, boolean recording, boolean permanent) throws Exception {
String path = APIPath.Conference_Create;
PojoConferenceCreate create = new PojoConferenceCreate();
create.roomId = roomId;
@@ -27,6 +27,7 @@ public class ConferenceAdmin {
create.advance = advance;
create.bitrate = bitrate;
create.recording = recording;
create.permanent = permanent;
return AdminHttpUtils.httpJsonPost(path, create, Void.class);
}
@@ -20,6 +20,7 @@ import static cn.wildfirechat.proto.ProtoConstants.SystemSettingType.Group_Max_M
public class Main {
private static boolean commercialServer = false;
private static boolean advanceVoip = false;
//管理端口是8080
private static String AdminUrl = "http://localhost:18080";
private static String AdminSecret = "123456";
@@ -51,6 +52,8 @@ public class Main {
testSensitiveApi();
if (commercialServer) {
testDevice();
}
if(advanceVoip) {
testConference();
}
@@ -1522,7 +1525,7 @@ public class Main {
System.out.println("conference list " + listResult.getResult().conferenceInfoList);
}
IMResult<Void> createResult = ConferenceAdmin.createRoom("helloroomid", "hello room description", "123456", 9, false, 0, false);
IMResult<Void> createResult = ConferenceAdmin.createRoom("helloroomid", "hello room description", "123456", 9, false, 0, false, true);
if(createResult == null || createResult.getErrorCode() != ErrorCode.ERROR_CODE_SUCCESS) {
System.out.println("create conference failure");
System.exit(-1);
@@ -1530,7 +1533,7 @@ public class Main {
System.out.println("create conference");
}
createResult = ConferenceAdmin.createRoom("helloroomid2", "hello room description advanced", "123456", 20, true, 0, false);
createResult = ConferenceAdmin.createRoom("helloroomid2", "hello room description advanced", "123456", 20, true, 0, false, true);
if(createResult == null || createResult.getErrorCode() != ErrorCode.ERROR_CODE_SUCCESS) {
System.out.println("create conference failure");
System.exit(-1);