Files
peko-ios/YuMi/Modules/YMRoom/View/SendGiftView/GiftComboTransport.h

36 lines
945 B
Objective-C

//
// GiftComboTransport.h
// YuMi
//
// Created by AI Assistant on 2024/8/18.
//
#import <Foundation/Foundation.h>
#import "GiftComboConfig.h"
@class GiftReceiveInfoModel, GiftInfoModel, UserInfoModel, XPGiftCountModel;
NS_ASSUME_NONNULL_BEGIN
typedef void(^GiftComboTransportCompletion)(BOOL success, GiftReceiveInfoModel * _Nullable receiveInfo, NSError * _Nullable error);
@interface GiftComboTransport : NSObject
// 单例方法
+ (instancetype)sharedTransport;
// 发送礼物
- (void)sendGiftWithParams:(NSDictionary * _Nonnull)params
completion:(GiftComboTransportCompletion _Nullable)completion;
// 发送NIM消息
- (void)sendNIMMessage:(NSDictionary * _Nonnull)messageData
completion:(void(^ _Nullable)(BOOL success, NSError * _Nullable error))completion;
// 错误处理
- (NSError *)createErrorWithCode:(ComboErrorCode)code message:(NSString * _Nullable)message;
@end
NS_ASSUME_NONNULL_END