NERtc Windows SDK  V4.6.20
nertc_engine_event_handler.h
浏览该文件的文档.
1 
8 #ifndef NERTC_ENGINE_EVENT_HANDLER_H
9 #define NERTC_ENGINE_EVENT_HANDLER_H
10 
11 #include "nertc_base_types.h"
12 #include "nertc_error_code.h"
13 #include "nertc_warn_code.h"
14 #include "nertc_engine_defines.h"
15 
20 namespace nertc
21 {
33 {
34 public:
35  virtual ~IRtcEngineEventHandler() {}
36 
51  virtual void onError(int error_code, const char* msg) {
52  (void)error_code;
53  (void)msg;
54  }
55 
70  virtual void onWarning(int warn_code, const char* msg) {
71  (void)warn_code;
72  (void)msg;
73  }
74 
87  virtual void onReleasedHwResources(NERtcErrorCode result) {
88  (void)result;
89  }
90 
107  virtual void onJoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed) {
108  (void)cid;
109  (void)uid;
110  (void)result;
111  (void)elapsed;
112  }
113 
128  virtual void onReconnectingStart(channel_id_t cid, uid_t uid) {
129  (void)cid;
130  (void)uid;
131  }
132 
148  (void)state;
149  (void)reason;
150  }
151 
170  virtual void onRejoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed) {
171  (void)cid;
172  (void)uid;
173  (void)result;
174  }
175 
188  virtual void onLeaveChannel(NERtcErrorCode result) {
189  (void)result;
190  }
191 
208  virtual void onDisconnect(NERtcErrorCode reason) {
209  (void)reason;
210  }
211 
232  virtual void onClientRoleChanged(NERtcClientRole oldRole, NERtcClientRole newRole) {
233  (void)oldRole;
234  (void)newRole;
235  }
236 
261  virtual void onUserJoined(uid_t uid, const char * user_name) {
262  (void)uid;
263  (void)user_name;
264  }
265 
289  virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason) {
290  (void)uid;
291  (void)reason;
292  }
304  virtual void onUserAudioStart(uid_t uid) {
305  (void)uid;
306  }
318  virtual void onUserAudioStop(uid_t uid) {
319  (void)uid;
320  }
334  virtual void onUserVideoStart(uid_t uid, NERtcVideoProfileType max_profile) {
335  (void)uid;
336  (void)max_profile;
337  }
349  virtual void onUserVideoStop(uid_t uid) {
350  (void)uid;
351  }
352 
353 };
354 } // namespace nertc
355 
356 #endif
Definition: nertc_engine_event_handler.h:33
virtual void onUserVideoStart(uid_t uid, NERtcVideoProfileType max_profile)
Definition: nertc_engine_event_handler.h:334
virtual void onJoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed)
Definition: nertc_engine_event_handler.h:107
virtual void onUserAudioStart(uid_t uid)
Definition: nertc_engine_event_handler.h:304
virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason)
Definition: nertc_engine_event_handler.h:289
virtual void onClientRoleChanged(NERtcClientRole oldRole, NERtcClientRole newRole)
Definition: nertc_engine_event_handler.h:232
virtual void onWarning(int warn_code, const char *msg)
Definition: nertc_engine_event_handler.h:70
virtual void onUserJoined(uid_t uid, const char *user_name)
Definition: nertc_engine_event_handler.h:261
virtual void onReleasedHwResources(NERtcErrorCode result)
Definition: nertc_engine_event_handler.h:87
virtual void onRejoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed)
Definition: nertc_engine_event_handler.h:170
virtual void onUserAudioStop(uid_t uid)
Definition: nertc_engine_event_handler.h:318
virtual void onError(int error_code, const char *msg)
Definition: nertc_engine_event_handler.h:51
virtual void onUserVideoStop(uid_t uid)
Definition: nertc_engine_event_handler.h:349
virtual void onLeaveChannel(NERtcErrorCode result)
Definition: nertc_engine_event_handler.h:188
virtual void onConnectionStateChange(NERtcConnectionStateType state, NERtcReasonConnectionChangedType reason)
Definition: nertc_engine_event_handler.h:147
virtual void onReconnectingStart(channel_id_t cid, uid_t uid)
Definition: nertc_engine_event_handler.h:128
virtual void onDisconnect(NERtcErrorCode reason)
Definition: nertc_engine_event_handler.h:208
namespace nertc
NERtcClientRole
Definition: nertc_engine_defines.h:207
NERtcReasonConnectionChangedType
Definition: nertc_engine_defines.h:2235
NERtcSessionLeaveReason
Definition: nertc_engine_defines.h:4815
NERtcConnectionStateType
Definition: nertc_engine_defines.h:2168
uint64_t uid_t
Definition: nertc_engine_defines.h:146
NERtcVideoProfileType
Definition: nertc_engine_defines.h:1594
uint64_t channel_id_t
Definition: nertc_engine_defines.h:155
NERtcErrorCode
Definition: nertc_error_code.h:26
NERtc SDK definitions.
The definition of error codes of NERtc SDK.
The definition of error codes of NERtc SDK.