NERtc Windows SDK
nertc_engine_event_handler.h
浏览该文件的文档.
1 
7 #ifndef NERTC_ENGINE_EVENT_HANDLER_H
8 #define NERTC_ENGINE_EVENT_HANDLER_H
9 
10 #include "nertc_base_types.h"
11 #include "nertc_error_code.h"
12 #include "nertc_warn_code.h"
13 #include "nertc_engine_defines.h"
14 
19 namespace nertc
20 {
26 {
27 public:
28  virtual ~IRtcEngineEventHandler() {}
29 
37  virtual void onError(int error_code, const char* msg) {
38  (void)error_code;
39  (void)msg;
40  }
41 
49  virtual void onWarning(int warn_code, const char* msg) {
50  (void)warn_code;
51  (void)msg;
52  }
53 
60  virtual void onReleasedHwResources(NERtcErrorCode result) {
61  (void)result;
62  }
63 
72  virtual void onJoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed) {
73  (void)cid;
74  (void)uid;
75  (void)result;
76  (void)elapsed;
77  }
78 
86  virtual void onReconnectingStart(channel_id_t cid, uid_t uid) {
87  (void)cid;
88  (void)uid;
89  }
90 
99  (void)state;
100  (void)reason;
101  }
102 
112  virtual void onRejoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed) {
113  (void)cid;
114  (void)uid;
115  (void)result;
116  }
117 
124  virtual void onLeaveChannel(NERtcErrorCode result) {
125  (void)result;
126  }
127 
136  virtual void onDisconnect(NERtcErrorCode reason) {
137  (void)reason;
138  }
139 
151  virtual void onClientRoleChanged(NERtcClientRole oldRole, NERtcClientRole newRole) {
152  (void)oldRole;
153  (void)newRole;
154  }
155 
163  virtual void onUserJoined(uid_t uid, const char * user_name) {
164  (void)uid;
165  (void)user_name;
166  }
167 
177  virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason) {
178  (void)uid;
179  (void)reason;
180  }
185  virtual void onUserAudioStart(uid_t uid) {
186  (void)uid;
187  }
192  virtual void onUserAudioStop(uid_t uid) {
193  (void)uid;
194  }
200  virtual void onUserVideoStart(uid_t uid, NERtcVideoProfileType max_profile) {
201  (void)uid;
202  (void)max_profile;
203  }
208  virtual void onUserVideoStop(uid_t uid) {
209  (void)uid;
210  }
211 };
212 } //namespace nertc
213 
214 #endif
Definition: nertc_engine_event_handler.h:26
virtual void onUserVideoStart(uid_t uid, NERtcVideoProfileType max_profile)
Definition: nertc_engine_event_handler.h:200
virtual void onJoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed)
Definition: nertc_engine_event_handler.h:72
virtual void onUserAudioStart(uid_t uid)
Definition: nertc_engine_event_handler.h:185
virtual void onUserLeft(uid_t uid, NERtcSessionLeaveReason reason)
Definition: nertc_engine_event_handler.h:177
virtual void onClientRoleChanged(NERtcClientRole oldRole, NERtcClientRole newRole)
Definition: nertc_engine_event_handler.h:151
virtual void onWarning(int warn_code, const char *msg)
Definition: nertc_engine_event_handler.h:49
virtual void onUserJoined(uid_t uid, const char *user_name)
Definition: nertc_engine_event_handler.h:163
virtual void onReleasedHwResources(NERtcErrorCode result)
Definition: nertc_engine_event_handler.h:60
virtual void onRejoinChannel(channel_id_t cid, uid_t uid, NERtcErrorCode result, uint64_t elapsed)
Definition: nertc_engine_event_handler.h:112
virtual void onUserAudioStop(uid_t uid)
Definition: nertc_engine_event_handler.h:192
virtual void onError(int error_code, const char *msg)
Definition: nertc_engine_event_handler.h:37
virtual void onUserVideoStop(uid_t uid)
Definition: nertc_engine_event_handler.h:208
virtual void onLeaveChannel(NERtcErrorCode result)
Definition: nertc_engine_event_handler.h:124
virtual void onConnectionStateChange(NERtcConnectionStateType state, NERtcReasonConnectionChangedType reason)
Definition: nertc_engine_event_handler.h:98
virtual void onReconnectingStart(channel_id_t cid, uid_t uid)
Definition: nertc_engine_event_handler.h:86
virtual void onDisconnect(NERtcErrorCode reason)
Definition: nertc_engine_event_handler.h:136
namespace nertc
NERtcClientRole
Definition: nertc_engine_defines.h:43
NERtcReasonConnectionChangedType
Definition: nertc_engine_defines.h:546
NERtcSessionLeaveReason
Definition: nertc_engine_defines.h:1034
NERtcConnectionStateType
Definition: nertc_engine_defines.h:535
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
SDK基本类型定义
NERtc SDK的一些定义
NERtc SDK的错误码定义
NERtc SDK的警告码定义