115 lines
2.1 KiB
Objective-C
115 lines
2.1 KiB
Objective-C
//
|
|
// XPFaceParser.h
|
|
// xplan-ios
|
|
//
|
|
// Created by GreenLand on 2022/1/8.
|
|
//
|
|
|
|
#import <Foundation/Foundation.h>
|
|
#import "FaceInfo.h"
|
|
#import "FaceConfigInfo.h"
|
|
#import "AttachmentModel.h"
|
|
#import "XCGameRoomFaceTitleDisplayModel.h"
|
|
|
|
NS_ASSUME_NONNULL_BEGIN
|
|
|
|
@interface XPFaceParser : NSObject
|
|
|
|
+ (instancetype)shareParser;
|
|
|
|
- (void)getFaceDataSuccess:(NSArray *)array;
|
|
|
|
@property (copy, nonatomic) NSString *version;
|
|
@property (copy, nonatomic) NSString *zipMd5;
|
|
@property (strong, nonatomic) NSURL *zipUrl;
|
|
|
|
@property (assign, nonatomic) BOOL isShowingFace;
|
|
@property (copy, nonatomic) NSString *destinationUrl;
|
|
@property (assign, nonatomic) BOOL isLoadFace;
|
|
|
|
/**
|
|
清除表情的内存缓存(收到内存警告的时候使用)
|
|
*/
|
|
- (void)cleanFaceMemoryCache;
|
|
|
|
/**
|
|
获取表情列表
|
|
|
|
@return 表情列表
|
|
*/
|
|
- (NSMutableArray *)getFaceInfosType:(RoomFaceType)faceType;
|
|
|
|
|
|
|
|
/**
|
|
是否正在播放表情
|
|
|
|
@return return value description
|
|
*/
|
|
- (BOOL)getShowingFace;
|
|
|
|
/**
|
|
通过表情ID找表情
|
|
|
|
@param faceId 表情ID
|
|
@return 表情信息
|
|
*/
|
|
- (FaceConfigInfo *)findFaceInfoById:(NSInteger)faceId;
|
|
|
|
|
|
/**
|
|
通过表情ID查到图片对象
|
|
|
|
@param faceId 表情ID
|
|
@return 表情图片对象
|
|
*/
|
|
- (UIImage *)findFaceIconImageById:(NSInteger)faceId;
|
|
|
|
|
|
/**
|
|
通过表情ID与Index找图片对象
|
|
|
|
@param faceId 表情ID
|
|
@param index 表情Index
|
|
@return 表情对象
|
|
*/
|
|
- (UIImage *)findFaceImageById:(NSInteger)faceId index:(NSInteger)index;
|
|
|
|
|
|
/**
|
|
通过表情ConfigInfo查找图片
|
|
|
|
@param configInfo 表情配置
|
|
@param index 位置pos
|
|
@return 表情图片对象
|
|
*/
|
|
- (UIImage *)findFaceImageByConfig:(FaceConfigInfo *)configInfo index:(NSInteger)index;
|
|
|
|
|
|
|
|
/**
|
|
通过Config查找图片数组
|
|
|
|
@param configInfo 表情配置
|
|
@return 表情图片对象数组
|
|
*/
|
|
- (NSMutableArray<UIImage *> *)findFaceFrameArrByConfig:(FaceConfigInfo *)configInfo;
|
|
|
|
|
|
/**
|
|
通过FaceId查找图片对象数组
|
|
|
|
@param faceId 表情ID
|
|
@return 图片对象数组
|
|
*/
|
|
- (NSMutableArray<UIImage *> *)findFaceFrameArrByFaceId:(NSInteger)faceId;
|
|
|
|
/**
|
|
测试使用接口,发送一起玩表情
|
|
*/
|
|
- (void)startFaceTimer;
|
|
- (void)cancelFaceTimer;
|
|
@end
|
|
|
|
NS_ASSUME_NONNULL_END
|