JLChen
2021-05-13 7f62f2d3bf626ac55d2d2de05ca1d71eaaabef39
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
//
//  LCOpenSDK_Download.h
//  LCOpenSDK
//
//  Created by baozhiyong on 16/9/5.
//  Copyright © 2016年 lechange. All rights reserved.
//
 
#include "LCOpenSDK_DownloadListener.h"
#include <Foundation/Foundation.h>
 
@interface LCOpenSDK_Download : NSObject <LCOpenSDK_DownloadListener>
/**
 *  获取云录像下载组件单例
 *
 *  @return LCOpenSDK_Download单例指针
 */
+ (LCOpenSDK_Download*)shareMyInstance;
/**
 *  设置监听对象
 *
 *  @param listener 监听对象指针
 */
- (void)setListener:(id<LCOpenSDK_DownloadListener>)listener;
/**
 *  获取监听对象指针
 *
 *  @return 监听对象指针
 */
- (id<LCOpenSDK_DownloadListener>)getListener;
/**
 *  开始下载云录像
 *
 *  @param index     下载索引值
 *  @param filepath  下载路径
 *  @param accessTok 管理员token/用户token
 *  @param deviceID  设备ID
 *  @param recordID  录像ID
 *  @param recordRegionId  录像recordRegionId
 *  @param psk       设备密钥
 *  @param type      云录像类型;1000:报警 2000:定时
 *  @param timeout   接口调用超时时间
 *
 *  @return   0, 接口调用成功
 *           -1, 接口调用失败
 */
- (NSInteger)startDownload:(NSInteger)index filepath:(NSString*)filepath token:(NSString*)accessTok devID:(NSString*)deviceID channelID:(NSInteger)channelID psk:(NSString*)psk  recordRegionId:(NSString *)recordRegionId Type:(NSInteger)type Timeout:(NSInteger)timeout;
 
/**
 *  开始下载设备录像
 *
 *  @param index         下载索引值
 *  @param filepath      下载路径
 *  @param token         管理员token/用户token
 *  @param deviceID      设备ID
 *  @param decryptKey    视频解密密钥
 *  @param fileID        设备录像文件名
 *  @param speed         下载速度:1/2/4/8/16,1表示按正常视频播放速度下载
 *
 *  @return   0, 接口调用成功
 *           -1, 接口调用失败
 */
- (NSInteger)startDownload:(NSInteger)index filepath:(NSString*)filepath token:(NSString*)token devID:(NSString*)deviceID decryptKey:(NSString*)decryptKey fileID:(NSString*)fileID speed:(double)speed;
 
/**
 *  停止下载云录像
 *
 *  @param index 下载索引值
 *
 *  @return YES, 接口调用成功
 *          NO,  接口调用失败
 */
- (BOOL)stopDownload:(NSInteger)index;
 
@end