Agora RTC Objective-C API Reference Refactor

AgoraBaseDelegate.h
Go to the documentation of this file.
1 //
2 // AgoraRtcEngineKit.h
3 // AgoraRtcEngineKit
4 //
5 // Created by Sting Feng on 2015-8-11.
6 // Copyright (c) 2015 Agora. All rights reserved.
7 //
8
9 @class AgoraRtcEngineKit;
10 #import "AgoraObjects.h"
11
12 @protocol AgoraBaseDelegate <NSObject>
13 @optional
14 #pragma mark SDK common delegates
15
16 #pragma mark String UID
17
23 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine didLocalUserRegisteredWithUserId:(NSUInteger)uid userAccount:(NSString * _Nonnull)userAccount NS_SWIFT_NAME(rtcEngine(_:didLocalUserRegisteredWithUserId:userAccount:));
24
33 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine didUserInfoUpdatedWithUserId:(NSUInteger)uid userInfo:(AgoraUserInfo* _Nonnull)userInfo NS_SWIFT_NAME(rtcEngine(_:didUserInfoUpdatedWithUserId:userInfo:));
34
41 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine didOccurError:(AgoraErrorCode)errorCode NS_SWIFT_NAME(rtcEngine(_:didOccurError:));
42
48 - (void)rtcEngineMediaEngineDidLoaded:(AgoraRtcEngineKit * _Nonnull)engine NS_SWIFT_NAME(rtcEngineMediaEngineDidLoaded(_:));
49
55 - (void)rtcEngineMediaEngineDidStartCall:(AgoraRtcEngineKit * _Nonnull)engine NS_SWIFT_NAME(rtcEngineMediaEngineDidStartCall(_:));
56
64 - (void)rtcEngineRequestToken:(AgoraRtcEngineKit * _Nonnull)engine NS_SWIFT_NAME(rtcEngineRequestToken(_:));
65
72 - (void)rtcEngineConnectionDidInterrupted:(AgoraRtcEngineKit * _Nonnull)engine NS_SWIFT_NAME(rtcEngineConnectionDidInterrupted(_:));
73
80 - (void)rtcEngineConnectionDidLost:(AgoraRtcEngineKit * _Nonnull)engine NS_SWIFT_NAME(rtcEngineConnectionDidLost(_:));
81
86 - (void)rtcEngineConnectionDidBanned:(AgoraRtcEngineKit * _Nonnull)engine NS_SWIFT_NAME(rtcEngineConnectionDidBanned(_:));
87
94 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine reportRtcStats:(AgoraChannelStats * _Nonnull)stats NS_SWIFT_NAME(rtcEngine(_:reportRtcStats:));
95
102 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine lastmileQuality:(AgoraNetworkQuality)quality NS_SWIFT_NAME(rtcEngine(_:lastmileQuality:));
103
112 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine lastmileProbeTestResult:(AgoraLastmileProbeResult * _Nonnull)result NS_SWIFT_NAME(rtcEngine(_:lastmileProbeTest:));
113
114
115 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
116
124 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine device:(NSString * _Nonnull)deviceId type:(AgoraMediaDeviceType)deviceType stateChanged:(NSInteger)state NS_SWIFT_NAME(rtcEngine(_:device:type:stateChanged:));
125
126 #endif
127
133 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine didOccurEncryptionError:(AgoraEncryptionErrorType)errorType NS_SWIFT_NAME(rtcEngine(_:didOccur:));
140 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine uploadLogResultRequestId:(NSString * _Nonnull)requestId success:(BOOL)success reason:(AgoraUploadErrorReason)reason NS_SWIFT_NAME(rtcEngine(_:uploadLogResultRequestId:success:reason:));
141
142 #pragma mark Local user common delegates
143
152 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine didClientRoleChanged:(AgoraClientRole)oldRole newRole:(AgoraClientRole)newRole newRoleOptions:(AgoraClientRoleOptions * _Nullable)newRoleOptions NS_SWIFT_NAME(rtcEngine(_:didClientRoleChanged:newRole:newRoleOptions:));
153
161 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine didClientRoleChangeFailed:(AgoraClientRoleChangeFailedReason)reason currentRole:(AgoraClientRole)currentRole NS_SWIFT_NAME(rtcEngine(_:didClientRoleChangeFailed:currentRole:));
162
169 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine didLeaveChannelWithStats:(AgoraChannelStats * _Nonnull)stats NS_SWIFT_NAME(rtcEngine(_:didLeaveChannelWith:));
170
171 #pragma mark Local user audio delegates
172
178 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine firstLocalAudioFramePublished:(NSInteger)elapsed NS_SWIFT_NAME(rtcEngine(_:firstLocalAudioFramePublished:));
179
187 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine localAudioStats:(AgoraRtcLocalAudioStats * _Nonnull)stats NS_SWIFT_NAME(rtcEngine(_:localAudioStats:));
188
195 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine didAudioRouteChanged:(AgoraAudioOutputRouting)routing NS_SWIFT_NAME(rtcEngine(_:didAudioRouteChanged:));
196
197 #if (!(TARGET_OS_IPHONE) && (TARGET_OS_MAC))
198
205 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine type:(AgoraMediaDeviceType)deviceType didAudioRouteChanged:(AgoraAudioOutputRouting)routing NS_SWIFT_NAME(rtcEngine(_:type:didAudioRouteChanged:));
206
207 #endif
208
214 - (void)rtcEngineLocalAudioMixingDidFinish:(AgoraRtcEngineKit * _Nonnull)engine NS_SWIFT_NAME(rtcEngineLocalAudioMixingDidFinish(_:));
215
222 - (void)rtcEngine:(AgoraRtcEngineKit *_Nonnull)engine audioMixingStateChanged:(AgoraAudioMixingStateType)state
223 reasonCode:(AgoraAudioMixingReasonCode)reasonCode NS_SWIFT_NAME(rtcEngine(_:audioMixingStateChanged:reasonCode:));
224
231 - (void)rtcEngine:(AgoraRtcEngineKit *_Nonnull)engine audioMixingPositionChanged:(NSInteger)position NS_SWIFT_NAME(rtcEngine(_:audioMixingPositionChanged:));
232
238 - (void)rtcEngineDidAudioEffectFinish:(AgoraRtcEngineKit * _Nonnull)engine soundId:(int)soundId NS_SWIFT_NAME(rtcEngineDidAudioEffectFinish(_:soundId:));
239
240
241 #pragma mark Local user video delegates
242
247 - (void)rtcEngineCameraDidReady:(AgoraRtcEngineKit * _Nonnull)engine NS_SWIFT_NAME(rtcEngineCameraDidReady(_:));
248
249 #if TARGET_OS_IPHONE
250
256 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine cameraFocusDidChangedToRect:(CGRect)rect NS_SWIFT_NAME(rtcEngine(_:cameraFocusDidChangedTo:));
257
263 - (void)rtcEngine:(AgoraRtcEngineKit* _Nonnull)engine cameraExposureDidChangedToRect:(CGRect)rect NS_SWIFT_NAME(rtcEngine(_:cameraExposureDidChangedTo:));
264
265 #endif
266
272 - (void)rtcEngineVideoDidStop:(AgoraRtcEngineKit * _Nonnull)engine NS_SWIFT_NAME(rtcEngineVideoDidStop(_:));
273
279 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine firstLocalVideoFramePublishedWithElapsed:(NSInteger)elapsed
280 sourceType:(AgoraVideoSourceType)source NS_SWIFT_NAME(rtcEngine(_:firstLocalVideoFramePublishedWithElapsed:sourceType:));
281
289 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine firstLocalVideoFrameWithSize:(CGSize)size elapsed:(NSInteger)elapsed sourceType:(AgoraVideoSourceType)source NS_SWIFT_NAME(rtcEngine(_:firstLocalVideoFrameWith:elapsed:sourceType:));
290
297 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine localVideoStats:(AgoraRtcLocalVideoStats * _Nonnull)stats
298 sourceType:(AgoraVideoSourceType)source NS_SWIFT_NAME(rtcEngine(_:localVideoStats:sourceType:));
299
300 #pragma mark Remote user audio delegates
301
309 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine reportAudioVolumeIndicationOfSpeakers:(NSArray<AgoraRtcAudioVolumeInfo *> * _Nonnull)speakers totalVolume:(NSInteger)totalVolume NS_SWIFT_NAME(rtcEngine(_:reportAudioVolumeIndicationOfSpeakers:totalVolume:));
310
316 - (void)rtcEngineRemoteAudioMixingDidStart:(AgoraRtcEngineKit * _Nonnull)engine NS_SWIFT_NAME(rtcEngineRemoteAudioMixingDidStart(_:));
317
323 - (void)rtcEngineRemoteAudioMixingDidFinish:(AgoraRtcEngineKit * _Nonnull)engine NS_SWIFT_NAME(rtcEngineRemoteAudioMixingDidFinish(_:));
324
331 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine remoteAudioStats:(AgoraRtcRemoteAudioStats * _Nonnull)stats NS_SWIFT_NAME(rtcEngine(_:remoteAudioStats:));
332
333 #pragma mark Remote user video delegates
334
341 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine remoteVideoStats:(AgoraRtcRemoteVideoStats * _Nonnull)stats NS_SWIFT_NAME(rtcEngine(_:remoteVideoStats:));
342
343 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine rtmpStreamingChangedToState:(NSString * _Nonnull)url
344 state:(AgoraRtmpStreamingState)state
345 errCode:(AgoraRtmpStreamingErrorCode)errCode NS_SWIFT_NAME(rtcEngine(_:rtmpStreamingChangedToState:state:errCode:));
346
347 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine rtmpStreamingEventWithUrl:(NSString* _Nonnull)url eventCode:(AgoraRtmpStreamingEvent)eventCode NS_SWIFT_NAME(rtcEngine(_:rtmpStreamingEventWithUrl:eventCode:));
348
349 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine streamPublishedWithUrl:(NSString * _Nonnull)url errorCode:(AgoraErrorCode)errorCode NS_SWIFT_NAME(rtcEngine(_:streamPublishedWithUrl:errorCode:));
350
351 - (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine streamUnpublishedWithUrl:(NSString * _Nonnull)url NS_SWIFT_NAME(rtcEngine(_:streamUnpublishedWithUrl:));
352
353 - (void)rtcEngineTranscodingUpdated:(AgoraRtcEngineKit * _Nonnull)engine NS_SWIFT_NAME(rtcEngineTranscodingUpdated(_:));
354
355 #pragma mark Face Detection Delegate Methods
356
383 - (void)rtcEngine:(AgoraRtcEngineKit* _Nonnull)engine facePositionDidChangeWidth:(int)width previewHeight:(int)height faces:(NSArray<AgoraFacePositionInfo*>* _Nullable)faces NS_SWIFT_NAME(rtcEngine(_:facePositionDidChangeWidth:previewHeight:faces:));
384
385 @end
386
387 /*
388
389 - (int)joinChannelByToken:(NSString * _Nullable)token
390 channelId:(NSString * _Nonnull)channelId
391 info:(NSString * _Nullable)info
392 userId:(NSString * _Nullable)userId NS_SWIFT_NAME(joinChannel(byToken:channelId:info:userId:));
393
394 - (int)setRemoteRenderModeWithUid:(NSString * _Nonnull)userId
395 mode:(AgoraVideoRenderMode)mode NS_SWIFT_NAME(setRemoteRenderModeWithUid(_:mode:));
396
397 - (int)switchView:(NSString * _Nonnull)userId1
398 andAnother:(NSString * _Nonnull)userId2 NS_SWIFT_NAME(switchView(_:andAnother:)) __deprecated;
399
400 - (int)muteRemoteAudioStream:(NSString * _Nonnull)userId mute:(BOOL)mute NS_SWIFT_NAME(muteRemoteAudioStream(_:mute:));
401
402 - (int)setRemoteVideoStream:(NSString * _Nonnull)userId
403 type:(AgoraVideoStreamType)streamType NS_SWIFT_NAME(setRemoteVideoStream(_:type:));
404 - (int)muteRemoteVideoStream:(NSString * _Nonnull)userId
405 mute:(BOOL)mute NS_SWIFT_NAME(muteRemoteVideoStream(_:mute:));
406
407 - (void)setRemoteVideoRenderer:(id<AgoraVideoSinkProtocol> _Nullable)videoRenderer withUserId:(NSString * _Nonnull)userId NS_SWIFT_NAME(setRemoteVideoRenderer(_:withUserId:));
408
409 - (int)sendPublishingRequestToOwner:(NSString * _Nonnull)userId NS_SWIFT_NAME(sendPublishingRequestToOwner(_:));
410 - (int)answerPublishingRequestOfUid:(NSString * _Nonnull)userId accepted:(bool)accepted NS_SWIFT_NAME(answerPublishingRequestOfUid(_:accepted:));
411 - (int)sendUnpublishingRequestToUid:(NSString * _Nonnull)userId NS_SWIFT_NAME(sendUnpublishingRequestToUid(_:));
412
413 - (id<AgoraVideoSinkProtocol> _Nullable)remoteVideoRendererOfUserId:(NSString * _Nonnull)userId NS_SWIFT_NAME(remoteVideoRendererOfUserId(_:));
414 */
AgoraRtcEngineKit
Definition: AgoraRtcEngineKit.h:1813
AgoraFacePositionInfo
Definition: AgoraObjects.h:3088
AgoraRtmpStreamingErrorCode
AgoraRtmpStreamingErrorCode
Definition: AgoraEnumerates.h:2286
AgoraBaseDelegate-p
Definition: AgoraBaseDelegate.h:12
AgoraClientRole
AgoraClientRole
Definition: AgoraEnumerates.h:521
AgoraRtmpStreamingEvent
AgoraRtmpStreamingEvent
Definition: AgoraEnumerates.h:2329
AgoraClientRoleChangeFailedReason
AgoraClientRoleChangeFailedReason
Definition: AgoraEnumerates.h:2113
AgoraRtcRemoteVideoStats
Definition: AgoraObjects.h:783
AgoraVideoSourceType
AgoraVideoSourceType
Definition: AgoraEnumerates.h:2634
AgoraRtcRemoteAudioStats
Definition: AgoraObjects.h:893
AgoraUserInfo
Definition: AgoraObjects.h:2208
AgoraRtcAudioVolumeInfo
Definition: AgoraObjects.h:1000
AgoraObjects.h
AgoraRtmpStreamingState
AgoraRtmpStreamingState
Definition: AgoraEnumerates.h:2268
AgoraEncryptionErrorType
AgoraEncryptionErrorType
Definition: AgoraEnumerates.h:2349
AgoraClientRoleOptions
Definition: AgoraObjects.h:2221
AgoraUploadErrorReason
AgoraUploadErrorReason
Definition: AgoraEnumerates.h:800
AgoraNetworkQuality
AgoraNetworkQuality
Definition: AgoraEnumerates.h:728
AgoraRtcLocalAudioStats
Definition: AgoraObjects.h:864
AgoraLastmileProbeResult
Definition: AgoraObjects.h:657
AgoraChannelStats
Definition: AgoraObjects.h:1019