TRTCCallingDef.dart 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. // 关键类定义
  2. class ActionCallback {
  3. /// 错误码
  4. int code;
  5. /// 信息描述
  6. String desc;
  7. ActionCallback({this.code = 0, this.desc = ''});
  8. }
  9. class RoomInfo {
  10. /// 【字段含义】房间唯一标识
  11. int roomId;
  12. /// 【字段含义】房间名称
  13. String? roomName;
  14. /// 【字段含义】房间封面图
  15. String? coverUrl;
  16. /// 【字段含义】房主id
  17. String ownerId;
  18. /// 【字段含义】房主昵称
  19. String? ownerName;
  20. /// 【字段含义】房间人数
  21. int? memberCount;
  22. RoomInfo(
  23. {required this.roomId,
  24. this.roomName,
  25. this.coverUrl,
  26. this.memberCount,
  27. required this.ownerId,
  28. this.ownerName});
  29. }
  30. class RoomInfoCallback {
  31. /// 错误码
  32. int code;
  33. /// 信息描述
  34. String desc;
  35. List<RoomInfo>? list;
  36. RoomInfoCallback({required this.code, required this.desc, this.list});
  37. }
  38. class RoomParam {
  39. /// 房间名称
  40. String? roomName;
  41. /// 房间封面图
  42. String? coverUrl;
  43. RoomParam({this.roomName, this.coverUrl});
  44. }
  45. class MemberListCallback {
  46. /// 错误码
  47. int code;
  48. /// 信息描述
  49. String desc;
  50. /// nextSeq 分页拉取标志,第一次拉取填0,回调成功如果 nextSeq 不为零,需要分页,传入再次拉取,直至为0。
  51. int nextSeq;
  52. List<UserInfo>? list;
  53. MemberListCallback(
  54. {this.code = 0, this.desc = '', this.nextSeq = 0, this.list});
  55. }
  56. class UserListCallback {
  57. /// 错误码
  58. int code;
  59. /// 信息描述
  60. String desc;
  61. /// 用户信息列表
  62. List<UserInfo>? list;
  63. UserListCallback({this.code = 0, this.desc = '', this.list});
  64. }
  65. class UserInfo {
  66. /// 用户唯一标识
  67. String userId;
  68. /// 用户昵称
  69. String userName;
  70. /// 用户头像
  71. String userAvatar;
  72. /// 主播是否开麦
  73. bool mute;
  74. UserInfo(
  75. {required this.userId,
  76. required this.userName,
  77. required this.userAvatar,
  78. required this.mute});
  79. }