NIMSDK-AOS  9.16.3
EnterChatRoomResultData.java
浏览该文件的文档.
1 package com.netease.nimlib.sdk.chatroom.model;
2 
3 import android.os.Parcel;
4 import android.os.Parcelable;
5 
7 
8 import java.io.Serializable;
9 
13 public class EnterChatRoomResultData implements Serializable, Parcelable {
14  private String roomId;
15  private int resCode;
16  private StatusCode status;
17  private ChatRoomInfo roomInfo;
18  private ChatRoomMember member;
19  private String account;
20 
21  public EnterChatRoomResultData(String roomId, int resCode, StatusCode status, ChatRoomInfo roomInfo, ChatRoomMember member, String account) {
22  this.roomId = roomId;
23  this.resCode = resCode;
24  this.status = status;
25  this.roomInfo = roomInfo;
26  this.member = member;
27  this.account = account;
28  }
29 
30  public String getAccount() {
31  return account;
32  }
33 
34  public String getRoomId() {
35  return roomId;
36  }
37 
38  public int getResCode() {
39  return resCode;
40  }
41 
42  public StatusCode getStatus() {
43  return status;
44  }
45 
47  return roomInfo;
48  }
49 
51  return member;
52  }
56  protected EnterChatRoomResultData(Parcel in) {
57  roomId = in.readString();
58  resCode = in.readInt();
59  status = StatusCode.typeOfValue(in.readInt());
60  roomInfo = in.readParcelable(getClass().getClassLoader());
61  member = in.readParcelable(getClass().getClassLoader());
62  account = in.readString();
63  }
64 
65  @Override
66  public int describeContents() {
67  return 0;
68  }
69 
70  @Override
71  public void writeToParcel(Parcel dest, int flags) {
72  dest.writeString(roomId);
73  dest.writeInt(resCode);
74  dest.writeInt(status.getValue());
75  dest.writeParcelable(roomInfo, flags);
76  dest.writeParcelable(member, flags);
77  dest.writeString(account);
78  }
79 
80  public static final Creator<EnterChatRoomResultData> CREATOR = new Creator<EnterChatRoomResultData>() {
81  @Override
82  public EnterChatRoomResultData createFromParcel(Parcel in) {
83  return new EnterChatRoomResultData(in);
84  }
85 
86  @Override
87  public EnterChatRoomResultData[] newArray(int size) {
88  return new EnterChatRoomResultData[size];
89  }
90  };
91 }
static StatusCode typeOfValue(int value)
用户当前状态码定义
Definition: StatusCode.java:6
EnterChatRoomResultData(String roomId, int resCode, StatusCode status, ChatRoomInfo roomInfo, ChatRoomMember member, String account)
EnterChatRoomResultData(Parcel in)
********************************** 序列化 **********************************
static final Creator< EnterChatRoomResultData > CREATOR