ZegoLiveRoom
LiveRoomCallback.h
Go to the documentation of this file.
1//
2// ZegoLiveRoomCallback.h
3// ZegoRoom
4//
5// Copyright © 2017年 ZEGO. All rights reserved.
6//
7
8#ifndef ZegoLiveRoomCallback_h
9#define ZegoLiveRoomCallback_h
10
11#include "./LiveRoomDefines.h"
12
13namespace ZEGO
14{
15 namespace LIVEROOM
16 {
18 {
19 public:
25 virtual void OnInitSDK(int nError) {}
26
30 virtual void OnFatalError(int error) {}
31
35 virtual void OnLogWillOverwrite() {}
36
37
43 virtual void OnLogUploadResult(int errorCode) {}
44
51
60 virtual void OnLoginRoom(int errorCode, const char *pszRoomID, const ZegoStreamInfo *pStreamInfo, unsigned int streamCount) = 0;
61
68 virtual void OnLogoutRoom(int errorCode, const char *pszRoomID) {}
69
77 virtual void OnKickOut(int reason, const char *pszRoomID, const char* pszCustomReason="") = 0;
78
90 virtual void OnDisconnect(int errorCode, const char *pszRoomID) = 0;
91
92
101 virtual void OnReconnect(int errorCode, const char *pszRoomID) {};
102
110 virtual void OnTempBroken(int errorCode, const char *pszRoomID) {};
111
121 virtual void OnStreamUpdated(ZegoStreamUpdateType type, ZegoStreamInfo *pStreamInfo, unsigned int streamCount, const char *pszRoomID) = 0;
122
130 virtual void OnStreamExtraInfoUpdated(ZegoStreamInfo *pStreamInfo, unsigned int streamCount, const char *pszRoomID) = 0;
131
139 virtual void OnCustomCommand(int errorCode, int requestSeq, const char *pszRoomID) = 0;
140
149 virtual void OnRecvCustomCommand(const char *pszUserId, const char *pszUserName, const char *pszContent, const char *pszRoomID) = 0;
150
157 virtual void OnRoomInfoUpdated(const ZegoRoomInfo& info, const char *pszRoomID) {}
158
170 virtual void OnNetworkQuality(const char *pszUserId, int txQuality, int rxQuality) {}
171
180 virtual void OnRtcStats(const AV::RtcStatsInfo& info) {}
181
188 virtual void OnTokenWillExpired(const char *pszRoomID, int remainTimeInSecond) {}
189
199 virtual void OnLoginRoomResult(int errorCode, const char *pszRoomID, const ZegoStreamInfo *pStreamInfo, unsigned int streamCount, int sendSeq) {};
200 virtual void OnDisconnect(int errorCode, const char *pszRoomID, int sendSeq) {}
201
202 virtual ~IRoomCallback() {}
203 };
204
206 {
207 public:
211 virtual void OnAVEngineStart() = 0;
212
216 virtual void OnAVEngineStop() = 0;
217
219 };
220 }
221
222}
223
224#endif /* ZegoLiveRoomCallback_h */
Definition: LiveRoomCallback.h:206
virtual ~IAVEngineCallback()
Definition: LiveRoomCallback.h:218
Definition: LiveRoomCallback.h:18
virtual void OnNetworkQuality(const char *pszUserId, int txQuality, int rxQuality)
Definition: LiveRoomCallback.h:170
virtual void OnLogWillOverwrite()
Definition: LiveRoomCallback.h:35
virtual void OnDisconnect(int errorCode, const char *pszRoomID, int sendSeq)
Definition: LiveRoomCallback.h:200
virtual void OnLogUploadResult(int errorCode)
Definition: LiveRoomCallback.h:43
virtual void OnCustomCommand(int errorCode, int requestSeq, const char *pszRoomID)=0
virtual ~IRoomCallback()
Definition: LiveRoomCallback.h:202
virtual void OnStreamUpdated(ZegoStreamUpdateType type, ZegoStreamInfo *pStreamInfo, unsigned int streamCount, const char *pszRoomID)=0
virtual void OnLoginRoomResult(int errorCode, const char *pszRoomID, const ZegoStreamInfo *pStreamInfo, unsigned int streamCount, int sendSeq)
Definition: LiveRoomCallback.h:199
virtual void OnInitSDK(int nError)
Definition: LiveRoomCallback.h:25
virtual void OnStreamExtraInfoUpdated(ZegoStreamInfo *pStreamInfo, unsigned int streamCount, const char *pszRoomID)=0
virtual void OnReconnect(int errorCode, const char *pszRoomID)
Definition: LiveRoomCallback.h:101
virtual void OnRoomInfoUpdated(const ZegoRoomInfo &info, const char *pszRoomID)
Definition: LiveRoomCallback.h:157
virtual void OnTempBroken(int errorCode, const char *pszRoomID)
Definition: LiveRoomCallback.h:110
virtual void OnKickOut(int reason, const char *pszRoomID, const char *pszCustomReason="")=0
virtual void OnVideoBackendTypeChanged(AV::ZegoVideoBackendType type)
Definition: LiveRoomCallback.h:50
virtual void OnLogoutRoom(int errorCode, const char *pszRoomID)
Definition: LiveRoomCallback.h:68
virtual void OnTokenWillExpired(const char *pszRoomID, int remainTimeInSecond)
Definition: LiveRoomCallback.h:188
virtual void OnRecvCustomCommand(const char *pszUserId, const char *pszUserName, const char *pszContent, const char *pszRoomID)=0
virtual void OnLoginRoom(int errorCode, const char *pszRoomID, const ZegoStreamInfo *pStreamInfo, unsigned int streamCount)=0
virtual void OnDisconnect(int errorCode, const char *pszRoomID)=0
virtual void OnRtcStats(const AV::RtcStatsInfo &info)
Definition: LiveRoomCallback.h:180
virtual void OnFatalError(int error)
Definition: LiveRoomCallback.h:30
ZegoVideoBackendType
视频后端类型
Definition: zego-api-defines.h:1786
ZegoStreamUpdateType
Definition: RoomDefines.h:45
Definition: AVDefines.h:17
Definition: zego-api-defines.h:1902
Definition: RoomDefines.h:159
Definition: RoomDefines.h:64