CNLiveChatVoiceMessage.h
1.79 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
//
// CNLiveChatVoiceMessage.h
// CNLiveChatManagerSDKDemo
//
// Created by cnliveJunBo on 17/7/12.
// Copyright © 2017年 cnlive. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "CNLiveChatMessageBase.h"
@interface CNLiveChatVoiceMessage : CNLiveChatMessageBase
/*!
语音消息的本地路径
*/
@property(nonatomic, copy) NSString *path;
/*!
语音消息的时长
*/
@property(nonatomic, assign) int duration;
/**
* 语音数据大小
*/
@property(nonatomic,assign) int dataSize;
/**
* 上传时任务Id,可用来查询上传进度
*/
@property(nonatomic,assign) uint32_t taskId;
/**
* 语音消息内部ID
*/
@property(nonatomic,retain) NSString * uuid;
/**
* 消息所属用户的Id
*/
@property(nonatomic, copy) NSString *selfIdentifier;
/**
* 以下3个为语音消息内部属性,开发者不必理会
*/
@property(nonatomic,assign) int businessId;
@property(nonatomic,assign) int downloadFlag;
@property(nonatomic,strong) NSArray *soundUrls;
/**
* 查询上传进度
*/
- (uint32_t) getUploadingProgress;
/**
* 获取语音数据到指定路径的文件中
*
* @param path 语音保存路径
* @param succ 成功回调
* @param fail 失败回调,返回错误码和错误描述
*/
- (void)getSound:(NSString*)path succ:(CNLiveIMSucc)succ fail:(CNLiveIMFail)fail;
/**
* 设置消息是否已读,默认为0
*
* @param param 设置参数
*
* @return TRUE 设置成功
*/
- (BOOL)setCustomInt:(int32_t)param;
/**
* 获取CustomInt
*
* @return CustomInt
*/
- (int32_t)customInt;
/*!
初始化语音消息
@param path 语音消息的本地路径
@param duration 语音消息的时长(单位:秒)
@return 语音消息对象
*/
+ (instancetype)messageWithPath:(NSString *)path duration:(int)duration;
@end