//
//  RTCXDataChannelProtocol.h
//  RTCXMedia
//
//  Created by Apple on 2025/9/16.
//

#import <Foundation/Foundation.h>
#import <RTCXMedia/RTCXDataChannelModel.h>
NS_ASSUME_NONNULL_BEGIN

typedef void (^RTCXDCOnSuccess)(id _Nullable data, NSData *_Nullable binaryData, id _Nullable rawData);
typedef void (^RTCXCDCOnError)(NSError * _Nullable error);
typedef void (^RTCXCDCCallback)(NSError *error);

@protocol RTCXDataChannelProtocol <NSObject>
/**
 *  查询SD卡事件缩略图
 *
 *  @param req        请求参数对象
 *  @param onSuccess  成功回调
 *  @param onError   失败回调
 */
- (void)querySDCardEventPicture:(RTCXDCSDCardEventPictureReq *)req onSuccess:(nullable RTCXDCOnSuccess)onSuccess onError:(nullable RTCXCDCOnError)onError;
/**
 *  发送自定义数据
 *
 *  @param req        请求参数对象
 */
- (void)sendCustomDataMessage:(RTCXDCCustomDataTransfer *)req onSuccess:(nullable RTCXDCOnSuccess)onSuccess onError:(nullable RTCXCDCOnError)onError;
@end

NS_ASSUME_NONNULL_END
