NIMChatroomMemberRequest.h
3.44 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
//
// NIMChatroomMemberRequest.h
// NIMLib
//
// Created by Netease.
// Copyright © 2016年 Netease. All rights reserved.
//
#import <Foundation/Foundation.h>
NS_ASSUME_NONNULL_BEGIN
@class NIMChatroomMember;
/**
* 聊天室成员类型
*/
typedef NS_ENUM(NSInteger, NIMChatroomFetchMemberType){
/**
* 聊天室固定成员,包括创建者,管理员,普通等级用户,受限用户(禁言+黑名单),有数量上限
*/
NIMChatroomFetchMemberTypeRegular,
/**
* 聊天室临时成员,只有在线时才能在列表中看到,数量无上限
*/
NIMChatroomFetchMemberTypeTemp,
/**
* 聊天室在线的固定成员
*/
NIMChatroomFetchMemberTypeRegularOnline,
};
/**
* 聊天室成员信息修改字段
*/
typedef NS_ENUM(NSInteger, NIMChatroomMemberInfoUpdateTag) {
/**
* 聊天室成员昵称信息
*/
NIMChatroomMemberInfoUpdateTagNick = 5,
/**
* 聊天室成员头像信息
*/
NIMChatroomMemberInfoUpdateTagAvatar = 6,
/**
* 聊天室成员扩展信息
*/
NIMChatroomMemberInfoUpdateTagExt = 7,
};
/**
* 聊天室获取成员请求
*/
@interface NIMChatroomMemberRequest : NSObject
/**
* 聊天室ID
*/
@property (nonatomic,copy) NSString *roomId;
/**
* 聊天室成员类型
*/
@property (nonatomic,assign) NIMChatroomFetchMemberType type;
/**
* 最后一位成员锚点,不包括此成员。填nil会使用当前服务器最新时间开始查询,即第一页。
*/
@property (nullable,nonatomic,strong) NIMChatroomMember *lastMember;
/**
* 获取聊天室成员个数
*/
@property (nonatomic,assign) NSUInteger limit;
@end
/**
* 根据用户ID获取聊天室成员请求
*/
@interface NIMChatroomMembersByIdsRequest : NSObject
/**
* 聊天室ID
*/
@property (nonatomic,copy) NSString *roomId;
/**
* 用户ID列表,最多20个
*/
@property (nonatomic,copy) NSArray<NSString *> *userIds;
@end
/**
* 聊天室成员标记请求
*/
@interface NIMChatroomMemberUpdateRequest : NSObject
/**
* 聊天室ID
*/
@property (nonatomic,copy) NSString *roomId;
/**
* 用户ID
*/
@property (nonatomic,copy) NSString *userId;
/**
* 标记是否有效
*/
@property (nonatomic,assign) BOOL enable;
/**
* 操作通知事件扩展
*/
@property (nullable,nonatomic,copy) NSString *notifyExt;
@end
/**
* 聊天室成员信息修改请求
*/
@interface NIMChatroomMemberInfoUpdateRequest : NSObject
/**
* 聊天室ID
*/
@property (nonatomic,copy) NSString *roomId;
/**
* 需要更新的信息,修改传入的数据键值对是 {@(NIMChatroomMemberInfoUpdateTag) : NSString},无效数据将被过滤
*/
@property (nonatomic,copy) NSDictionary *updateInfo;
/**
* 是否需要通知
*/
@property (nonatomic,assign) BOOL needNotify;
/**
* 操作通知事件扩展
*/
@property (nullable,nonatomic,copy) NSString *notifyExt;
/**
* 更新的信息是否需要在服务器做持久化,只对固定成员生效,默认为 NO
*/
@property (nonatomic,assign) BOOL needSave;
@end
/**
* 聊天室踢人请求
*/
@interface NIMChatroomMemberKickRequest : NSObject
/**
* 聊天室ID
*/
@property (nonatomic,copy) NSString *roomId;
/**
* 用户ID,仅管理员可以踢人;如userId是管理员仅创建者可以踢.
*/
@property (nonatomic,copy) NSString *userId;
/**
* 被踢通知扩展字段
*/
@property (nullable,nonatomic,copy) NSString *notifyExt;
@end
NS_ASSUME_NONNULL_END