CNliveChatImageMessage.h
2.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
//
// CNliveChatImageMessage.h
// CNLiveChatManager
//
// Created by cnliveJunBo on 17/7/11.
// Copyright © 2017年 cnlive. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "CNLiveChatMessageBase.h"
/*!
图片消息类
@discussion 图片消息类
*/
@interface CNliveChatImageMessage : CNLiveChatMessageBase
/*!
图片消息的URL地址
@discussion 发送方此字段为图片的本地路径。
*/
@property(nonatomic, copy) NSString *imageUrl;
/**
* 上传时任务Id,可用来查询上传进度
*/
@property(nonatomic,assign) uint32_t taskId;
/**
* 消息所属用户的Id
*/
@property(nonatomic, copy) NSString *selfIdentifier;
/**
* 图片压缩等级,详见 CNLive_IMAGE_COMPRESS_TYPE(仅对jpg格式有效)
*/
@property(nonatomic,assign) CNLive_IMAGE_COMPRESS_TYPE level;
/**
* 图片格式,详见 CNLive_IMAGE_FORMAT
*/
@property(nonatomic,assign) CNLive_IMAGE_FORMAT format;
/**
* 查询上传进度
*/
- (uint32_t) getUploadingProgress;
/*!
返回时,图片消息的原始图片信息
*/
@property(nonatomic, copy) NSString *originalImage;
/**
* 图片ID,内部标识,可用于外部缓存key
*/
@property(nonatomic,retain) NSString * originUuid;
/**
* 图片大小
*/
@property(nonatomic,assign) int originSize;
/**
* 图片宽度
*/
@property(nonatomic,assign) int originWidth;
/**
* 图片高度
*/
@property(nonatomic,assign) int originHeight;
/*!
图片消息的缩略图
*/
@property(nonatomic, copy) NSString *thumbnailImage;
/**
* 图片ID,内部标识,可用于外部缓存key
*/
@property(nonatomic,retain) NSString * thumbUuid;
/**
* 图片大小
*/
@property(nonatomic,assign) int thumbSize;
/**
* 图片宽度
*/
@property(nonatomic,assign) int thumbWidth;
/**
* 图片高度
*/
@property(nonatomic,assign) int thumbHeight;
/**
* 获取原图图片
*
* @param path 图片保存路径
* @param succ 成功回调,返回图片数据
* @param fail 失败回调,返回错误码和错误描述
*/
- (void)getOriginImage:(NSString*)path succ:(CNLiveIMSucc)succ fail:(CNLiveIMFail)fail;
/**
* 获取缩略图图片
*
* @param path 图片保存路径
* @param succ 成功回调,返回图片数据
* @param fail 失败回调,返回错误码和错误描述
*/
- (void)getThumbImage:(NSString*)path succ:(CNLiveIMSucc)succ fail:(CNLiveIMFail)fail;
/*!
初始化图片消息
@param imageURI 图片的本地路径
@return 图片消息对象
*/
+ (instancetype)messageWithImageURI:(NSString *)imageURI;
@end