NERtc Linux SDK  V5.4.10
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 
91  virtual void onApiCallExecuted(const char* api_name, NERtcErrorCode error, const char* message) {
92  (void)api_name;
93  (void)error;
94  (void)message;
95  }
96 
109  virtual void onReleasedHwResources(NERtcErrorCode result) {
110  (void)result;
111  }
112 
129  virtual void onJoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed) {
130  (void)cid;
131  (void)uid;
132  (void)result;
133  (void)elapsed;
134  }
135 
150  virtual void onReconnectingStart(channel_id_t cid, uid_t uid) {
151  (void)cid;
152  (void)uid;
153  }
154 
170  (void)state;
171  (void)reason;
172  }
173 
192  virtual void onRejoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed) {
193  (void)cid;
194  (void)uid;
195  (void)result;
196  }
197 
210  virtual void onLeaveChannel(NERtcErrorCode result) {
211  (void)result;
212  }
213 
230  virtual void onDisconnect(NERtcErrorCode reason) {
231  (void)reason;
232  }
233 
254  virtual void onClientRoleChanged(NERtcClientRole oldRole, NERtcClientRole newRole) {
255  (void)oldRole;
256  (void)newRole;
257  }
258 
283  virtual void onUserJoined(uid_t uid, const char * user_name) {
284  (void)uid;
285  (void)user_name;
286  }
287 
329  virtual void onUserJoined(uid_t uid, const char* user_name, NERtcUserJoinExtraInfo join_extra_info) {
330  (void)uid;
331  (void)user_name;
332  (void)join_extra_info;
333  }
334 
358  virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason) {
359  (void)uid;
360  (void)reason;
361  }
362 
409  virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason, NERtcUserJoinExtraInfo leave_extra_info) {
410  (void)uid;
411  (void)reason;
412  (void)leave_extra_info;
413  }
414 
426  virtual void onUserAudioStart(uid_t uid) {
427  (void)uid;
428  }
440  virtual void onUserAudioStop(uid_t uid) {
441  (void)uid;
442  }
456  virtual void onUserVideoStart(uid_t uid, NERtcVideoProfileType max_profile) {
457  (void)uid;
458  (void)max_profile;
459  }
471  virtual void onUserVideoStop(uid_t uid) {
472  (void)uid;
473  }
474 
475 };
476 } // namespace nertc
477 
478 #endif
Definition: nertc_engine_event_handler.h:33
virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason, NERtcUserJoinExtraInfo leave_extra_info)
Definition: nertc_engine_event_handler.h:409
virtual void onUserVideoStart(uid_t uid, NERtcVideoProfileType max_profile)
Definition: nertc_engine_event_handler.h:456
virtual void onJoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed)
Definition: nertc_engine_event_handler.h:129
virtual void onUserJoined(uid_t uid, const char *user_name, NERtcUserJoinExtraInfo join_extra_info)
Definition: nertc_engine_event_handler.h:329
virtual void onUserAudioStart(uid_t uid)
Definition: nertc_engine_event_handler.h:426
virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason)
Definition: nertc_engine_event_handler.h:358
virtual void onApiCallExecuted(const char *api_name, NERtcErrorCode error, const char *message)
Definition: nertc_engine_event_handler.h:91
virtual void onClientRoleChanged(NERtcClientRole oldRole, NERtcClientRole newRole)
Definition: nertc_engine_event_handler.h:254
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:283
virtual void onReleasedHwResources(NERtcErrorCode result)
Definition: nertc_engine_event_handler.h:109
virtual void onRejoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed)
Definition: nertc_engine_event_handler.h:192
virtual void onUserAudioStop(uid_t uid)
Definition: nertc_engine_event_handler.h:440
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:471
virtual void onLeaveChannel(NERtcErrorCode result)
Definition: nertc_engine_event_handler.h:210
virtual void onConnectionStateChange(NERtcConnectionStateType state, NERtcReasonConnectionChangedType reason)
Definition: nertc_engine_event_handler.h:169
virtual void onReconnectingStart(channel_id_t cid, uid_t uid)
Definition: nertc_engine_event_handler.h:150
virtual void onDisconnect(NERtcErrorCode reason)
Definition: nertc_engine_event_handler.h:230
namespace nertc
NERtcClientRole
Definition: nertc_engine_defines.h:244
NERtcReasonConnectionChangedType
Definition: nertc_engine_defines.h:2272
NERtcSessionLeaveReason
Definition: nertc_engine_defines.h:5342
NERtcConnectionStateType
Definition: nertc_engine_defines.h:2205
uint64_t uid_t
Definition: nertc_engine_defines.h:183
NERtcVideoProfileType
Definition: nertc_engine_defines.h:1631
uint64_t channel_id_t
Definition: nertc_engine_defines.h:192
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.
Definition: nertc_engine_defines.h:7842