//
//  TrroOptions.h
//  TrroIOS
//
//  Created by Robin on 2024/9/18.
//

#import <Foundation/Foundation.h>
#import <TRROControl/TrroRemoteDef.h>

NS_ASSUME_NONNULL_BEGIN

@interface TrroOptions : NSObject
/// 设备id，用于注册到服务器的唯一编码
@property (nonatomic, copy) NSString *deviceId;
/// 设备名称，用于辨识设备信息
@property (nonatomic, copy) NSString *deviceName;
/// 云模式：public、private
@property (nonatomic, copy) NSString *cloudMode;
/// 工程id
@property (nonatomic, copy) NSString *projectId;
/// 密码
@property (nonatomic, copy) NSString *password;
/// 是否开启日志
@property (nonatomic, assign) TrroLogEnable logEnable;
/// 设备连接的最大流数目，默认8
@property (nonatomic, assign) int maxStreams;
/// 私有云ip地址
@property (nonatomic, strong) NSString *serverIp;
/// 私有云port
@property (nonatomic, strong) NSNumber *serverPort;
/// 私有云rtc服务器地址
@property (nonatomic, strong) NSString *rtcServerIp;
/// 私有云rtc port
@property (nonatomic, strong) NSNumber *rtcServerPort;
/// 私有云属性
@property (nonatomic, strong) NSNumber *deviceStreams;
/// 是否采集音频
@property (nonatomic, assign) int audioEnable;
/// 是否自定义音频输入
@property (nonatomic, assign) int audioExternal;
/// 是否接收音频
@property (nonatomic, assign) int audioReceive;
/// 强制登录
@property (nonatomic, assign) int forceLogin;
/// 日志输出
@property (nonatomic, copy) NSString *outputPath;
@property (nonatomic, copy) NSString *audioPlay;
@property (nonatomic, copy) NSString *filePath;


- (instancetype)init NS_UNAVAILABLE;
+ (instancetype)new NS_UNAVAILABLE;


/// 公有云配置创建
/// - Parameters:
///   - deviceId: 设备id，用于注册到服务器的唯一编码
///   - projectId: 工程id
///   - password: 密码
///   - deviceName: 设备名称，用于辨识设备信息
///   - maxStreams: 设备连接的最大流数目
///   - audioReceive: 是否接收音频
///   - audioExternal: 是否自定义音频输入
///   - logEnable: 是否开启日志
///   - logOutputPath: 日志输出路径，默认路径：document/com.tencent.trro/
+ (instancetype)publicModeWithDeviceId:(NSString *)deviceId
                             projectId:(NSString *)projectId
                              password:(NSString *)password
                            deviceName:(NSString *)deviceName
                            maxStreams:(int)maxStreams
                          audioReceive:(BOOL)audioReceive
                           audioEnable:(BOOL)audioEnable
                         audioExternal:(BOOL)audioExternal
                             logEnable:(TrroLogEnable)logEnable
                         logOutputPath:(nullable NSString *)logOutputPath
                             audioPlay:(NSString *)audioPlay
                              filePath:(NSString *)filePath
                            forceLogin:(BOOL)forceLogin;


/// 私有云配置创建
/// - Parameters:
///   - deviceId: 设备id，用于注册到服务器的唯一编码
///   - deviceStreams: 设备流数
///   - deviceName: 设备名称，用于辨识设备信息
///   - serverIp: 私有云ip地址
///   - serverPort: 私有云port
///   - rtcServerIp: 私有云rtc服务器地址
///   - rtcServerPort: 私有云rtc port
///   - audioReceive: 是否接收音频
///   - audioExternal: 是否自定义音频输入
///   - logEnable: 是否开启日志
///   - logOutputPath: 日志输出路径，默认路径：document//com.tencent.trro/
+ (instancetype)privateModeWithDeviceId:(NSString *)deviceId
                          deviceStreams:(int)deviceStreams
                             deviceName:(NSString *)deviceName
                               serverIp:(NSString *)serverIp
                             serverPort:(int)serverPort
                            rtcServerIp:(NSString *)rtcServerIp
                          rtcServerPort:(int)rtcServerPort
                           audioReceive:(BOOL)audioReceive
                            audioEnable:(BOOL)audioEnable
                          audioExternal:(BOOL)audioExternal
                              logEnable:(TrroLogEnable)logEnable
                          logOutputPath:(nullable NSString *)logOutputPath
                              audioPlay:(NSString *)audioPlay
                               filePath:(NSString *)filePath
                             forceLogin:(BOOL)forceLogin;

/// 设置扩展属性
/// - Parameters:
///   - value: 属性值
///   - key: 属性键
- (void)putValue:(id)value forKey:(NSString *)key;

@end

NS_ASSUME_NONNULL_END
