Skip to content

Commit

Permalink
Squashed 'ios/RCTAgora/Base/' changes from 4623dc3..f50424a
Browse files Browse the repository at this point in the history
f50424a style: format code
d1561f7 feat(upgrade): 3.4.1
bb84006 Merge pull request #5 from AgoraLibrary/main/3.3.+
ee40ba1 Merge pull request #4 from AgoraLibrary/dev/3.3.0

git-subtree-dir: ios/RCTAgora/Base
git-subtree-split: f50424a0d1a5fb750680e2f9b52f5e47a2c4f547
  • Loading branch information
LichKing-2234 committed May 17, 2021
1 parent b2c3ae7 commit 0fc2839
Show file tree
Hide file tree
Showing 10 changed files with 367 additions and 262 deletions.
69 changes: 40 additions & 29 deletions AgoraRtcEngineKit.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,40 +9,47 @@
#import <AgoraRtcKit/AgoraRtcEngineKit.h>

typedef NS_ENUM(NSUInteger, AgoraRtcQualityReportFormat) {
AgoraRtc_QualityReportFormat_Json = 0,
AgoraRtc_QualityReportFormat_Html = 1,
AgoraRtc_QualityReportFormat_Json = 0,
AgoraRtc_QualityReportFormat_Html = 1,
};

typedef NS_ENUM(NSUInteger, AgoraRtcAppType) {
AgoraRtc_APP_TYPE_NATIVE = 0,
AgoraRtc_APP_TYPE_COCOS = 1,
AgoraRtc_APP_TYPE_UNITY = 2,
AgoraRtc_APP_TYPE_ELECTRON = 3,
AgoraRtc_APP_TYPE_FLUTTER = 4,
AgoraRtc_APP_TYPE_UNREAL = 5,
AgoraRtc_APP_TYPE_XAMARIN = 6,
AgoraRtc_APP_TYPE_APICLOUD = 7,
AgoraRtc_APP_TYPE_REACTNATIVE = 8
AgoraRtc_APP_TYPE_NATIVE = 0,
AgoraRtc_APP_TYPE_COCOS = 1,
AgoraRtc_APP_TYPE_UNITY = 2,
AgoraRtc_APP_TYPE_ELECTRON = 3,
AgoraRtc_APP_TYPE_FLUTTER = 4,
AgoraRtc_APP_TYPE_UNREAL = 5,
AgoraRtc_APP_TYPE_XAMARIN = 6,
AgoraRtc_APP_TYPE_APICLOUD = 7,
AgoraRtc_APP_TYPE_REACTNATIVE = 8
};

@protocol AgoraRtcEngineExtensionDelegate <AgoraRtcEngineDelegate>
@optional
- (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine audioTransportQualityOfUid:(NSUInteger)uid delay:(NSUInteger)delay lost:(NSUInteger)lost;
- (void)rtcEngine:(AgoraRtcEngineKit * _Nonnull)engine videoTransportQualityOfUid:(NSUInteger)uid delay:(NSUInteger)delay lost:(NSUInteger)lost;
- (void)rtcEngine:(AgoraRtcEngineKit *_Nonnull)engine
audioTransportQualityOfUid:(NSUInteger)uid
delay:(NSUInteger)delay
lost:(NSUInteger)lost;
- (void)rtcEngine:(AgoraRtcEngineKit *_Nonnull)engine
videoTransportQualityOfUid:(NSUInteger)uid
delay:(NSUInteger)delay
lost:(NSUInteger)lost;
@end

@interface AgoraRtcEngineKit (AgoraExtension)

+ (instancetype _Nonnull)sharedEngineWithAppId:(NSString * _Nonnull)appId
extensionDelegate:(id<AgoraRtcEngineExtensionDelegate> _Nullable)delegate;
+ (instancetype _Nonnull)sharedEngineWithAppId:(NSString *_Nonnull)appId
extensionDelegate:
(id<AgoraRtcEngineExtensionDelegate> _Nullable)
delegate;

/** Sets the profile to control the RTC engine.
*
* @param profile SDK profile in JSON format.
* @param merge Whether to merge the profile data with the original value.
*/
- (int)setProfile:(NSString * _Nonnull)profile
merge:(BOOL)merge;
- (int)setProfile:(NSString *_Nonnull)profile merge:(BOOL)merge;

/** Set wrapper frame type by language wrapper.
*
Expand All @@ -54,7 +61,6 @@ typedef NS_ENUM(NSUInteger, AgoraRtcAppType) {

/** BEGIN OF AUDIO METHODS */


/**
* Enable recap
*
Expand All @@ -76,31 +82,36 @@ typedef NS_ENUM(NSUInteger, AgoraRtcAppType) {
andFrameRate:(NSInteger)frameRate
andBitrate:(NSInteger)andBitrate;

- (int)sendReportData:(NSData * _Nonnull)data
type:(NSInteger)type;
- (int)sendReportData:(NSData *_Nonnull)data type:(NSInteger)type;
/** END OF AUDIO METHODS */

/** Queries internal states
* @param parameters
* json string, array type
* @return a json string
*/
- (NSString * _Nullable)getParameters:(NSString * _Nonnull)parameters;
- (NSString *_Nullable)getParameters:(NSString *_Nonnull)parameters;

/**
* Generates a URL linking to the call quality reports. @param channel The channel name specified in the joinChannel method.
* Generates a URL linking to the call quality reports. @param channel The
channel name specified in the joinChannel method.
* @param listenerUid The uid of the listener.
* @param speakerUid The uid of the speaker.
* @param reportFormat The format of the report.
AgoraRtc_QualityReportFormat_Json (0): JSON.: Returns the quality report data in Json.
AgoraRtc_QualityReportFormat_Html (1): HTML.: Returns a report in HTML format, displayed on a web browser or WebVIEW components.
AgoraRtc_QualityReportFormat_Json (0): JSON.: Returns
the quality report data in Json. AgoraRtc_QualityReportFormat_Html (1): HTML.:
Returns a report in HTML format, displayed on a web browser or WebVIEW
components.
*
* @return 0 when executed successfully. return minus value when failed. return AgoraRtc_Error_Invalid_Argument (-2):Invalid argument. return AgoraRtc_Error_Buffer_Too_Small (-6):The buffer length is too small.
* @return 0 when executed successfully. return minus value when failed. return
AgoraRtc_Error_Invalid_Argument (-2):Invalid argument. return
AgoraRtc_Error_Buffer_Too_Small (-6):The buffer length is too small.
*/
- (NSString * _Nullable)makeQualityReportUrl:(NSString * _Nonnull) channel
listenerUid:(NSUInteger)listenerUid
speakerrUid:(NSUInteger)speakerUid
reportFormat:(AgoraRtcQualityReportFormat)reportFormat;
- (NSString *_Nullable)makeQualityReportUrl:(NSString *_Nonnull)channel
listenerUid:(NSUInteger)listenerUid
speakerrUid:(NSUInteger)speakerUid
reportFormat:
(AgoraRtcQualityReportFormat)reportFormat;

/*********************************************************
* Large group conference call (experiment) - END
Expand Down
Loading

0 comments on commit 0fc2839

Please sign in to comment.