1 package com.netease.nimlib.sdk.chatroom.model;
3 import android.os.Parcel;
4 import android.os.Parcelable;
8 import java.io.Serializable;
15 private String roomId;
17 private String announcement;
18 private String broadcastUrl;
19 private String creator;
20 private int validFlag;
21 private int onlineUserCount;
23 private Map<String, Object> extension;
24 private int queueLevel;
74 return validFlag == 1;
90 return onlineUserCount;
106 this.roomId = roomId;
122 this.announcement = announcement;
130 this.broadcastUrl = broadcastUrl;
138 this.creator = creator;
146 this.validFlag = validFlag;
154 this.extension = extension;
162 this.onlineUserCount = onlineUserCount;
179 this.queueLevel = queueLevel;
194 roomId = in.readString();
195 name = in.readString();
196 announcement = in.readString();
197 broadcastUrl = in.readString();
198 creator = in.readString();
199 validFlag = in.readInt();
200 onlineUserCount = in.readInt();
201 setExtension(MsgHelper.getMapFromJsonString(in.readString()));
203 queueLevel = in.readInt();
213 dest.writeString(roomId);
214 dest.writeString(name);
215 dest.writeString(announcement);
216 dest.writeString(broadcastUrl);
217 dest.writeString(creator);
218 dest.writeInt(validFlag);
219 dest.writeInt(onlineUserCount);
220 dest.writeString(MsgHelper.getJsonStringFromMap(extension));
222 dest.writeInt(queueLevel);
225 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)
设置聊天室直播拉流地址
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 setExtension(Map< String, Object > extension)
设置扩展字段