NERtc Windows SDK  V4.4.301
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 {
27 {
28 public:
29  virtual ~IRtcEngineEventHandler() {}
30 
38  virtual void onError(int error_code, const char* msg) {
39  (void)error_code;
40  (void)msg;
41  }
42 
50  virtual void onWarning(int warn_code, const char* msg) {
51  (void)warn_code;
52  (void)msg;
53  }
54 
61  virtual void onReleasedHwResources(NERtcErrorCode result) {
62  (void)result;
63  }
64 
73  virtual void onJoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed) {
74  (void)cid;
75  (void)uid;
76  (void)result;
77  (void)elapsed;
78  }
79 
87  virtual void onReconnectingStart(channel_id_t cid, uid_t uid) {
88  (void)cid;
89  (void)uid;
90  }
91 
100  (void)state;
101  (void)reason;
102  }
103 
113  virtual void onRejoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed) {
114  (void)cid;
115  (void)uid;
116  (void)result;
117  }
118 
125  virtual void onLeaveChannel(NERtcErrorCode result) {
126  (void)result;
127  }
128 
137  virtual void onDisconnect(NERtcErrorCode reason) {
138  (void)reason;
139  }
140 
152  virtual void onClientRoleChanged(NERtcClientRole oldRole, NERtcClientRole newRole) {
153  (void)oldRole;
154  (void)newRole;
155  }
156 
164  virtual void onUserJoined(uid_t uid, const char * user_name) {
165  (void)uid;
166  (void)user_name;
167  }
168 
178  virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason) {
179  (void)uid;
180  (void)reason;
181  }
186  virtual void onUserAudioStart(uid_t uid) {
187  (void)uid;
188  }
193  virtual void onUserAudioStop(uid_t uid) {
194  (void)uid;
195  }
201  virtual void onUserVideoStart(uid_t uid, NERtcVideoProfileType max_profile) {
202  (void)uid;
203  (void)max_profile;
204  }
209  virtual void onUserVideoStop(uid_t uid) {
210  (void)uid;
211  }
212 };
213 } //namespace nertc
214 
215 #endif
Definition: nertc_engine_event_handler.h:27
virtual void onUserVideoStart(uid_t uid, NERtcVideoProfileType max_profile)
Definition: nertc_engine_event_handler.h:201
virtual void onJoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed)
Definition: nertc_engine_event_handler.h:73
virtual void onUserAudioStart(uid_t uid)
Definition: nertc_engine_event_handler.h:186
virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason)
Definition: nertc_engine_event_handler.h:178
virtual void onClientRoleChanged(NERtcClientRole oldRole, NERtcClientRole newRole)
Definition: nertc_engine_event_handler.h:152
virtual void onWarning(int warn_code, const char *msg)
Definition: nertc_engine_event_handler.h:50
virtual void onUserJoined(uid_t uid, const char *user_name)
Definition: nertc_engine_event_handler.h:164
virtual void onReleasedHwResources(NERtcErrorCode result)
Definition: nertc_engine_event_handler.h:61
virtual void onRejoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed)
Definition: nertc_engine_event_handler.h:113
virtual void onUserAudioStop(uid_t uid)
Definition: nertc_engine_event_handler.h:193
virtual void onError(int error_code, const char *msg)
Definition: nertc_engine_event_handler.h:38
virtual void onUserVideoStop(uid_t uid)
Definition: nertc_engine_event_handler.h:209
virtual void onLeaveChannel(NERtcErrorCode result)
Definition: nertc_engine_event_handler.h:125
virtual void onConnectionStateChange(NERtcConnectionStateType state, NERtcReasonConnectionChangedType reason)
Definition: nertc_engine_event_handler.h:99
virtual void onReconnectingStart(channel_id_t cid, uid_t uid)
Definition: nertc_engine_event_handler.h:87
virtual void onDisconnect(NERtcErrorCode reason)
Definition: nertc_engine_event_handler.h:137
namespace nertc
NERtcClientRole
Definition: nertc_engine_defines.h:43
NERtcReasonConnectionChangedType
Definition: nertc_engine_defines.h:545
NERtcSessionLeaveReason
Definition: nertc_engine_defines.h:1041
NERtcConnectionStateType
Definition: nertc_engine_defines.h:534
uint64_t uid_t
Definition: nertc_engine_defines.h:31
NERtcVideoProfileType
Definition: nertc_engine_defines.h:400
uint64_t channel_id_t
Definition: nertc_engine_defines.h:32
NERtcErrorCode
Definition: nertc_error_code.h:20
NERtc SDK definitions.
The definition of error codes of NERtc SDK.
The definition of error codes of NERtc SDK.