ZegoLiveRoom
RoomDefines.h
Go to the documentation of this file.
1//
2// RoomDefines.h
3// zegoliveroom
4//
5// Created by Strong on 2017/7/20.
6//
7
8#ifndef RoomDefines_h
9#define RoomDefines_h
10
11#include "./AVDefines.h"
12#include <cstddef>
13
14#ifndef ZEGO_API
15 #ifdef WIN32
16 #ifdef ZEGO_EXPORTS
17 #define ZEGO_API __declspec(dllexport)
18 #else
19 #define ZEGO_API __declspec(dllimport)
20 #endif
21 #else
22 #define ZEGO_API __attribute__((visibility("default")))
23 #endif
24#endif
25
26namespace ZEGO
27{
28 namespace COMMON
29 {
32 {
40 ZEGO_NT_UNKNOWN = 32
41 };
42
45 {
46 StreamAdded = 2001,
48 };
49
51 {
61 };
62
64 {
66 {
67 szUserId[0] = '\0';
68 szUserName[0] = '\0';
69 szStreamId[0] = '\0';
70 szExtraInfo[0] = '\0';
71 nStreamNId = 0;
73 censorInfo = 0;
74 }
75
81
82 //流删除原因,当前流删除原因 (只在sdk 回调onStreamUpdated 且type类型为流删除时有效)
84 int censorInfo; // 房间内审核信息, bit mask 模式
85 };
86
89 {
91 ZEGO_MIX_STREAM = 1 << 1,
93 };
94
96 {
98 {
100 uiHlsURLCount = 0;
101 uiFlvURLCount = 0;
102 for (int i = 0; i < ZEGO_MAX_URL_COUNT; i++)
103 {
104 arrRtmpURLs[i] = NULL;
105 arrFlvURLs[i] = NULL;
106 arrHlsURLs[i] = NULL;
107 }
108 }
110 unsigned int uiRtmpURLCount;
113 unsigned int uiFlvURLCount;
114
116 unsigned int uiHlsURLCount;
117 };
118
121 {
123 Anchor = 1,
126 };
127
130 {
133 };
134
137 {
140 };
141
143 {
145 {
146 szUserId[0] = '\0';
147 szUserName[0] = '\0';
150 }
151
156 };
157
159 {
161 {
162 //标志房间时间断内唯一性的id
163 uRoomSessionId = 0;
164 }
165
166 unsigned long long uRoomSessionId;
167 };
168 }
169
170 namespace ROOM
171 {
172 struct ZegoUser
173 {
175 {
176 szUserId[0] = '\0';
177 szUserName[0] = '\0';
178 }
179
182 };
183
185 {
186 TransparentMessageNormal = 0, //发和收不保证严格顺序
187 TransparentMessageSequence = 1, //TransparentMessageSequence,sdk 会严格保证接收顺序。 x用户 在房间A中sendA, sendB 那么 在房间A中收到用户x 的OnRecvRoomTransparentMessage 回调一定是 recvA, recvB
188 };
189
191 {
192 RoomTransparentClient = 0, //数据只会推给对端 接收端触发 OnRecvRoomTransparentMessage
193 RoomTransparentServer = 1, //数据只会推给客户服务,不会触发OnRecvRoomTransparentMessage. 需要后台配置服务调度地址
194 RoomTransparentClientAndServer = 2, //数据推给客户服务,和推给sdk, 需要后台配置服务调度地址
195 };
196
198 {
202 recvUserList = NULL;
204 content = NULL;
205 contentLenth = 0;
206 timeOut = 10;
207 }
210
212 unsigned int recvUserListCount;
213
214 unsigned char *content;
215 unsigned int contentLenth;
216
217 int timeOut; //单位s
218 };
219
222 content = NULL;
223 contentLenth = 0;
224 }
225
227 unsigned char *content;
228 unsigned int contentLenth;
229 };
230
232 {
234 RoomStreamAll = 1
235 };
236
238 {
241
244
246 {
247 publishStreamList = nullptr;
249
250 playStreamList = nullptr;
252 }
253 };
254
256 {
259 };
260 }
261 }
262
263#ifndef ZegoRoomDefines_h
264
265namespace ZEGO
266{
267 namespace ROOM
268 {
271 {
272 Text = 1,
275 OtherType = 100,
276 };
277
280 {
282 High = 3,
283 };
284
287 {
288 Chat = 1,
293 };
294
297 {
300 };
301
303 {
305 {
306 szUserId[0] = '\0';
307 szUserName[0] = '\0';
308 szContent[0] = '\0';
310 type = Text;
312 category = Chat;
313 sendTime = 0;
314 messageId = 0;
315 }
316
321 unsigned long long messageId;
325 unsigned long long sendTime;
326 };
327
329 {
331 {
332 szUserId[0] = '\0';
333 szUserName[0] = '\0';
334 szContent[0] = '\0';
335 szMessageId[0] = '\0';
337 type = Text;
338 category = Chat;
339 sendTime = 0;
340 }
341
349 unsigned long long sendTime;
350 };
351
353 {
355 {
356 szKey[0] = '\0';
357 szValue[0] = '\0';
358 szUserID[0] = '\0';
359 szUserName[0] = '\0';
360 updateTime = 0;
361 }
371 unsigned long long updateTime;
372 };
373
375 {
380 };
381 }
382}
383
384#endif /* ZegoRoomDefines_h */
385#endif /* RoomDefines_h */
386
387
ZEGONetType
Definition: RoomDefines.h:32
@ ZEGO_NT_2G
Definition: RoomDefines.h:36
@ ZEGO_NT_5G
Definition: RoomDefines.h:39
@ ZEGO_NT_LINE
Definition: RoomDefines.h:34
@ ZEGO_NT_NONE
Definition: RoomDefines.h:33
@ ZEGO_NT_WIFI
Definition: RoomDefines.h:35
@ ZEGO_NT_UNKNOWN
Definition: RoomDefines.h:40
@ ZEGO_NT_3G
Definition: RoomDefines.h:37
@ ZEGO_NT_4G
Definition: RoomDefines.h:38
ZegoUserUpdateType
Definition: RoomDefines.h:130
@ UPDATE_INCREASE
Definition: RoomDefines.h:132
@ UPDATE_TOTAL
Definition: RoomDefines.h:131
ZegoPublishFlag
Definition: RoomDefines.h:89
@ ZEGO_JOIN_PUBLISH
Definition: RoomDefines.h:90
@ ZEGO_SINGLE_ANCHOR
Definition: RoomDefines.h:92
@ ZEGO_MIX_STREAM
Definition: RoomDefines.h:91
ZegoStreamDeleteReason
Definition: RoomDefines.h:51
@ ZEGO_DELETE_REPEAT_LOGIN
Definition: RoomDefines.h:55
@ ZEGO_DELETE_SERVER
Definition: RoomDefines.h:59
@ ZEGO_DELETE_NOT_SUPPORT
Definition: RoomDefines.h:52
@ ZEGO_DELETE_NORMAL
Definition: RoomDefines.h:53
@ ZEGO_DELETE_HEARTBEAT_TIMEOUT
Definition: RoomDefines.h:54
@ ZEGO_DELETE_KICKOUT
Definition: RoomDefines.h:56
@ ZEGO_DELETE_UNKOWN
Definition: RoomDefines.h:60
@ ZEGO_DELETE_OFFLINE
Definition: RoomDefines.h:57
ZegoRoomRole
Definition: RoomDefines.h:121
@ Assistant
Definition: RoomDefines.h:125
@ Audience
Definition: RoomDefines.h:124
@ UnknownRole
Definition: RoomDefines.h:122
@ Anchor
Definition: RoomDefines.h:123
ZegoStreamUpdateType
Definition: RoomDefines.h:45
@ StreamDeleted
Definition: RoomDefines.h:47
@ StreamAdded
Definition: RoomDefines.h:46
ZegoUserUpdateFlag
Definition: RoomDefines.h:137
@ USER_ADDED
Definition: RoomDefines.h:138
@ USER_DELETED
Definition: RoomDefines.h:139
ZegoTransparentMessageMode
Definition: RoomDefines.h:191
@ RoomTransparentClient
Definition: RoomDefines.h:192
@ RoomTransparentClientAndServer
Definition: RoomDefines.h:194
@ RoomTransparentServer
Definition: RoomDefines.h:193
ZegoMessageType
Definition: RoomDefines.h:271
@ OtherType
Definition: RoomDefines.h:275
@ Text
Definition: RoomDefines.h:272
@ File
Definition: RoomDefines.h:274
@ Picture
Definition: RoomDefines.h:273
ZegoTransparentMessageType
Definition: RoomDefines.h:185
@ TransparentMessageSequence
Definition: RoomDefines.h:187
@ TransparentMessageNormal
Definition: RoomDefines.h:186
ZegoMessagePriority
Definition: RoomDefines.h:280
@ High
Definition: RoomDefines.h:282
@ Default
Definition: RoomDefines.h:281
ZegoRelayType
Definition: RoomDefines.h:297
@ RelayTypeDati
Definition: RoomDefines.h:299
@ RelayTypeNone
Definition: RoomDefines.h:298
ZegoConnectState
Definition: RoomDefines.h:375
@ WaitingConnect
Definition: RoomDefines.h:377
@ Connecting
Definition: RoomDefines.h:378
@ Disconnected
Definition: RoomDefines.h:376
@ Connected
Definition: RoomDefines.h:379
ZegoRoomCapabilityNegotiationTypesBitMask
Definition: RoomDefines.h:256
@ ZEGO_ROOM_CAPABILITY_NEGOTIATION_TYPES_BIT_MASK_ALL
Definition: RoomDefines.h:257
@ ZEGO_ROOM_CAPABILITY_NEGOTIATION_TYPES_BIT_MASK_PUBLISHER
Definition: RoomDefines.h:258
ZegoMessageCategory
Definition: RoomDefines.h:287
@ System
Definition: RoomDefines.h:289
@ Like
Definition: RoomDefines.h:290
@ OtherCategory
Definition: RoomDefines.h:292
@ Gift
Definition: RoomDefines.h:291
@ Chat
Definition: RoomDefines.h:288
ZegoRoomStreamListType
Definition: RoomDefines.h:232
@ RoomStreamAll
Definition: RoomDefines.h:234
@ RoomStreamPlay
Definition: RoomDefines.h:233
Definition: AVDefines.h:17
Definition: RoomDefines.h:96
const char * arrRtmpURLs[ZEGO_MAX_URL_COUNT]
Definition: RoomDefines.h:109
const char * arrFlvURLs[ZEGO_MAX_URL_COUNT]
Definition: RoomDefines.h:112
unsigned int uiHlsURLCount
Definition: RoomDefines.h:116
ZegoPublishingStreamInfo()
Definition: RoomDefines.h:97
unsigned int uiRtmpURLCount
Definition: RoomDefines.h:110
unsigned int uiFlvURLCount
Definition: RoomDefines.h:113
const char * arrHlsURLs[ZEGO_MAX_URL_COUNT]
Definition: RoomDefines.h:115
Definition: RoomDefines.h:159
ZegoRoomInfo()
Definition: RoomDefines.h:160
unsigned long long uRoomSessionId
Definition: RoomDefines.h:166
Definition: RoomDefines.h:64
int nStreamNId
Definition: RoomDefines.h:80
char szUserId[ZEGO_MAX_USERID_LEN]
Definition: RoomDefines.h:76
char szExtraInfo[ZEGO_MAX_EXTRA_INFO_LEN]
Definition: RoomDefines.h:79
int censorInfo
Definition: RoomDefines.h:84
ZegoStreamDeleteReason streamDeleteReason
Definition: RoomDefines.h:83
char szStreamId[ZEGO_MAX_COMMON_LEN]
Definition: RoomDefines.h:78
ZegoStreamInfo()
Definition: RoomDefines.h:65
char szUserName[ZEGO_MAX_USERNAME_LEN]
Definition: RoomDefines.h:77
Definition: RoomDefines.h:143
char szUserName[ZEGO_MAX_USERNAME_LEN]
Definition: RoomDefines.h:153
ZegoUserInfo()
Definition: RoomDefines.h:144
char szUserId[ZEGO_MAX_USERID_LEN]
Definition: RoomDefines.h:152
ZegoUserUpdateFlag udapteFlag
Definition: RoomDefines.h:154
ZegoRoomRole role
Definition: RoomDefines.h:155
Definition: RoomDefines.h:329
char szMessageId[ZEGO_MAX_IDENTITY_LEN]
Definition: RoomDefines.h:346
ZegoMessageType type
Definition: RoomDefines.h:347
char szUserId[ZEGO_MAX_USERID_LEN]
Definition: RoomDefines.h:342
char szUserName[ZEGO_MAX_USERNAME_LEN]
Definition: RoomDefines.h:343
char szContent[ZEGO_MAX_ROOMMESSAGE_LEN]
Definition: RoomDefines.h:345
ZegoMessageCategory category
Definition: RoomDefines.h:348
ZegoBigRoomMessage()
Definition: RoomDefines.h:330
unsigned long long sendTime
Definition: RoomDefines.h:349
COMMON::ZegoRoomRole role
Definition: RoomDefines.h:344
Definition: RoomDefines.h:220
ZegoUser sendUser
Definition: RoomDefines.h:226
unsigned char * content
Definition: RoomDefines.h:227
ZegoRecvTransparentMessage()
Definition: RoomDefines.h:221
unsigned int contentLenth
Definition: RoomDefines.h:228
Definition: RoomDefines.h:353
ZegoRoomExtraInfo()
Definition: RoomDefines.h:354
char szUserName[ZEGO_MAX_USERNAME_LEN]
Definition: RoomDefines.h:369
char szUserID[ZEGO_MAX_USERID_LEN]
Definition: RoomDefines.h:367
char szValue[ZEGO_MAX_ROOM_EXTRA_INFO_VALUE_LEN]
Definition: RoomDefines.h:365
char szKey[ZEGO_MAX_ROOM_EXTRA_INFO_KEY_LEN]
Definition: RoomDefines.h:363
unsigned long long updateTime
Definition: RoomDefines.h:371
Definition: RoomDefines.h:303
COMMON::ZegoRoomRole role
Definition: RoomDefines.h:319
char szContent[ZEGO_MAX_ROOMMESSAGE_LEN]
Definition: RoomDefines.h:320
ZegoMessageType type
Definition: RoomDefines.h:322
unsigned long long messageId
Definition: RoomDefines.h:321
ZegoMessageCategory category
Definition: RoomDefines.h:324
ZegoMessagePriority priority
Definition: RoomDefines.h:323
char szUserName[ZEGO_MAX_USERNAME_LEN]
Definition: RoomDefines.h:318
ZegoRoomMessage()
Definition: RoomDefines.h:304
unsigned long long sendTime
Definition: RoomDefines.h:325
char szUserId[ZEGO_MAX_USERID_LEN]
Definition: RoomDefines.h:317
Definition: RoomDefines.h:238
COMMON::ZegoStreamInfo * playStreamList
Definition: RoomDefines.h:242
COMMON::ZegoStreamInfo * publishStreamList
Definition: RoomDefines.h:239
unsigned int playStreamListCount
Definition: RoomDefines.h:243
unsigned int publishStreamListCount
Definition: RoomDefines.h:240
ZegoRoomStreamList()
Definition: RoomDefines.h:245
Definition: RoomDefines.h:198
int timeOut
Definition: RoomDefines.h:217
ZegoUser * recvUserList
Definition: RoomDefines.h:211
ZegoTransparentMessageType sendType
Definition: RoomDefines.h:208
ZegoTransparentMessageMode sendMode
Definition: RoomDefines.h:209
unsigned int contentLenth
Definition: RoomDefines.h:215
ZegoSendTransparentMessage()
Definition: RoomDefines.h:199
unsigned char * content
Definition: RoomDefines.h:214
unsigned int recvUserListCount
Definition: RoomDefines.h:212
Definition: RoomDefines.h:173
ZegoUser()
Definition: RoomDefines.h:174
char szUserName[ZEGO_MAX_USERNAME_LEN]
Definition: RoomDefines.h:181
char szUserId[ZEGO_MAX_USERID_LEN]
Definition: RoomDefines.h:180
#define ZEGO_MAX_ROOM_EXTRA_INFO_KEY_LEN
Definition: zego-api-defines.h:31
#define ZEGO_MAX_ROOM_EXTRA_INFO_VALUE_LEN
Definition: zego-api-defines.h:32
#define ZEGO_MAX_ROOMMESSAGE_LEN
Definition: zego-api-defines.h:17
#define ZEGO_MAX_IDENTITY_LEN
Definition: zego-api-defines.h:16
#define ZEGO_MAX_USERID_LEN
Definition: zego-api-defines.h:22
#define ZEGO_MAX_USERNAME_LEN
Definition: zego-api-defines.h:23
#define ZEGO_MAX_EXTRA_INFO_LEN
Definition: zego-api-defines.h:24
#define ZEGO_MAX_COMMON_LEN
Definition: zego-api-defines.h:11
#define ZEGO_MAX_URL_COUNT
Definition: zego-api-defines.h:12