1 package com.netease.nimlib.sdk.chatroom.model;
3 import android.os.Parcel;
4 import android.os.Parcelable;
6 import java.io.Serializable;
13 private String roomId;
15 private String announcement;
16 private String broadcastUrl;
17 private String creator;
18 private int validFlag;
19 private int onlineUserCount;
21 private Map<String, Object> extension;
22 private String extensionStr;
23 private int queueLevel;
73 return validFlag == 1;
97 return onlineUserCount;
113 this.roomId = roomId;
129 this.announcement = announcement;
137 this.broadcastUrl = broadcastUrl;
145 this.creator = creator;
153 this.validFlag = validFlag;
161 this.extension = extension;
169 this.extensionStr = extensionStr;
170 this.extension = MsgHelper.getMapFromJsonString(extensionStr);
178 this.onlineUserCount = onlineUserCount;
195 this.queueLevel = queueLevel;
210 roomId = in.readString();
211 name = in.readString();
212 announcement = in.readString();
213 broadcastUrl = in.readString();
214 creator = in.readString();
215 validFlag = in.readInt();
216 onlineUserCount = in.readInt();
219 queueLevel = in.readInt();
229 dest.writeString(roomId);
230 dest.writeString(name);
231 dest.writeString(announcement);
232 dest.writeString(broadcastUrl);
233 dest.writeString(creator);
234 dest.writeInt(validFlag);
235 dest.writeInt(onlineUserCount);
236 dest.writeString(extensionStr);
238 dest.writeInt(queueLevel);
241 public static final Creator<ChatRoomInfo>
CREATOR =
new Creator<ChatRoomInfo>() {
void setOnlineUserCount(int onlineUserCount)
设置当前在线用户数量
ChatRoomInfo(Parcel in)
********************************** 序列化 **********************************
void setCreator(String creator)
设置聊天室创建者
String getCreator()
获取聊天室创建者帐号
String getAnnouncement()
获取聊天室公告
String getRoomId()
获取聊天室id
void setBroadcastUrl(String broadcastUrl)
设置聊天室直播拉流地址
String getExtensionStr()
获取聊天室扩展字段
void setMute(int mute)
设置当前聊天室禁言状态
void setRoomId(String roomId)
设置聊天室id
void setAnnouncement(String announcement)
设置聊天室公告
String getBroadcastUrl()
获取聊天室拉流地址
int getQueueLevel()
获取队列权限配置
void setQueueLevel(int queueLevel)
设置队列权限,如是否有权限提交他人key和信息到队列中 0 表示所有人都有权限,1 表示只有主播/管理员有权限...
void writeToParcel(Parcel dest, int flags)
void setName(String name)
设置聊天室名称
Map< String, Object > getExtension()
获取聊天室扩展字段
void setValidFlag(int validFlag)
设置聊天室有效标记
boolean isValid()
获取聊天室有效标记
boolean isMute()
获取当前聊天室禁言状态
static final Creator< ChatRoomInfo > CREATOR
int getOnlineUserCount()
获取当前在线用户数量
void setExtensionStr(String extensionStr)
设置扩展字段
void setExtension(Map< String, Object > extension)
设置扩展字段