Skip to content

Commit

Permalink
兼容旧的server sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
heavyrain2012 committed Dec 6, 2021
1 parent 54aa4d5 commit 05476bb
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ public class OutputGetChannelInfo {
private String extra;
private String owner;
private int state;
//此字段已经废弃,为了兼容旧的SDK版本,以后会移除
private int status;
private long updateDt;
private String callback;
private int automatic;
Expand Down Expand Up @@ -104,6 +106,14 @@ public void setAutomatic(int automatic) {
this.automatic = automatic;
}

public int getStatus() {
return status;
}

public void setStatus(int status) {
this.status = status;
}

public static OutputGetChannelInfo fromPbInfo(WFCMessage.ChannelInfo channelInfo) {
OutputGetChannelInfo out = new OutputGetChannelInfo();
out.automatic = channelInfo.getAutomatic();
Expand All @@ -115,6 +125,7 @@ public static OutputGetChannelInfo fromPbInfo(WFCMessage.ChannelInfo channelInfo
out.owner = channelInfo.getOwner();
out.portrait = channelInfo.getPortrait();
out.state = channelInfo.getStatus();
out.status = out.state;
out.updateDt = channelInfo.getUpdateDt();
return out;
}
Expand Down

0 comments on commit 05476bb

Please sign in to comment.