Commit 6f2431503e862c7c7f531dc4a85df757d7949631

Authored by 张旭
1 parent e07ce040

提交工程

Showing 247 changed files with 7245 additions and 0 deletions
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/CNLiveUploadYunSDK 0 → 100755
No preview for this file type
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/Headers/CNLiveAbortMultipartUploadRequest.h 0 → 100644
  1 +//
  2 +// CNLiveAbortMultipartUploadRequest.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +
  11 +@class CNLiveMultipartUpload;
  12 +
  13 +@interface CNLiveAbortMultipartUploadRequest : KS3AbortMultipartUploadRequest
  14 +
  15 +@property(strong, nonatomic) NSString *CNYResource;
  16 +@property(nonatomic, strong) NSString *strCNLiveToken;
  17 +
  18 +- (id)initWithMultipartUpload:(CNLiveMultipartUpload *)multipartUpload;
  19 +
  20 +- (NSString *)CNYHeader;
  21 +@end
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/Headers/CNLiveAbortMultipartUploadResponse.h 0 → 100644
  1 +//
  2 +// CNLiveAbortMultipartUploadResponse.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +
  11 +@interface CNLiveAbortMultipartUploadResponse : KS3AbortMultipartUploadResponse
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/Headers/CNLiveAccessControlList.h 0 → 100644
  1 +//
  2 +// CNLiveAccessControlList.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +#import <Foundation/Foundation.h>
  9 +
  10 +typedef NS_ENUM(NSInteger, CNLiveYun_PermissionACLType) {
  11 + CNLiveYun_Permission_Private,
  12 + CNLiveYun_Permission_Public_Read,
  13 + CNLiveYun_Permission_Public_Read_Write,
  14 + CNLiveYun_Permission_Authenticated_Read,
  15 +};
  16 +
  17 +@interface CNLiveAccessControlList : NSObject
  18 +
  19 +@property(strong, nonatomic) NSString *accessACL;
  20 +- (NSString *)setContronAccess:(CNLiveYun_PermissionACLType)aclType;
  21 +
  22 +@end
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/Headers/CNLiveClient.h 0 → 100644
  1 +//
  2 +// CNLiveClient.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@class ALAsset;
  12 +@class CNLiveMultipartUpload;
  13 +@class CNLiveInitiateMultipartUploadRequest;
  14 +@class CNLiveListPartsResponse;
  15 +@class CNLiveListPartsRequest;
  16 +@class CNLiveInitiateMultipartUploadResponse;
  17 +@class CNLiveUploadPartResponse;
  18 +@class CNLiveUploadPartRequest;
  19 +@class CNLivePutObjectResponse;
  20 +@class CNLivePutObjectRequest;
  21 +@class CNLiveAbortMultipartUploadResponse;
  22 +@class CNLiveAbortMultipartUploadRequest;
  23 +@class CNLiveCompleteMultipartUploadResponse;
  24 +@class CNLiveCompleteMultipartUploadRequest;
  25 +
  26 +typedef enum {
  27 + CNLiveBucketBeijing = 0,
  28 + CNLiveBucketAmerica,
  29 + CNLiveBucketHongkong,
  30 + CNLiveBucketHangzhou,
  31 + CNLiveBucketShanghai,
  32 +} CNLiveBucketDomainRegion; // bucket所在地区
  33 +
  34 +@interface CNLiveClient : NSObject
  35 +
  36 +@property(assign, nonatomic) BOOL enableHTTPS;
  37 +
  38 +/**
  39 + * 初始化
  40 + *
  41 + * @return Client对象
  42 + */
  43 ++ (instancetype)initialize;
  44 +
  45 +/**
  46 + * 设置CNLiveBucket所在的地区,默认北京
  47 +
  48 + * @param domainRegion 共有北京,杭州,美国圣克拉拉,香港,上海五个
  49 + * 注释:建议在工程的delegate里面实现
  50 + */
  51 +- (void)setBucketDomainWithRegion:(CNLiveBucketDomainRegion)domainRegion;
  52 +
  53 +/*
  54 + 设置CNLiveBucket 所在的地区,绑定bucket的自定义域名
  55 + @param 自定义的域名
  56 + */
  57 +- (void)setBucketDomain:(NSString *)domainRegion;
  58 +
  59 +/**
  60 + * 获取用户自定义的域名
  61 + * 如果没有设置,返回nil
  62 + */
  63 +- (NSString *)getCustomBucketDomain;
  64 +
  65 +/**
  66 + * 获取当前bucket所在地区,默认北京
  67 + 共有北京,杭州,美国圣克拉拉,香港四个
  68 + */
  69 +- (NSString *)getBucketDomain;
  70 +
  71 +/**
  72 + * 返回请求协议:http/https
  73 + * 目前由enableHTTPS决定
  74 + */
  75 +- (NSString *)requestProtocol;
  76 +
  77 +/**
  78 + * 调用这个接口会初始化一个分块上传
  79 + *
  80 + * @param request 分块上传请求CNLiveInitiateMultipartUploadRequest
  81 + *
  82 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  83 + */
  84 +- (CNLiveMultipartUpload *)initiateMultipartUploadWithRequest:
  85 +(CNLiveInitiateMultipartUploadRequest *)request;
  86 +
  87 +/**
  88 + * 获取相册分块数据
  89 + *
  90 + * @param partNum 从1开始计数,第一块partNum = 1
  91 + * @param partlength 每一块数据的大小,单位为字节
  92 + * @param assets Alasset对象,是获取视频数据的类
  93 + *
  94 + * @return 相册分块数据
  95 + */
  96 +- (NSData *)getUploadPartDataWithPartNum:(NSInteger)partNum
  97 + partLength:(NSInteger)partlength
  98 + Alasset:(ALAsset *)assets;
  99 +
  100 +/**
  101 + * 罗列出已经上传的块
  102 + *
  103 + * @param listPartsRequest 设置罗列已经上传的分块的request信息
  104 + *
  105 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  106 + */
  107 +
  108 +- (CNLiveListPartsResponse *)listParts:(CNLiveListPartsRequest *)listPartsRequest;
  109 +
  110 +/**
  111 + * 组装所有分块上传的文件
  112 + *
  113 + * @param completeMultipartUploadRequest 设置组装所有分块的http信息
  114 + *
  115 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  116 + */
  117 +- (CNLiveCompleteMultipartUploadResponse *)completeMultipartUpload:
  118 +(CNLiveCompleteMultipartUploadRequest *)completeMultipartUploadRequest;
  119 +
  120 +/**
  121 + 上传分块
  122 +
  123 + @param uploadPartRequest 指定上传分块的request信息
  124 + @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  125 + */
  126 +- (CNLiveUploadPartResponse *)uploadPart:(CNLiveUploadPartRequest *)uploadPartRequest;
  127 +
  128 +/**
  129 + * 取消分块上传
  130 + *
  131 + * @param abortMultipartRequest 设置分块文件属性
  132 + *
  133 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  134 + */
  135 +- (CNLiveAbortMultipartUploadResponse *)abortMultipartUpload:
  136 +(CNLiveAbortMultipartUploadRequest *)abortMultipartRequest;
  137 +
  138 +
  139 +/**
  140 + 单块上传
  141 +
  142 + @param putObjectRequest 指定上传单块的request信息
  143 + @return 返回单块的response信息
  144 + */
  145 +- (CNLivePutObjectResponse *)putObject:(CNLivePutObjectRequest *)putObjectRequest;
  146 +
  147 +/**
  148 + * 返回版本信息
  149 + *
  150 + * @return 版本信息
  151 + */
  152 ++ (NSString *)apiVersion;
  153 +@end
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/Headers/CNLiveCompleteMultipartUploadRequest.h 0 → 100644
  1 +//
  2 +// CNLiveCompleteMultipartUploadRequest.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/25.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +#import "CNLiveMultipartUpload.h"
  11 +
  12 +@interface CNLiveCompleteMultipartUploadRequest : KS3CompleteMultipartUploadRequest
  13 +
  14 +@property(strong, nonatomic) NSString *CNYResource;
  15 +@property(nonatomic, strong) NSString *strCNLiveToken;
  16 +
  17 +- (NSString *)CNYHeader;
  18 +- (id)initWithMultipartUpload:(CNLiveMultipartUpload *)multipartUpload;
  19 +
  20 +@end
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/Headers/CNLiveCompleteMultipartUploadResponse.h 0 → 100644
  1 +//
  2 +// CNLiveCompleteMultipartUploadResponse.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/25.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +
  11 +@interface CNLiveCompleteMultipartUploadResponse : KS3CompleteMultipartUploadResponse
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/Headers/CNLiveConstants.h 0 → 100644
  1 +//
  2 +// CNLiveConstants.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#ifndef CNLiveConstants_h
  10 +#define CNLiveConstants_h
  11 +
  12 +#define kCNLiveHttpMethodPut @"PUT"
  13 +#define kCNLiveHttpMethodGet @"GET"
  14 +
  15 +#define kCNLiveHttpMethodPost @"POST"
  16 +#define kCNLiveHttpMethodDelete @"DELETE"
  17 +
  18 +#define kCNLiveQueryParamEncodingType @"encoding-type"
  19 +
  20 +#define kCNLiveHttpHdrContentMD5 @"Content-MD5"
  21 +
  22 +#define kCNLiveHttpHdrContentEncoding @"Content-Encoding"
  23 +#define kCNLiveHttpHdrContentDisposition @"Content-Disposition"
  24 +#define kCNLiveHttpHdrCacheControl @"Cache-Control"
  25 +#define kCNLiveHttpHdrContentLength @"Content-Length"
  26 +
  27 +#define kCNLiveHttpHdrContentType @"Content-Type"
  28 +
  29 +#define kCNLiveQueryParamPartNumber @"partNumber"
  30 +#define kCNLiveQueryParamUploadId @"uploadId"
  31 +#define kCNLiveQueryParamMaxParts @"max-parts"
  32 +#define kCNLiveQueryParamPartNumberMarker @"part-number-marker"
  33 +
  34 +#endif /* CNLiveConstants_h */
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/Headers/CNLiveInitiateMultipartUploadRequest.h 0 → 100644
  1 +//
  2 +// CNLiveInitiateMultipartUploadRequest.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +
  11 +@class CNLiveAccessControlList;
  12 +
  13 +@interface CNLiveInitiateMultipartUploadRequest : KS3InitiateMultipartUploadRequest
  14 +
  15 +@property(strong, nonatomic) NSString *CNYResource;
  16 +@property(nonatomic, strong) NSString *strCNLiveToken;
  17 +
  18 +- (id)initWithKey:(NSString *)aKey
  19 + inBucket:(NSString *)aBucket
  20 + acl:(CNLiveAccessControlList *)acl
  21 + grantAcl:(NSArray *)arrGrantAcl;
  22 +
  23 +- (NSString *)CNYHeader;
  24 +@end
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/Headers/CNLiveInitiateMultipartUploadResponse.h 0 → 100644
  1 +//
  2 +// CNLiveInitiateMultipartUploadResponse.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/25.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +
  11 +@interface CNLiveInitiateMultipartUploadResponse : KS3InitiateMultipartUploadResponse
  12 +@end
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/Headers/CNLiveListPartsRequest.h 0 → 100644
  1 +//
  2 +// CNLiveListPartsRequest.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +#import "CNLiveMultipartUpload.h"
  11 +
  12 +@interface CNLiveListPartsRequest : KS3ListPartsRequest
  13 +
  14 +@property(strong, nonatomic) NSString *CNYResource;
  15 +@property(nonatomic, strong) NSString *strCNLiveToken;
  16 +
  17 +- (id)initWithMultipartUpload:(CNLiveMultipartUpload *)multipartUpload;
  18 +- (NSString *)CNYHeader;
  19 +@end
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/Headers/CNLiveListPartsResponse.h 0 → 100644
  1 +//
  2 +// CNLiveListPartsResponse.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +
  11 +@interface CNLiveListPartsResponse : KS3ListPartsResponse
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/Headers/CNLiveMultipartUpload.h 0 → 100644
  1 +//
  2 +// CNLiveMultipartUpload.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import "CNLiveOwner.h"
  10 +#import <Foundation/Foundation.h>
  11 +
  12 +//上传类型
  13 +typedef enum {
  14 + kCNLiveUploadAlasset = 0, //相册中
  15 + kCNLiveUploadNormal, //沙盒里或工程里
  16 +} CNLiveUploadType;
  17 +
  18 +
  19 +@interface CNLiveMultipartUpload : NSObject
  20 +
  21 +@property(nonatomic, strong) NSString *key;
  22 +
  23 +@property(nonatomic, strong) NSString *bucket;
  24 +
  25 +@property(nonatomic, strong) NSString *uploadId;
  26 +
  27 +@property(nonatomic, strong) NSString *storageClass;
  28 +
  29 +@property(nonatomic, strong) CNLiveOwner *initiator;
  30 +
  31 +@property(nonatomic, strong) CNLiveOwner *owner;
  32 +
  33 +@property(nonatomic, strong) NSDate *initiated;
  34 +
  35 +@property(assign, readonly) BOOL isCanceled;
  36 +
  37 +@property(assign, nonatomic, readonly) BOOL isPaused;
  38 +
  39 +@property(assign, nonatomic) CNLiveUploadType uploadType;
  40 +
  41 +//暂停
  42 +- (void)pause;
  43 +//继续
  44 +- (void)proceed;
  45 +//取消
  46 +- (void)cancel;
  47 +
  48 +
  49 +@end
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/Headers/CNLiveOwner.h 0 → 100644
  1 +//
  2 +// CNLiveOwner.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface CNLiveOwner : NSObject
  12 +
  13 +@property(strong, nonatomic) NSString *ID;
  14 +
  15 +@property(strong, nonatomic) NSString *displayName;
  16 +
  17 +- (id)initWithID:(NSString *)theID withDisplayName:(NSString *)theDisplayName;
  18 +
  19 ++ (id)ownerWithID:(NSString *)theID withDisplayName:(NSString *)theDisplayName;
  20 +@end
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/Headers/CNLivePart.h 0 → 100644
  1 +//
  2 +// CNLivePart.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface CNLivePart : NSObject
  12 +
  13 +@property(strong, nonatomic) NSString *etag;
  14 +
  15 +@property(strong, nonatomic) NSString *lastModified;
  16 +
  17 +@property(nonatomic, assign) int32_t partNumber;
  18 +
  19 +@property(nonatomic, assign) long long size;
  20 +
  21 +@end
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/Headers/CNLivePutObjectRequest.h 0 → 100644
  1 +//
  2 +// CNLivePutObjectRequest.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +
  11 +@class CNLiveAccessControlList;
  12 +@interface CNLivePutObjectRequest : KS3PutObjectRequest
  13 +@property(strong, nonatomic) NSString *CNYResource;
  14 +@property(nonatomic, strong) NSString *strCNLiveToken;
  15 +
  16 +- (instancetype)initWithName:(NSString *)bucketName
  17 + withAcl:(CNLiveAccessControlList *)acl
  18 + grantAcl:(NSArray *)arrGrantAcl;
  19 +- (NSString *)CNYHeader;
  20 +@end
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/Headers/CNLivePutObjectResponse.h 0 → 100644
  1 +//
  2 +// CNLivePutObjectResponse.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +
  11 +@interface CNLivePutObjectResponse : KS3PutObjectResponse
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/Headers/CNLiveSDKUtil.h 0 → 100644
  1 +//
  2 +// CNLiveSDKUtil.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +extern NSString *const CNLiveDefaultRunLoopMode;
  12 +
  13 +@interface CNLiveSDKUtil : NSObject
  14 +
  15 ++ (NSString *)base64md5FromData:(NSData *)data;
  16 +
  17 +@end
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/Headers/CNLiveUpload.h 0 → 100644
  1 +//
  2 +// CNLiveUpload.h
  3 +// CNLiveUploadSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/4.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface CNLiveUpload : NSObject
  12 +
  13 +/**
  14 + 初始化上传云SDK
  15 +
  16 + @param appId 在open.cnlive.com网站申请得到的appId
  17 + @param appKey 在open.cnlive.com网站申请得到的appKey
  18 + @param isTestEnvironment YES:测试环境 NO:正式环境
  19 + */
  20 ++ (void)setAppId:(NSString *)appId appKey:(NSString *)appKey isTestEnvironment:(BOOL)isTestEnvironment;
  21 +
  22 +/**
  23 + 获取鉴权Token
  24 +
  25 + @param md5 MD5加密数据
  26 + @param verb 请求方式GET/POST
  27 + @param type content-type
  28 + @param res 文件资源
  29 + @param headers 头文件信息
  30 + @param date 格林威治时间('D, d M Y H:i:s \G\M\T')
  31 + @param successBlock 成功回调
  32 + @param failureBlock 失败回调
  33 + */
  34 ++ (void)getTokenWithMd5:(NSString *)md5 verb:(NSString *)verb type:(NSString *)type res:(NSString *)res headers:(NSString *)headers date:(NSString *)date success:(void (^)(NSString *token))successBlock failure:(void (^)(NSDictionary *error))failureBlock;
  35 +@end
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/Headers/CNLiveUploadPartRequest.h 0 → 100644
  1 +//
  2 +// CNLiveUploadPartRequest.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +#import "CNLiveMultipartUpload.h"
  11 +
  12 +@interface CNLiveUploadPartRequest : KS3UploadPartRequest
  13 +@property(strong, nonatomic) NSString *CNYResource;
  14 +@property(nonatomic, strong) NSString *strCNLiveToken;
  15 +
  16 +- (id)initWithMultipartUpload:(CNLiveMultipartUpload *)multipartUpload
  17 + partNumber:(int32_t)partNumber
  18 + data:(NSData *)data
  19 + generateMD5:(BOOL)generateMD5;
  20 +- (NSString *)CNYHeader;
  21 +@end
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/Headers/CNLiveUploadPartResponse.h 0 → 100644
  1 +//
  2 +// CNLiveUploadPartResponse.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/25.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +
  11 +@interface CNLiveUploadPartResponse : KS3UploadPartResponse
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/Headers/CNLiveUploadYunSDK.h 0 → 100644
  1 +//
  2 +// CNLiveUploadYunSDK.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +
  11 +#ifdef __OBJC__
  12 +
  13 +//! Project version number for CNLiveUploadYunSDK.
  14 +FOUNDATION_EXPORT double CNLiveUploadYunSDKVersionNumber;
  15 +
  16 +//! Project version string for CNLiveUploadYunSDK.
  17 +FOUNDATION_EXPORT const unsigned char CNLiveUploadYunSDKVersionString[];
  18 +
  19 +// In this header, you should import all the public headers of your framework using statements like #import <CNLiveUploadYunSDK/PublicHeader.h>
  20 +
  21 +#import "CNLiveUpload.h"
  22 +#import "CNLiveAbortMultipartUploadRequest.h"
  23 +#import "CNLiveAbortMultipartUploadResponse.h"
  24 +#import "CNLiveAccessControlList.h"
  25 +#import "CNLiveClient.h"
  26 +#import "CNLiveInitiateMultipartUploadRequest.h"
  27 +#import "CNLiveListPartsRequest.h"
  28 +#import "CNLiveListPartsResponse.h"
  29 +#import "CNLiveMultipartUpload.h"
  30 +#import "CNLiveOwner.h"
  31 +#import "CNLivePart.h"
  32 +#import "CNLivePutObjectRequest.h"
  33 +#import "CNLivePutObjectResponse.h"
  34 +#import "CNLiveSDKUtil.h"
  35 +#import "CNLiveUploadPartRequest.h"
  36 +#import "CNLiveCompleteMultipartUploadRequest.h"
  37 +#import "CNLiveCompleteMultipartUploadResponse.h"
  38 +
  39 +#endif
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/Info.plist 0 → 100644
No preview for this file type
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDK.framework/Modules/module.modulemap 0 → 100644
  1 +framework module CNLiveUploadYunSDK {
  2 + umbrella header "CNLiveUploadYunSDK.h"
  3 +
  4 + export *
  5 + module * { export * }
  6 +}
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDKDemo.xcodeproj/project.pbxproj 0 → 100644
  1 +// !$*UTF8*$!
  2 +{
  3 + archiveVersion = 1;
  4 + classes = {
  5 + };
  6 + objectVersion = 46;
  7 + objects = {
  8 +
  9 +/* Begin PBXBuildFile section */
  10 + 81B9CB8A1F542006009594FB /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 81B9CB891F542006009594FB /* main.m */; };
  11 + 81B9CB8D1F542006009594FB /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 81B9CB8C1F542006009594FB /* AppDelegate.m */; };
  12 + 81B9CB901F542006009594FB /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 81B9CB8F1F542006009594FB /* ViewController.m */; };
  13 + 81B9CB931F542006009594FB /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81B9CB911F542006009594FB /* Main.storyboard */; };
  14 + 81B9CB951F542006009594FB /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 81B9CB941F542006009594FB /* Assets.xcassets */; };
  15 + 81B9CB981F542006009594FB /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 81B9CB961F542006009594FB /* LaunchScreen.storyboard */; };
  16 + 81B9CBA11F54204F009594FB /* CNLiveUploadController.m in Sources */ = {isa = PBXBuildFile; fileRef = 81B9CBA01F54204F009594FB /* CNLiveUploadController.m */; };
  17 + 81B9CBA41F54205E009594FB /* CNLiveUploadYunSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81B9CBA21F54205E009594FB /* CNLiveUploadYunSDK.framework */; };
  18 + 81B9CBA71F54207B009594FB /* CNLiveUploadYunSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 81B9CBA21F54205E009594FB /* CNLiveUploadYunSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
  19 + 81B9CBA81F54207B009594FB /* KS3YunSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 81B9CBA31F54205E009594FB /* KS3YunSDK.framework */; };
  20 + 81B9CBA91F54207B009594FB /* KS3YunSDK.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 81B9CBA31F54205E009594FB /* KS3YunSDK.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
  21 + 81B9CBAE1F5421C6009594FB /* 7.6M.mov in Resources */ = {isa = PBXBuildFile; fileRef = 81B9CBAD1F5421C6009594FB /* 7.6M.mov */; };
  22 +/* End PBXBuildFile section */
  23 +
  24 +/* Begin PBXCopyFilesBuildPhase section */
  25 + 81B9CBAA1F54207B009594FB /* Embed Frameworks */ = {
  26 + isa = PBXCopyFilesBuildPhase;
  27 + buildActionMask = 2147483647;
  28 + dstPath = "";
  29 + dstSubfolderSpec = 10;
  30 + files = (
  31 + 81B9CBA91F54207B009594FB /* KS3YunSDK.framework in Embed Frameworks */,
  32 + 81B9CBA71F54207B009594FB /* CNLiveUploadYunSDK.framework in Embed Frameworks */,
  33 + );
  34 + name = "Embed Frameworks";
  35 + runOnlyForDeploymentPostprocessing = 0;
  36 + };
  37 +/* End PBXCopyFilesBuildPhase section */
  38 +
  39 +/* Begin PBXFileReference section */
  40 + 81B9CB851F542006009594FB /* CNLiveUploadYunSDKDemo.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = CNLiveUploadYunSDKDemo.app; sourceTree = BUILT_PRODUCTS_DIR; };
  41 + 81B9CB891F542006009594FB /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
  42 + 81B9CB8B1F542006009594FB /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
  43 + 81B9CB8C1F542006009594FB /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
  44 + 81B9CB8E1F542006009594FB /* ViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ViewController.h; sourceTree = "<group>"; };
  45 + 81B9CB8F1F542006009594FB /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = "<group>"; };
  46 + 81B9CB921F542006009594FB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
  47 + 81B9CB941F542006009594FB /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
  48 + 81B9CB971F542006009594FB /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
  49 + 81B9CB991F542006009594FB /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
  50 + 81B9CB9F1F54204F009594FB /* CNLiveUploadController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CNLiveUploadController.h; sourceTree = "<group>"; };
  51 + 81B9CBA01F54204F009594FB /* CNLiveUploadController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CNLiveUploadController.m; sourceTree = "<group>"; };
  52 + 81B9CBA21F54205E009594FB /* CNLiveUploadYunSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = CNLiveUploadYunSDK.framework; sourceTree = "<group>"; };
  53 + 81B9CBA31F54205E009594FB /* KS3YunSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = KS3YunSDK.framework; sourceTree = "<group>"; };
  54 + 81B9CBAD1F5421C6009594FB /* 7.6M.mov */ = {isa = PBXFileReference; lastKnownFileType = video.quicktime; path = 7.6M.mov; sourceTree = "<group>"; };
  55 +/* End PBXFileReference section */
  56 +
  57 +/* Begin PBXFrameworksBuildPhase section */
  58 + 81B9CB821F542006009594FB /* Frameworks */ = {
  59 + isa = PBXFrameworksBuildPhase;
  60 + buildActionMask = 2147483647;
  61 + files = (
  62 + 81B9CBA81F54207B009594FB /* KS3YunSDK.framework in Frameworks */,
  63 + 81B9CBA41F54205E009594FB /* CNLiveUploadYunSDK.framework in Frameworks */,
  64 + );
  65 + runOnlyForDeploymentPostprocessing = 0;
  66 + };
  67 +/* End PBXFrameworksBuildPhase section */
  68 +
  69 +/* Begin PBXGroup section */
  70 + 81B9CB7C1F542006009594FB = {
  71 + isa = PBXGroup;
  72 + children = (
  73 + 81B9CBA21F54205E009594FB /* CNLiveUploadYunSDK.framework */,
  74 + 81B9CBA31F54205E009594FB /* KS3YunSDK.framework */,
  75 + 81B9CB871F542006009594FB /* CNLiveUploadYunSDKDemo */,
  76 + 81B9CB861F542006009594FB /* Products */,
  77 + );
  78 + sourceTree = "<group>";
  79 + };
  80 + 81B9CB861F542006009594FB /* Products */ = {
  81 + isa = PBXGroup;
  82 + children = (
  83 + 81B9CB851F542006009594FB /* CNLiveUploadYunSDKDemo.app */,
  84 + );
  85 + name = Products;
  86 + sourceTree = "<group>";
  87 + };
  88 + 81B9CB871F542006009594FB /* CNLiveUploadYunSDKDemo */ = {
  89 + isa = PBXGroup;
  90 + children = (
  91 + 81B9CB8B1F542006009594FB /* AppDelegate.h */,
  92 + 81B9CB8C1F542006009594FB /* AppDelegate.m */,
  93 + 81B9CB8E1F542006009594FB /* ViewController.h */,
  94 + 81B9CB8F1F542006009594FB /* ViewController.m */,
  95 + 81B9CB9F1F54204F009594FB /* CNLiveUploadController.h */,
  96 + 81B9CBA01F54204F009594FB /* CNLiveUploadController.m */,
  97 + 81B9CBAD1F5421C6009594FB /* 7.6M.mov */,
  98 + 81B9CB911F542006009594FB /* Main.storyboard */,
  99 + 81B9CB941F542006009594FB /* Assets.xcassets */,
  100 + 81B9CB961F542006009594FB /* LaunchScreen.storyboard */,
  101 + 81B9CB991F542006009594FB /* Info.plist */,
  102 + 81B9CB881F542006009594FB /* Supporting Files */,
  103 + );
  104 + path = CNLiveUploadYunSDKDemo;
  105 + sourceTree = "<group>";
  106 + };
  107 + 81B9CB881F542006009594FB /* Supporting Files */ = {
  108 + isa = PBXGroup;
  109 + children = (
  110 + 81B9CB891F542006009594FB /* main.m */,
  111 + );
  112 + name = "Supporting Files";
  113 + sourceTree = "<group>";
  114 + };
  115 +/* End PBXGroup section */
  116 +
  117 +/* Begin PBXNativeTarget section */
  118 + 81B9CB841F542006009594FB /* CNLiveUploadYunSDKDemo */ = {
  119 + isa = PBXNativeTarget;
  120 + buildConfigurationList = 81B9CB9C1F542006009594FB /* Build configuration list for PBXNativeTarget "CNLiveUploadYunSDKDemo" */;
  121 + buildPhases = (
  122 + 81B9CB811F542006009594FB /* Sources */,
  123 + 81B9CB821F542006009594FB /* Frameworks */,
  124 + 81B9CB831F542006009594FB /* Resources */,
  125 + 81B9CBAA1F54207B009594FB /* Embed Frameworks */,
  126 + );
  127 + buildRules = (
  128 + );
  129 + dependencies = (
  130 + );
  131 + name = CNLiveUploadYunSDKDemo;
  132 + productName = CNLiveUploadYunSDKDemo;
  133 + productReference = 81B9CB851F542006009594FB /* CNLiveUploadYunSDKDemo.app */;
  134 + productType = "com.apple.product-type.application";
  135 + };
  136 +/* End PBXNativeTarget section */
  137 +
  138 +/* Begin PBXProject section */
  139 + 81B9CB7D1F542006009594FB /* Project object */ = {
  140 + isa = PBXProject;
  141 + attributes = {
  142 + LastUpgradeCheck = 0830;
  143 + ORGANIZATIONNAME = zhulin;
  144 + TargetAttributes = {
  145 + 81B9CB841F542006009594FB = {
  146 + CreatedOnToolsVersion = 8.3.2;
  147 + DevelopmentTeam = 94X49GG3ZW;
  148 + ProvisioningStyle = Automatic;
  149 + };
  150 + };
  151 + };
  152 + buildConfigurationList = 81B9CB801F542006009594FB /* Build configuration list for PBXProject "CNLiveUploadYunSDKDemo" */;
  153 + compatibilityVersion = "Xcode 3.2";
  154 + developmentRegion = English;
  155 + hasScannedForEncodings = 0;
  156 + knownRegions = (
  157 + en,
  158 + Base,
  159 + );
  160 + mainGroup = 81B9CB7C1F542006009594FB;
  161 + productRefGroup = 81B9CB861F542006009594FB /* Products */;
  162 + projectDirPath = "";
  163 + projectRoot = "";
  164 + targets = (
  165 + 81B9CB841F542006009594FB /* CNLiveUploadYunSDKDemo */,
  166 + );
  167 + };
  168 +/* End PBXProject section */
  169 +
  170 +/* Begin PBXResourcesBuildPhase section */
  171 + 81B9CB831F542006009594FB /* Resources */ = {
  172 + isa = PBXResourcesBuildPhase;
  173 + buildActionMask = 2147483647;
  174 + files = (
  175 + 81B9CBAE1F5421C6009594FB /* 7.6M.mov in Resources */,
  176 + 81B9CB981F542006009594FB /* LaunchScreen.storyboard in Resources */,
  177 + 81B9CB951F542006009594FB /* Assets.xcassets in Resources */,
  178 + 81B9CB931F542006009594FB /* Main.storyboard in Resources */,
  179 + );
  180 + runOnlyForDeploymentPostprocessing = 0;
  181 + };
  182 +/* End PBXResourcesBuildPhase section */
  183 +
  184 +/* Begin PBXSourcesBuildPhase section */
  185 + 81B9CB811F542006009594FB /* Sources */ = {
  186 + isa = PBXSourcesBuildPhase;
  187 + buildActionMask = 2147483647;
  188 + files = (
  189 + 81B9CB901F542006009594FB /* ViewController.m in Sources */,
  190 + 81B9CBA11F54204F009594FB /* CNLiveUploadController.m in Sources */,
  191 + 81B9CB8D1F542006009594FB /* AppDelegate.m in Sources */,
  192 + 81B9CB8A1F542006009594FB /* main.m in Sources */,
  193 + );
  194 + runOnlyForDeploymentPostprocessing = 0;
  195 + };
  196 +/* End PBXSourcesBuildPhase section */
  197 +
  198 +/* Begin PBXVariantGroup section */
  199 + 81B9CB911F542006009594FB /* Main.storyboard */ = {
  200 + isa = PBXVariantGroup;
  201 + children = (
  202 + 81B9CB921F542006009594FB /* Base */,
  203 + );
  204 + name = Main.storyboard;
  205 + sourceTree = "<group>";
  206 + };
  207 + 81B9CB961F542006009594FB /* LaunchScreen.storyboard */ = {
  208 + isa = PBXVariantGroup;
  209 + children = (
  210 + 81B9CB971F542006009594FB /* Base */,
  211 + );
  212 + name = LaunchScreen.storyboard;
  213 + sourceTree = "<group>";
  214 + };
  215 +/* End PBXVariantGroup section */
  216 +
  217 +/* Begin XCBuildConfiguration section */
  218 + 81B9CB9A1F542006009594FB /* Debug */ = {
  219 + isa = XCBuildConfiguration;
  220 + buildSettings = {
  221 + ALWAYS_SEARCH_USER_PATHS = NO;
  222 + CLANG_ANALYZER_NONNULL = YES;
  223 + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
  224 + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
  225 + CLANG_CXX_LIBRARY = "libc++";
  226 + CLANG_ENABLE_MODULES = YES;
  227 + CLANG_ENABLE_OBJC_ARC = YES;
  228 + CLANG_WARN_BOOL_CONVERSION = YES;
  229 + CLANG_WARN_CONSTANT_CONVERSION = YES;
  230 + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
  231 + CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
  232 + CLANG_WARN_EMPTY_BODY = YES;
  233 + CLANG_WARN_ENUM_CONVERSION = YES;
  234 + CLANG_WARN_INFINITE_RECURSION = YES;
  235 + CLANG_WARN_INT_CONVERSION = YES;
  236 + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
  237 + CLANG_WARN_SUSPICIOUS_MOVE = YES;
  238 + CLANG_WARN_UNREACHABLE_CODE = YES;
  239 + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
  240 + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
  241 + COPY_PHASE_STRIP = NO;
  242 + DEBUG_INFORMATION_FORMAT = dwarf;
  243 + ENABLE_STRICT_OBJC_MSGSEND = YES;
  244 + ENABLE_TESTABILITY = YES;
  245 + GCC_C_LANGUAGE_STANDARD = gnu99;
  246 + GCC_DYNAMIC_NO_PIC = NO;
  247 + GCC_NO_COMMON_BLOCKS = YES;
  248 + GCC_OPTIMIZATION_LEVEL = 0;
  249 + GCC_PREPROCESSOR_DEFINITIONS = (
  250 + "DEBUG=1",
  251 + "$(inherited)",
  252 + );
  253 + GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
  254 + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
  255 + GCC_WARN_UNDECLARED_SELECTOR = YES;
  256 + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
  257 + GCC_WARN_UNUSED_FUNCTION = YES;
  258 + GCC_WARN_UNUSED_VARIABLE = YES;
  259 + IPHONEOS_DEPLOYMENT_TARGET = 10.3;
  260 + MTL_ENABLE_DEBUG_INFO = YES;
  261 + ONLY_ACTIVE_ARCH = YES;
  262 + SDKROOT = iphoneos;
  263 + TARGETED_DEVICE_FAMILY = "1,2";
  264 + };
  265 + name = Debug;
  266 + };
  267 + 81B9CB9B1F542006009594FB /* Release */ = {
  268 + isa = XCBuildConfiguration;
  269 + buildSettings = {
  270 + ALWAYS_SEARCH_USER_PATHS = NO;
  271 + CLANG_ANALYZER_NONNULL = YES;
  272 + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
  273 + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
  274 + CLANG_CXX_LIBRARY = "libc++";
  275 + CLANG_ENABLE_MODULES = YES;
  276 + CLANG_ENABLE_OBJC_ARC = YES;
  277 + CLANG_WARN_BOOL_CONVERSION = YES;
  278 + CLANG_WARN_CONSTANT_CONVERSION = YES;
  279 + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
  280 + CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
  281 + CLANG_WARN_EMPTY_BODY = YES;
  282 + CLANG_WARN_ENUM_CONVERSION = YES;
  283 + CLANG_WARN_INFINITE_RECURSION = YES;
  284 + CLANG_WARN_INT_CONVERSION = YES;
  285 + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
  286 + CLANG_WARN_SUSPICIOUS_MOVE = YES;
  287 + CLANG_WARN_UNREACHABLE_CODE = YES;
  288 + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
  289 + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
  290 + COPY_PHASE_STRIP = NO;
  291 + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
  292 + ENABLE_NS_ASSERTIONS = NO;
  293 + ENABLE_STRICT_OBJC_MSGSEND = YES;
  294 + GCC_C_LANGUAGE_STANDARD = gnu99;
  295 + GCC_NO_COMMON_BLOCKS = YES;
  296 + GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
  297 + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
  298 + GCC_WARN_UNDECLARED_SELECTOR = YES;
  299 + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
  300 + GCC_WARN_UNUSED_FUNCTION = YES;
  301 + GCC_WARN_UNUSED_VARIABLE = YES;
  302 + IPHONEOS_DEPLOYMENT_TARGET = 10.3;
  303 + MTL_ENABLE_DEBUG_INFO = NO;
  304 + SDKROOT = iphoneos;
  305 + TARGETED_DEVICE_FAMILY = "1,2";
  306 + VALIDATE_PRODUCT = YES;
  307 + };
  308 + name = Release;
  309 + };
  310 + 81B9CB9D1F542006009594FB /* Debug */ = {
  311 + isa = XCBuildConfiguration;
  312 + buildSettings = {
  313 + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
  314 + DEVELOPMENT_TEAM = 94X49GG3ZW;
  315 + FRAMEWORK_SEARCH_PATHS = (
  316 + "$(inherited)",
  317 + "$(PROJECT_DIR)",
  318 + );
  319 + INFOPLIST_FILE = CNLiveUploadYunSDKDemo/Info.plist;
  320 + IPHONEOS_DEPLOYMENT_TARGET = 8.0;
  321 + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
  322 + PRODUCT_BUNDLE_IDENTIFIER = com.rd.XpkUISDKDemo;
  323 + PRODUCT_NAME = "$(TARGET_NAME)";
  324 + };
  325 + name = Debug;
  326 + };
  327 + 81B9CB9E1F542006009594FB /* Release */ = {
  328 + isa = XCBuildConfiguration;
  329 + buildSettings = {
  330 + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
  331 + DEVELOPMENT_TEAM = 94X49GG3ZW;
  332 + FRAMEWORK_SEARCH_PATHS = (
  333 + "$(inherited)",
  334 + "$(PROJECT_DIR)",
  335 + );
  336 + INFOPLIST_FILE = CNLiveUploadYunSDKDemo/Info.plist;
  337 + IPHONEOS_DEPLOYMENT_TARGET = 8.0;
  338 + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
  339 + PRODUCT_BUNDLE_IDENTIFIER = com.rd.XpkUISDKDemo;
  340 + PRODUCT_NAME = "$(TARGET_NAME)";
  341 + };
  342 + name = Release;
  343 + };
  344 +/* End XCBuildConfiguration section */
  345 +
  346 +/* Begin XCConfigurationList section */
  347 + 81B9CB801F542006009594FB /* Build configuration list for PBXProject "CNLiveUploadYunSDKDemo" */ = {
  348 + isa = XCConfigurationList;
  349 + buildConfigurations = (
  350 + 81B9CB9A1F542006009594FB /* Debug */,
  351 + 81B9CB9B1F542006009594FB /* Release */,
  352 + );
  353 + defaultConfigurationIsVisible = 0;
  354 + defaultConfigurationName = Release;
  355 + };
  356 + 81B9CB9C1F542006009594FB /* Build configuration list for PBXNativeTarget "CNLiveUploadYunSDKDemo" */ = {
  357 + isa = XCConfigurationList;
  358 + buildConfigurations = (
  359 + 81B9CB9D1F542006009594FB /* Debug */,
  360 + 81B9CB9E1F542006009594FB /* Release */,
  361 + );
  362 + defaultConfigurationIsVisible = 0;
  363 + };
  364 +/* End XCConfigurationList section */
  365 + };
  366 + rootObject = 81B9CB7D1F542006009594FB /* Project object */;
  367 +}
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDKDemo.xcodeproj/xcuserdata/iOS.xcuserdatad/xcschemes/CNLiveUploadYunSDKDemo.xcscheme 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<Scheme
  3 + LastUpgradeVersion = "0830"
  4 + version = "1.3">
  5 + <BuildAction
  6 + parallelizeBuildables = "YES"
  7 + buildImplicitDependencies = "YES">
  8 + <BuildActionEntries>
  9 + <BuildActionEntry
  10 + buildForTesting = "YES"
  11 + buildForRunning = "YES"
  12 + buildForProfiling = "YES"
  13 + buildForArchiving = "YES"
  14 + buildForAnalyzing = "YES">
  15 + <BuildableReference
  16 + BuildableIdentifier = "primary"
  17 + BlueprintIdentifier = "81B9CB841F542006009594FB"
  18 + BuildableName = "CNLiveUploadYunSDKDemo.app"
  19 + BlueprintName = "CNLiveUploadYunSDKDemo"
  20 + ReferencedContainer = "container:CNLiveUploadYunSDKDemo.xcodeproj">
  21 + </BuildableReference>
  22 + </BuildActionEntry>
  23 + </BuildActionEntries>
  24 + </BuildAction>
  25 + <TestAction
  26 + buildConfiguration = "Debug"
  27 + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  28 + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  29 + shouldUseLaunchSchemeArgsEnv = "YES">
  30 + <Testables>
  31 + </Testables>
  32 + <MacroExpansion>
  33 + <BuildableReference
  34 + BuildableIdentifier = "primary"
  35 + BlueprintIdentifier = "81B9CB841F542006009594FB"
  36 + BuildableName = "CNLiveUploadYunSDKDemo.app"
  37 + BlueprintName = "CNLiveUploadYunSDKDemo"
  38 + ReferencedContainer = "container:CNLiveUploadYunSDKDemo.xcodeproj">
  39 + </BuildableReference>
  40 + </MacroExpansion>
  41 + <AdditionalOptions>
  42 + </AdditionalOptions>
  43 + </TestAction>
  44 + <LaunchAction
  45 + buildConfiguration = "Debug"
  46 + selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
  47 + selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
  48 + launchStyle = "0"
  49 + useCustomWorkingDirectory = "NO"
  50 + ignoresPersistentStateOnLaunch = "NO"
  51 + debugDocumentVersioning = "YES"
  52 + debugServiceExtension = "internal"
  53 + allowLocationSimulation = "YES">
  54 + <BuildableProductRunnable
  55 + runnableDebuggingMode = "0">
  56 + <BuildableReference
  57 + BuildableIdentifier = "primary"
  58 + BlueprintIdentifier = "81B9CB841F542006009594FB"
  59 + BuildableName = "CNLiveUploadYunSDKDemo.app"
  60 + BlueprintName = "CNLiveUploadYunSDKDemo"
  61 + ReferencedContainer = "container:CNLiveUploadYunSDKDemo.xcodeproj">
  62 + </BuildableReference>
  63 + </BuildableProductRunnable>
  64 + <AdditionalOptions>
  65 + </AdditionalOptions>
  66 + </LaunchAction>
  67 + <ProfileAction
  68 + buildConfiguration = "Release"
  69 + shouldUseLaunchSchemeArgsEnv = "YES"
  70 + savedToolIdentifier = ""
  71 + useCustomWorkingDirectory = "NO"
  72 + debugDocumentVersioning = "YES">
  73 + <BuildableProductRunnable
  74 + runnableDebuggingMode = "0">
  75 + <BuildableReference
  76 + BuildableIdentifier = "primary"
  77 + BlueprintIdentifier = "81B9CB841F542006009594FB"
  78 + BuildableName = "CNLiveUploadYunSDKDemo.app"
  79 + BlueprintName = "CNLiveUploadYunSDKDemo"
  80 + ReferencedContainer = "container:CNLiveUploadYunSDKDemo.xcodeproj">
  81 + </BuildableReference>
  82 + </BuildableProductRunnable>
  83 + </ProfileAction>
  84 + <AnalyzeAction
  85 + buildConfiguration = "Debug">
  86 + </AnalyzeAction>
  87 + <ArchiveAction
  88 + buildConfiguration = "Release"
  89 + revealArchiveInOrganizer = "YES">
  90 + </ArchiveAction>
  91 +</Scheme>
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDKDemo/7.6M.mov 0 → 100755
No preview for this file type
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDKDemo/AppDelegate.h 0 → 100644
  1 +//
  2 +// AppDelegate.h
  3 +// CNLiveUploadYunSDKDemo
  4 +//
  5 +// Created by iOS on 2017/8/28.
  6 +// Copyright © 2017年 zhulin. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +
  11 +#define AppId @"60_j5xilfyl12"
  12 +#define AppKey @"8b58d3dcdd828359e6113d5531029801e5d2b53e9a980c"
  13 +
  14 +@interface AppDelegate : UIResponder <UIApplicationDelegate>
  15 +
  16 +@property (strong, nonatomic) UIWindow *window;
  17 +
  18 +
  19 +@end
  20 +
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDKDemo/AppDelegate.m 0 → 100644
  1 +//
  2 +// AppDelegate.m
  3 +// CNLiveUploadYunSDKDemo
  4 +//
  5 +// Created by iOS on 2017/8/28.
  6 +// Copyright © 2017年 zhulin. All rights reserved.
  7 +//
  8 +
  9 +#import "AppDelegate.h"
  10 +#import "CNLiveUploadController.h"
  11 +#import <CNLiveUploadYunSDK/CNLiveUploadYunSDK.h>
  12 +
  13 +@interface AppDelegate ()
  14 +
  15 +@end
  16 +
  17 +@implementation AppDelegate
  18 +
  19 +
  20 +- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
  21 + // Override point for customization after application launch.
  22 +
  23 + self.window = [[UIWindow alloc] initWithFrame:[UIScreen mainScreen].bounds];
  24 + UINavigationController *nav = [[UINavigationController alloc] initWithRootViewController:[CNLiveUploadController new]];
  25 + self.window.rootViewController = nav;
  26 + [self.window makeKeyAndVisible];
  27 +
  28 + [[CNLiveClient initialize] setBucketDomainWithRegion:CNLiveBucketBeijing];
  29 + [CNLiveUpload setAppId:AppId appKey:AppKey isTestEnvironment:YES];
  30 +
  31 + return YES;
  32 +}
  33 +
  34 +
  35 +- (void)applicationWillResignActive:(UIApplication *)application {
  36 + // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
  37 + // Use this method to pause ongoing tasks, disable timers, and invalidate graphics rendering callbacks. Games should use this method to pause the game.
  38 +}
  39 +
  40 +
  41 +- (void)applicationDidEnterBackground:(UIApplication *)application {
  42 + // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
  43 + // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
  44 +}
  45 +
  46 +
  47 +- (void)applicationWillEnterForeground:(UIApplication *)application {
  48 + // Called as part of the transition from the background to the active state; here you can undo many of the changes made on entering the background.
  49 +}
  50 +
  51 +
  52 +- (void)applicationDidBecomeActive:(UIApplication *)application {
  53 + // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
  54 +}
  55 +
  56 +
  57 +- (void)applicationWillTerminate:(UIApplication *)application {
  58 + // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
  59 +}
  60 +
  61 +
  62 +@end
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDKDemo/Assets.xcassets/AppIcon.appiconset/Contents.json 0 → 100644
  1 +{
  2 + "images" : [
  3 + {
  4 + "idiom" : "iphone",
  5 + "size" : "29x29",
  6 + "scale" : "2x"
  7 + },
  8 + {
  9 + "idiom" : "iphone",
  10 + "size" : "29x29",
  11 + "scale" : "3x"
  12 + },
  13 + {
  14 + "idiom" : "iphone",
  15 + "size" : "40x40",
  16 + "scale" : "2x"
  17 + },
  18 + {
  19 + "idiom" : "iphone",
  20 + "size" : "40x40",
  21 + "scale" : "3x"
  22 + },
  23 + {
  24 + "idiom" : "iphone",
  25 + "size" : "60x60",
  26 + "scale" : "2x"
  27 + },
  28 + {
  29 + "idiom" : "iphone",
  30 + "size" : "60x60",
  31 + "scale" : "3x"
  32 + },
  33 + {
  34 + "idiom" : "ipad",
  35 + "size" : "29x29",
  36 + "scale" : "1x"
  37 + },
  38 + {
  39 + "idiom" : "ipad",
  40 + "size" : "29x29",
  41 + "scale" : "2x"
  42 + },
  43 + {
  44 + "idiom" : "ipad",
  45 + "size" : "40x40",
  46 + "scale" : "1x"
  47 + },
  48 + {
  49 + "idiom" : "ipad",
  50 + "size" : "40x40",
  51 + "scale" : "2x"
  52 + },
  53 + {
  54 + "idiom" : "ipad",
  55 + "size" : "76x76",
  56 + "scale" : "1x"
  57 + },
  58 + {
  59 + "idiom" : "ipad",
  60 + "size" : "76x76",
  61 + "scale" : "2x"
  62 + }
  63 + ],
  64 + "info" : {
  65 + "version" : 1,
  66 + "author" : "xcode"
  67 + }
  68 +}
0 \ No newline at end of file 69 \ No newline at end of file
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDKDemo/Base.lproj/LaunchScreen.storyboard 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2 +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
  3 + <dependencies>
  4 + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
  5 + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
  6 + </dependencies>
  7 + <scenes>
  8 + <!--View Controller-->
  9 + <scene sceneID="EHf-IW-A2E">
  10 + <objects>
  11 + <viewController id="01J-lp-oVM" sceneMemberID="viewController">
  12 + <layoutGuides>
  13 + <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
  14 + <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
  15 + </layoutGuides>
  16 + <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
  17 + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
  18 + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
  19 + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  20 + </view>
  21 + </viewController>
  22 + <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
  23 + </objects>
  24 + <point key="canvasLocation" x="53" y="375"/>
  25 + </scene>
  26 + </scenes>
  27 +</document>
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDKDemo/Base.lproj/Main.storyboard 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8" standalone="no"?>
  2 +<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="11134" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES" initialViewController="BYZ-38-t0r">
  3 + <dependencies>
  4 + <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="11106"/>
  5 + <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
  6 + </dependencies>
  7 + <scenes>
  8 + <!--View Controller-->
  9 + <scene sceneID="tne-QT-ifu">
  10 + <objects>
  11 + <viewController id="BYZ-38-t0r" customClass="ViewController" customModuleProvider="" sceneMemberID="viewController">
  12 + <layoutGuides>
  13 + <viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
  14 + <viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
  15 + </layoutGuides>
  16 + <view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
  17 + <rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
  18 + <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
  19 + <color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
  20 + </view>
  21 + </viewController>
  22 + <placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
  23 + </objects>
  24 + </scene>
  25 + </scenes>
  26 +</document>
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDKDemo/CNLiveUploadController.h 0 → 100644
  1 +//
  2 +// CNLiveUploadController.h
  3 +// CNLiveUploadYunDemo
  4 +//
  5 +// Created by 张旭 on 2017/8/22.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +
  11 +@interface CNLiveUploadController : UIViewController
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDKDemo/CNLiveUploadController.m 0 → 100644
  1 +//
  2 +// CNLiveUploadController.m
  3 +// CNLiveUploadYunDemo
  4 +//
  5 +// Created by 张旭 on 2017/8/22.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import "CNLiveUploadController.h"
  10 +#import <AssetsLibrary/AssetsLibrary.h>
  11 +#import <CNLiveUploadYunSDK/CNLiveUploadYunSDK.h>
  12 +
  13 +#define mScreenWidth ([UIScreen mainScreen].bounds.size.width)
  14 +#define mScreenHeight ([UIScreen mainScreen].bounds.size.height)
  15 +#define mUserDefaults [NSUserDefaults standardUserDefaults]
  16 +#define FileBlockSize 5*1024*1024 //一块大小,分块最小5M
  17 +
  18 +//上传
  19 +#define kUploadBucketKey @"7.6M.mov" //上传时用到的bucket里文件的路径,此为在wz目录下7.6M.mov
  20 +#define kUploadBucketName @"compose" //上传所用的bucketName
  21 +#define keyUploadPartNum @"partNum" //需要app本地存储已经传成功的块号,demo为了演示,用NSUserDefaults存储,app可用数据库等
  22 +#define keyUploadId @"uploadId" //需要app本地存储已经初始化成功的uploadId,用于断点续传,demo为了演示,用NSUserDefaults存储,app可用数据库等
  23 +
  24 +@interface CNLiveUploadController ()<UITableViewDelegate,UITableViewDataSource,KingSoftServiceRequestDelegate>
  25 +
  26 +@property (nonatomic ,strong) UITableView * tableView;
  27 +
  28 +@property (assign, nonatomic) long long fileSize;
  29 +@property (assign, nonatomic) NSInteger partSize;
  30 +@property (assign, nonatomic) long long partLength;
  31 +@property (nonatomic) NSInteger uploadNum;
  32 +@property (nonatomic) NSInteger totalNum;
  33 +@property (strong, nonatomic) NSFileHandle *fileHandle;
  34 +@property (nonatomic, strong) NSArray *arrItems;
  35 +@property (strong, nonatomic) CNLiveMultipartUpload *muilt;
  36 +
  37 +@end
  38 +
  39 +@implementation CNLiveUploadController
  40 +
  41 +- (void)viewDidLoad {
  42 + [super viewDidLoad];
  43 + // Do any additional setup after loading the view.
  44 + self.view.backgroundColor = [UIColor whiteColor];
  45 + self.navigationItem.title = @"上传";
  46 + _arrItems = [NSArray arrayWithObjects:@"Multipart Upload", @"Abort Upload", @"Put Object", nil];
  47 +
  48 + self.tableView = [[UITableView alloc] initWithFrame:self.view.bounds];
  49 + [self.tableView registerClass:[UITableViewCell class] forCellReuseIdentifier:@"CNLiveUpload"];
  50 + [self.view addSubview:self.tableView];
  51 + self.tableView.delegate = self;
  52 + self.tableView.dataSource = self;
  53 +}
  54 +
  55 +#pragma mark 相册方法
  56 +/*
  57 + 这里,枚举模拟器相册所有的视频,模拟器只有一个只能获得开头传入的7.6M视频,
  58 + 具体工程使用时根据具体逻辑,获取到Alasset即可
  59 + KS3Client 方法:
  60 + - (NSData *)getUploadPartDataWithPartNum:(NSInteger)partNum
  61 + partLength:(NSInteger)partlength
  62 + alassetURL:(NSURL *)alassetURL;
  63 +
  64 + - (NSData *)getUploadPartDataWithPartNum:(NSInteger)partNum
  65 + partLength:(NSInteger)partlength
  66 + Alasset:(ALAsset *)assets;
  67 +
  68 + - (ALAsset *)getAlassetFromAlassetURL:(NSURL *)alassetURL;
  69 +
  70 + */
  71 +- (ALAsset *)getAlasset
  72 +{
  73 + ALAssetsLibrary *assetsLibrary = [[ALAssetsLibrary alloc]init];
  74 + __block ALAsset *assets ;
  75 + dispatch_semaphore_t sem= dispatch_semaphore_create(0);
  76 + dispatch_queue_t concurrentQueue = dispatch_queue_create("my.concurrent.queue", DISPATCH_QUEUE_SERIAL);
  77 + dispatch_async(concurrentQueue, ^{
  78 + [assetsLibrary enumerateGroupsWithTypes:ALAssetsGroupAll usingBlock:^(ALAssetsGroup *group, BOOL *stop) {
  79 + if (group) {
  80 + [group setAssetsFilter:[ALAssetsFilter allVideos]];
  81 + [group enumerateAssetsUsingBlock:^(ALAsset *result, NSUInteger index, BOOL *stop) {
  82 + if (result) {
  83 + assets = result;
  84 + NSLog(@"url = %@",assets.defaultRepresentation.url);
  85 + dispatch_semaphore_signal(sem);
  86 + return ;
  87 + }
  88 + }];
  89 + dispatch_semaphore_signal(sem);
  90 + }else
  91 + {
  92 + // NSLog(@"group为空,枚举失败");
  93 + }
  94 + dispatch_semaphore_signal(sem);
  95 + } failureBlock:^(NSError *error) {
  96 +
  97 + NSLog(@"请到设置->隐私->照片中开启,访问照片库的权限");
  98 + dispatch_semaphore_signal(sem);
  99 + }];
  100 + });
  101 +
  102 + dispatch_semaphore_wait(sem, DISPATCH_TIME_FOREVER);
  103 +
  104 + return assets;
  105 +}
  106 +
  107 +#pragma mark 上传方法
  108 +/*
  109 + 当文件大于100MB的时候,可以选择分块上传。把大文件进行切割上传到服务器。 分块上传分为三步:
  110 + Initiate Multipart Upload 初始化分块上传
  111 + Upload Part 上传文件块
  112 + Complete Multipart Upload 完成分块上传
  113 + 上传中,你可以使用Abort Multipart Upload取消上传,或者List Parts查看上传的分块。或者List Multipart Uploads查看当前的bucket下有多少个uploadid。
  114 +
  115 + 分块上传断点续传原理:
  116 + 上传为了简化流程的复杂度,每次都是从初始化从头开始,依步骤进行:
  117 + 1.初始化上传,发initMultiUpload请求,并记录uploadId,如果已存在uploadID,用已经存在的uploadID,进行第二步
  118 + 2.分块上传数据块,一块一块串行的发uploadPart请求,直至所有块传输成功。若中间断开,从第一步重新开始。
  119 + 3.完成上传,发complete请求,httpCode = 200,成功
  120 +
  121 + Tips:1.基于分块上传的原理,上传暂停继续会有最多一个块的进度回退。
  122 + 2.分块上传最小为5M一块,小于5M请使用单块上传,Put Object方法
  123 +
  124 + */
  125 +- (void)beginMultipartUpload
  126 +{
  127 + NSString *strKey = kUploadBucketKey; //key 为在bucket下的路径,demo中为根目录下7.6M.mov路径
  128 + _partSize = 5; // 文件大于5M为最小5M一块
  129 +
  130 + CNLiveAccessControlList *acl = [[CNLiveAccessControlList alloc] init];
  131 + [acl setContronAccess:CNLiveYun_Permission_Public_Read];
  132 +
  133 + CNLiveInitiateMultipartUploadRequest *initMultipartUploadReq = [[CNLiveInitiateMultipartUploadRequest alloc] initWithKey:strKey inBucket:kUploadBucketName acl:acl grantAcl:nil];
  134 + [initMultipartUploadReq setCompleteRequest];
  135 +
  136 + NSArray *array = [initMultipartUploadReq.CNYHeader componentsSeparatedByString:@"\n"];
  137 + NSString *headers = [array firstObject];
  138 +
  139 + [CNLiveUpload getTokenWithMd5:initMultipartUploadReq.contentMd5 verb:initMultipartUploadReq.httpMethod type:initMultipartUploadReq.contentType res:initMultipartUploadReq.CNYResource headers:headers date:initMultipartUploadReq.strDate success:^(NSString *token) {
  140 + [initMultipartUploadReq setStrCNLiveToken:token];
  141 +
  142 + _muilt = [[CNLiveClient initialize] initiateMultipartUploadWithRequest:initMultipartUploadReq];
  143 +
  144 + if (_muilt == nil) {
  145 + NSLog(@"####Init upload failed, please check access key, secret key and bucket name!####");
  146 + return ;
  147 + }
  148 +
  149 + //选择相册还是普通方式
  150 + _muilt.uploadType = kCNLiveUploadNormal;
  151 +
  152 + //根据文件路径不一样,有如下两种上传
  153 + if (_muilt.uploadType == kCNLiveUploadNormal) { //如果是沙盒或者工程里的文件
  154 + //工程里,沙盒里,是沙盒路径
  155 + NSString *strFilePath = [[NSBundle mainBundle] pathForResource:@"7.6M" ofType:@"mov"];
  156 + _fileHandle = [NSFileHandle fileHandleForReadingAtPath:strFilePath];
  157 + _fileSize = [_fileHandle availableData].length;
  158 + if (_fileSize <= 0) {
  159 + NSLog(@"####This file is not exist!####");
  160 + return ;
  161 + }
  162 + if (!(_partSize > 0 || _partSize != 0)) {
  163 + _partLength = _fileSize;
  164 + }else{
  165 + _partLength = _partSize * 1024.0 * 1024.0;
  166 + }
  167 + _totalNum = (ceilf((float)_fileSize / (float)_partLength));
  168 + [_fileHandle seekToFileOffset:0];
  169 + }else
  170 + {
  171 + //如果是相册里的,从这传
  172 + ALAssetRepresentation *assetD = [self getAlasset].defaultRepresentation;
  173 + _fileSize = assetD.size;
  174 + if (_fileSize <= 0) {
  175 + NSLog(@"####This file is not exist!####");
  176 + return ;
  177 + }
  178 + if (!(_partSize > 0 || _partSize != 0)) {
  179 + _partLength = _fileSize;
  180 + }else{
  181 + _partLength = _partSize * 1024.0 * 1024.0;
  182 + }
  183 + _totalNum = (ceilf((float)_fileSize / (float)_partLength));
  184 + }
  185 +
  186 +#warning 上传的断点续传判断:初始化上传后,开始上传前,此处需要list一下所有的数据块,如果uploadID是新生成的,可以跳过list过程从第一块开始传,如果上传是断点续传,需用初始化用到的uploadId,list一下所有已经传过的数据块,再从暂停块上传即可, 这里用NSUserDefault演示存储过程。
  187 + //判断uploadId是否存在,进而进行上传的断点续传
  188 + if ([mUserDefaults objectForKey:keyUploadId] == nil) {
  189 + [mUserDefaults setObject:_muilt.uploadId forKey:keyUploadId];
  190 + [mUserDefaults synchronize];
  191 + _uploadNum = 1;
  192 + [self uploadWithPartNumber:_uploadNum];
  193 + }else
  194 + {
  195 + _muilt.uploadId = [mUserDefaults objectForKey:keyUploadId];
  196 + //list一下所有上传过的块
  197 + CNLiveListPartsRequest *req2 = [[CNLiveListPartsRequest alloc] initWithMultipartUpload:_muilt];
  198 + [req2 setCompleteRequest];
  199 +
  200 + //使用token签名时从Appserver获取token后设置token,使用Ak sk则忽略,不需要调用
  201 +
  202 + [CNLiveUpload getTokenWithMd5:req2.contentMd5 verb:req2.httpMethod type:req2.contentType res:req2.CNYResource headers:headers date:req2.strDate success:^(NSString *token) {
  203 + [req2 setStrCNLiveToken:token];
  204 +
  205 + CNLiveListPartsResponse *response2 = [[CNLiveClient initialize] listParts:req2];
  206 +
  207 + NSLog(@"response.listResult.parts.count =%lu",(unsigned long)[response2.listResult.parts count]);
  208 +
  209 + //从这块开始上传,list结果的最后一块
  210 + _uploadNum = ((CNLivePart *)[response2.listResult.parts lastObject]).partNumber + 1 ;
  211 +
  212 + //进度补齐
  213 + long long alreadyTotalWriten = (_uploadNum - 1) * _partLength ;
  214 + double progress = alreadyTotalWriten / (float)_fileSize;
  215 + UIProgressView *progressView = (UIProgressView *)[self.view viewWithTag:199];
  216 + progressView.progress = progress;
  217 + [self uploadWithPartNumber:_uploadNum];
  218 + } failure:^(NSDictionary *error) {
  219 +
  220 + }];
  221 + }
  222 + //initMultipartUploadReq.strDate = @"Fri, 15 Jul 2016 09:21:30 GMT";
  223 + //initMultipartUploadReq.strKS3Token = @"KSS JYWSSnN5qY/hFiWg/Y1V:s1ICTedN7C+QqGFMD1FQYj6/bYA=";
  224 + } failure:^(NSDictionary *error) {
  225 +
  226 + }];
  227 +}
  228 +
  229 +
  230 +- (void)uploadWithPartNumber:(NSInteger)partNumber
  231 +{
  232 + @autoreleasepool {
  233 + //如果暂停,恢复上传
  234 + if (_muilt.isPaused == YES || _muilt.isCanceled == YES ) {
  235 + [_muilt proceed];
  236 + }
  237 + NSData *data = nil;
  238 + if (_muilt.uploadType == kCNLiveUploadAlasset) {
  239 + //相册信息
  240 + data = [[CNLiveClient initialize] getUploadPartDataWithPartNum:partNumber partLength:FileBlockSize Alasset:[self getAlasset]];
  241 + }else
  242 + {
  243 + //沙盒路径
  244 + if (_uploadNum == _totalNum) {
  245 + [_fileHandle seekToFileOffset:_partLength *(_uploadNum - 1 )];
  246 + data = [_fileHandle readDataToEndOfFile];
  247 + }else {
  248 + data = [_fileHandle readDataOfLength:(NSUInteger)_partLength];
  249 + [_fileHandle seekToFileOffset:_partLength*(_uploadNum)];
  250 + }
  251 + }
  252 +
  253 + CNLiveUploadPartRequest *req = [[CNLiveUploadPartRequest alloc] initWithMultipartUpload:_muilt partNumber:(int32_t)partNumber data:data generateMD5:NO];
  254 + req.delegate = self;
  255 + req.contentLength = data.length;
  256 + req.contentMd5 = [CNLiveSDKUtil base64md5FromData:data];
  257 + [req setCompleteRequest];
  258 +
  259 + NSArray *array = [req.CNYHeader componentsSeparatedByString:@"\n"];
  260 + NSString *headers = [array firstObject];
  261 +
  262 + [CNLiveUpload getTokenWithMd5:req.contentMd5 verb:req.httpMethod type:req.contentType res:req.CNYResource headers:headers date:req.strDate success:^(NSString *token) {
  263 + //使用token签名时从Appserver获取token后设置token,使用Ak sk则忽略,不需要调用
  264 + [req setStrCNLiveToken:token];
  265 +
  266 + [[CNLiveClient initialize] uploadPart:req];
  267 + } failure:^(NSDictionary *error) {
  268 +
  269 + }];
  270 + }
  271 +}
  272 +//取消上传,调用abort 接口,终止上传,修改进度条即可
  273 +- (void)cancelMultipartUpload
  274 +{
  275 + if (_muilt == nil) {
  276 + NSLog(@"请先创建上传,再调用Abort");
  277 + return;
  278 + }
  279 +
  280 + CNLiveAbortMultipartUploadRequest *request = [[CNLiveAbortMultipartUploadRequest alloc] initWithMultipartUpload:_muilt];
  281 + [request setCompleteRequest];
  282 +
  283 + NSArray *array = [request.CNYHeader componentsSeparatedByString:@"\n"];
  284 + NSString *headers = [array firstObject];
  285 +
  286 + [CNLiveUpload getTokenWithMd5:request.contentMd5 verb:request.httpMethod type:request.contentType res:request.CNYResource headers:headers date:request.strDate success:^(NSString *token) {
  287 + [request setStrCNLiveToken:token];
  288 +
  289 + CNLiveAbortMultipartUploadResponse *response = [[CNLiveClient initialize] abortMultipartUpload:request];
  290 + if (response.httpStatusCode == 204) {
  291 + NSLog(@"Abort multipart upload success!");
  292 + [_muilt cancel];
  293 + [mUserDefaults setObject:nil forKey:keyUploadId];
  294 + [mUserDefaults setInteger:0 forKey:keyUploadPartNum];
  295 + [mUserDefaults synchronize];
  296 + UIProgressView *progressView = (UIProgressView *)[self.view viewWithTag:199];
  297 + progressView.progress = 0;
  298 + }
  299 + else {
  300 + NSLog(@"error: %@", response.error.description);
  301 + }
  302 + } failure:^(NSDictionary *error) {
  303 +
  304 + }];
  305 +}
  306 +
  307 +//若不选择分块上传,请使用单块上传,
  308 +//最小支持但块上传小于5M,最大支持单块上传为5G
  309 +- (void)beginSingleUpload:(NSInteger) row
  310 +{
  311 + CNLiveAccessControlList *ControlList = [[CNLiveAccessControlList alloc] init];
  312 + [ControlList setContronAccess:CNLiveYun_Permission_Public_Read_Write];
  313 + CNLivePutObjectRequest *putObjRequest = [[CNLivePutObjectRequest alloc] initWithName:kUploadBucketName withAcl:ControlList grantAcl:nil];
  314 +
  315 + NSString *fileName = [[NSBundle mainBundle] pathForResource:@"7.6M" ofType:@"mov"];
  316 + putObjRequest.data = [NSData dataWithContentsOfFile:fileName options:NSDataReadingMappedIfSafe error:nil];
  317 +
  318 + _fileSize = putObjRequest.data.length;
  319 +
  320 + putObjRequest.delegate = self;
  321 + putObjRequest.filename = kUploadBucketKey;
  322 + putObjRequest.contentMd5 = [CNLiveSDKUtil base64md5FromData:putObjRequest.data];
  323 + [putObjRequest setCompleteRequest];
  324 +
  325 + NSArray *array = [putObjRequest.CNYHeader componentsSeparatedByString:@"\n"];
  326 + NSString *headers = [array firstObject];
  327 +
  328 + [CNLiveUpload getTokenWithMd5:putObjRequest.contentMd5 verb:putObjRequest.httpMethod type:putObjRequest.contentType res:putObjRequest.CNYResource headers:headers date:putObjRequest.strDate success:^(NSString *token) {
  329 + [putObjRequest setStrCNLiveToken:token];
  330 +
  331 + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
  332 + CNLivePutObjectResponse *response = [[CNLiveClient initialize] putObject:putObjRequest];
  333 +
  334 + //putObjRequest若没设置代理,则是同步的下方判断,
  335 + //putObjRequest若设置了代理,则走上传代理回调,
  336 + if (putObjRequest.delegate == nil) {
  337 + NSLog(@"%@",[[NSString alloc] initWithData:response.body encoding:NSUTF8StringEncoding]);
  338 + if (response.httpStatusCode == 200) {
  339 + NSLog(@"Put object success");
  340 + }
  341 + else {
  342 + NSLog(@"Put object failed");
  343 + }
  344 + }
  345 + });
  346 + } failure:^(NSDictionary *error) {
  347 + NSLog(@"error %@",error);
  348 + }];
  349 +}
  350 +
  351 +#pragma mark - Action
  352 +- (void)uploadBtnClicked:(UIButton *)btn
  353 +{
  354 + btn.selected =! btn.selected;
  355 + if (btn.selected) {
  356 + [btn setTitle:@"暂停" forState:UIControlStateNormal];
  357 + [self beginMultipartUpload];
  358 + }else
  359 + {
  360 + if ([btn.titleLabel.text isEqualToString: @"完成" ]) {
  361 + UIProgressView *progressView = (UIProgressView *)[self.view viewWithTag:199];
  362 + progressView.progress = 0;
  363 + [btn setTitle:@"开始" forState:UIControlStateNormal];
  364 + return;
  365 + }
  366 + [_muilt pause];
  367 + [btn setTitle:@"继续" forState:UIControlStateNormal];
  368 + }
  369 +}
  370 +
  371 +#pragma mark - UITableView datasource
  372 +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  373 +{
  374 + return _arrItems.count;
  375 +}
  376 +
  377 +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  378 +{
  379 + NSString *strIdentifier = @"CNLiveUpload";
  380 + UITableViewCell *cell;
  381 + if (nil == cell) {
  382 + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:strIdentifier];
  383 +
  384 + if (indexPath.row == 0) { //分块上传
  385 + UIProgressView *progressView = [[UIProgressView alloc] initWithFrame:CGRectMake(mScreenWidth * .4 , 20, mScreenWidth * .45, 20)];
  386 + progressView.progressViewStyle = UIProgressViewStyleDefault;
  387 + progressView.tag = 199;
  388 + NSInteger finishCount = [mUserDefaults integerForKey:keyUploadPartNum];
  389 +
  390 + progressView.progress = finishCount * FileBlockSize * 1.0 / _fileSize;
  391 + [cell.contentView addSubview:progressView];
  392 +
  393 + UIButton *uploadBtn = [[UIButton alloc]initWithFrame:CGRectMake(mScreenWidth - 50, 10, 40, 20)];
  394 + [uploadBtn setTitle:@"开始" forState:UIControlStateNormal];
  395 + uploadBtn.titleLabel.font = [UIFont systemFontOfSize:14];
  396 + [uploadBtn setTitleColor:[UIColor blueColor] forState:UIControlStateNormal];
  397 + uploadBtn.tag = 200;
  398 + [uploadBtn addTarget:self action:@selector(uploadBtnClicked:) forControlEvents:UIControlEventTouchUpInside];
  399 + [cell.contentView addSubview:uploadBtn];
  400 + }
  401 + }
  402 + cell.textLabel.text = _arrItems[indexPath.row];
  403 + return cell;
  404 +}
  405 +
  406 +#pragma mark - UITableView delegate
  407 +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  408 +{
  409 + switch (indexPath.row) {
  410 + case 0:
  411 + {
  412 + //放在点击事件里,uploadBtnClicked
  413 + }
  414 + break;
  415 + case 1:
  416 + {
  417 + [self cancelMultipartUpload];
  418 + }
  419 + break;
  420 + case 2:
  421 + {
  422 + [self beginSingleUpload:indexPath.row];
  423 + }
  424 + break;
  425 + default:
  426 + break;
  427 + }
  428 +}
  429 +
  430 +#pragma mark - 上传的回调方法
  431 +
  432 +- (void)request:(KS3Request *)request didCompleteWithResponse:(KS3Response *)response
  433 +{
  434 + if ([request isKindOfClass:[KS3PutObjectRequest class]]) {
  435 + if (response.httpStatusCode == 200) {
  436 + NSLog(@"单块上传成功");
  437 + }else
  438 + {
  439 + NSLog(@"单块上传失败");
  440 + }
  441 +
  442 + return;
  443 + }else if ([request isKindOfClass:[KS3UploadPartRequest class]])
  444 + {
  445 + [mUserDefaults setInteger:_uploadNum forKey:keyUploadPartNum];
  446 + [mUserDefaults synchronize];
  447 + _uploadNum ++;
  448 +
  449 + if (_totalNum < _uploadNum) {
  450 + CNLiveListPartsRequest *req2 = [[CNLiveListPartsRequest alloc] initWithMultipartUpload:_muilt];
  451 + [req2 setCompleteRequest];
  452 +
  453 + NSArray *array = [req2.CNYHeader componentsSeparatedByString:@"\n"];
  454 + NSString *headers = [array firstObject];
  455 +
  456 + [CNLiveUpload getTokenWithMd5:req2.contentMd5 verb:req2.httpMethod type:req2.contentType res:req2.CNYResource headers:headers date:req2.strDate success:^(NSString *token) {
  457 + [req2 setStrCNLiveToken:token];
  458 +
  459 + CNLiveListPartsResponse *response2 = [[CNLiveClient initialize] listParts:req2];
  460 + CNLiveCompleteMultipartUploadRequest *req = [[CNLiveCompleteMultipartUploadRequest alloc] initWithMultipartUpload:_muilt];
  461 + NSLog(@"%@",response2.listResult.parts);
  462 + for (KS3Part *part in response2.listResult.parts) {
  463 + [req addPartWithPartNumber:part.partNumber withETag:part.etag];
  464 + }
  465 + //req参数设置完一定要调这个函数
  466 + [req setCompleteRequest];
  467 +
  468 + NSArray *array1 = [req.CNYHeader componentsSeparatedByString:@"\n"];
  469 + NSString *headers1 = [array1 firstObject];
  470 +
  471 + [CNLiveUpload getTokenWithMd5:req.contentMd5 verb:req.httpMethod type:req.contentType res:req.CNYResource headers:headers1 date:req.strDate success:^(NSString *token) {
  472 + [req setStrCNLiveToken:token];
  473 +
  474 + CNLiveCompleteMultipartUploadResponse *resp = [[CNLiveClient initialize] completeMultipartUpload:req];
  475 + NSString *bodyStr = [[NSString alloc]initWithData:resp.body encoding:NSUTF8StringEncoding];
  476 + if (resp.httpStatusCode != 200) {
  477 + NSLog(@"#####complete multipart upload failed!!! code: %d#####,body = %@", resp.httpStatusCode,bodyStr);
  478 + }else if (resp.httpStatusCode == 200)
  479 + {
  480 + NSLog(@"分块上传成功!!");
  481 + [mUserDefaults setObject:nil forKey:keyUploadId];
  482 + [mUserDefaults setInteger:0 forKey:keyUploadPartNum];
  483 + _uploadNum = 0 ;
  484 + [mUserDefaults synchronize];
  485 + }
  486 + } failure:^(NSDictionary *error) {
  487 +
  488 + }];
  489 + } failure:^(NSDictionary *error) {
  490 +
  491 + }];
  492 + }
  493 + else {
  494 + [self uploadWithPartNumber:_uploadNum];
  495 + }
  496 + }
  497 +}
  498 +
  499 +- (void)request:(KS3Request *)request didFailWithError:(NSError *)error
  500 +{
  501 + NSLog(@"upload error: %@", error);
  502 +}
  503 +
  504 +- (void)request:(KS3Request *)request didReceiveResponse:(NSURLResponse *)response
  505 +{
  506 + NSInteger statusCode = ((NSHTTPURLResponse*) response).statusCode;
  507 + if ( (statusCode>= 200 && statusCode <300) || statusCode == 304) {
  508 + NSLog(@"Put object success");
  509 + }
  510 + else {
  511 + NSLog(@"Put object failed");
  512 + }
  513 +
  514 +}
  515 +
  516 +- (void)request:(KS3Request *)request didReceiveData:(NSData *)data
  517 +{
  518 + /**
  519 + * Never call this method, because it's upload
  520 + *
  521 + * @return <#return value description#>
  522 + */
  523 +}
  524 +
  525 +-(void)request:(KS3Request *)request didSendData:(long long)bytesWritten totalBytesWritten:(long long)totalBytesWritten totalBytesExpectedToWrite:(long long)totalBytesExpectedToWrite
  526 +{
  527 + UIProgressView *progressView = (UIProgressView *)[self.view viewWithTag:199];
  528 + UIButton *button = (UIButton *)[self.view viewWithTag:200];
  529 +
  530 + if ([request isKindOfClass:[KS3PutObjectRequest class]]) {
  531 +
  532 + long long alreadyTotalWriten = totalBytesWritten;
  533 + double progress = alreadyTotalWriten * 1.0 / _fileSize;
  534 + NSLog(@"upload progress: %f", progress);
  535 + // progressView.progress = progress;
  536 + }else if([request isKindOfClass:[KS3UploadPartRequest class]])
  537 + {
  538 + if (_muilt.isCanceled ) {
  539 + [request cancel];
  540 + [button setTitle:@"开始" forState:UIControlStateNormal];
  541 + button.selected = NO;
  542 + progressView.progress = 0;
  543 + return;
  544 + }
  545 +
  546 + long long alreadyTotalWriten = (_uploadNum - 1) * _partLength + totalBytesWritten;
  547 + double progress = alreadyTotalWriten / (float)_fileSize;
  548 + NSLog(@"upload progress: %f", progress);
  549 + progressView.progress = progress;
  550 + if (progress == 1) {
  551 + [_fileHandle closeFile];
  552 + [button setTitle:@"完成" forState:UIControlStateNormal];
  553 + }
  554 + }
  555 +}
  556 +
  557 +- (void)didReceiveMemoryWarning {
  558 + [super didReceiveMemoryWarning];
  559 + // Dispose of any resources that can be recreated.
  560 +}
  561 +
  562 +/*
  563 +#pragma mark - Navigation
  564 +
  565 +// In a storyboard-based application, you will often want to do a little preparation before navigation
  566 +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
  567 + // Get the new view controller using [segue destinationViewController].
  568 + // Pass the selected object to the new view controller.
  569 +}
  570 +*/
  571 +
  572 +@end
  573 +
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDKDemo/Info.plist 0 → 100644
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
  3 +<plist version="1.0">
  4 +<dict>
  5 + <key>CFBundleDevelopmentRegion</key>
  6 + <string>en</string>
  7 + <key>CFBundleExecutable</key>
  8 + <string>$(EXECUTABLE_NAME)</string>
  9 + <key>CFBundleIdentifier</key>
  10 + <string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
  11 + <key>CFBundleInfoDictionaryVersion</key>
  12 + <string>6.0</string>
  13 + <key>CFBundleName</key>
  14 + <string>$(PRODUCT_NAME)</string>
  15 + <key>CFBundlePackageType</key>
  16 + <string>APPL</string>
  17 + <key>CFBundleShortVersionString</key>
  18 + <string>1.0</string>
  19 + <key>CFBundleVersion</key>
  20 + <string>1</string>
  21 + <key>LSRequiresIPhoneOS</key>
  22 + <true/>
  23 + <key>NSAppTransportSecurity</key>
  24 + <dict>
  25 + <key>NSAllowsArbitraryLoads</key>
  26 + <true/>
  27 + </dict>
  28 + <key>UILaunchStoryboardName</key>
  29 + <string>LaunchScreen</string>
  30 + <key>UIMainStoryboardFile</key>
  31 + <string>Main</string>
  32 + <key>UIRequiredDeviceCapabilities</key>
  33 + <array>
  34 + <string>armv7</string>
  35 + </array>
  36 + <key>UISupportedInterfaceOrientations</key>
  37 + <array>
  38 + <string>UIInterfaceOrientationPortrait</string>
  39 + <string>UIInterfaceOrientationLandscapeLeft</string>
  40 + <string>UIInterfaceOrientationLandscapeRight</string>
  41 + </array>
  42 + <key>UISupportedInterfaceOrientations~ipad</key>
  43 + <array>
  44 + <string>UIInterfaceOrientationPortrait</string>
  45 + <string>UIInterfaceOrientationPortraitUpsideDown</string>
  46 + <string>UIInterfaceOrientationLandscapeLeft</string>
  47 + <string>UIInterfaceOrientationLandscapeRight</string>
  48 + </array>
  49 +</dict>
  50 +</plist>
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDKDemo/ViewController.h 0 → 100644
  1 +//
  2 +// ViewController.h
  3 +// CNLiveUploadYunSDKDemo
  4 +//
  5 +// Created by iOS on 2017/8/28.
  6 +// Copyright © 2017年 zhulin. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +
  11 +@interface ViewController : UIViewController
  12 +
  13 +
  14 +@end
  15 +
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDKDemo/ViewController.m 0 → 100644
  1 +//
  2 +// ViewController.m
  3 +// CNLiveUploadYunSDKDemo
  4 +//
  5 +// Created by iOS on 2017/8/28.
  6 +// Copyright © 2017年 zhulin. All rights reserved.
  7 +//
  8 +
  9 +#import "ViewController.h"
  10 +
  11 +@interface ViewController ()
  12 +
  13 +@end
  14 +
  15 +@implementation ViewController
  16 +
  17 +- (void)viewDidLoad {
  18 + [super viewDidLoad];
  19 + // Do any additional setup after loading the view, typically from a nib.
  20 +}
  21 +
  22 +
  23 +- (void)didReceiveMemoryWarning {
  24 + [super didReceiveMemoryWarning];
  25 + // Dispose of any resources that can be recreated.
  26 +}
  27 +
  28 +
  29 +@end
CNLiveUploadYunSDKDemo/CNLiveUploadYunSDKDemo/main.m 0 → 100644
  1 +//
  2 +// main.m
  3 +// CNLiveUploadYunSDKDemo
  4 +//
  5 +// Created by iOS on 2017/8/28.
  6 +// Copyright © 2017年 zhulin. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +#import "AppDelegate.h"
  11 +
  12 +int main(int argc, char * argv[]) {
  13 + @autoreleasepool {
  14 + return UIApplicationMain(argc, argv, nil, NSStringFromClass([AppDelegate class]));
  15 + }
  16 +}
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3AbortMultipartUploadRequest.h 0 → 100755
  1 +//
  2 +// KSS3AbortMultipartUploadRequest.h
  3 +// KS3iOSSDKDemo
  4 +//
  5 +// Created by Blues on 12/18/14.
  6 +// Copyright (c) 2014 Blues. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3MultipartUpload.h"
  10 +#import "KS3Request.h"
  11 +
  12 +@interface KS3AbortMultipartUploadRequest : KS3Request
  13 +
  14 +@property(strong, nonatomic) NSString *key;
  15 +@property(strong, nonatomic) NSString *uploadId;
  16 +
  17 +- (instancetype)initWithName:(NSString *)bucketName;
  18 +- (id)initWithMultipartUpload:(KS3MultipartUpload *)multipartUpload;
  19 +
  20 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3AbortMultipartUploadResponse.h 0 → 100755
  1 +//
  2 +// KSS3AbortMultipartUploadResponse.h
  3 +// KS3iOSSDKDemo
  4 +//
  5 +// Created by Blues on 12/18/14.
  6 +// Copyright (c) 2014 Blues. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +@interface KS3AbortMultipartUploadResponse : KS3Response
  11 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3AbstractPutRequest.h 0 → 100755
  1 +//
  2 +// KSS3AbstractPutRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +@interface KS3AbstractPutRequest : KS3Request
  11 +
  12 +- (void)addMetadataWithValue:(NSString *)value forKey:(NSString *)aKey;
  13 +
  14 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3AbstractWebServiceClient.h 0 → 100755
  1 +//
  2 +// KingSoftAbstractWebServiceClient.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface KS3AbstractWebServiceClient : NSObject
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3AccessControlList.h 0 → 100755
  1 +//
  2 +// KSS3AccessControlList.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +typedef NS_ENUM(NSInteger, KingSoftYun_PermissionACLType) {
  12 + KingSoftYun_Permission_Private,
  13 + KingSoftYun_Permission_Public_Read,
  14 + KingSoftYun_Permission_Public_Read_Write,
  15 + KingSoftYun_Permission_Authenticated_Read,
  16 +
  17 +};
  18 +
  19 +@interface KS3AccessControlList : NSObject
  20 +@property(strong, nonatomic) NSString *accessACL;
  21 +
  22 +- (NSString *)setContronAccess:(KingSoftYun_PermissionACLType)aclType;
  23 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3AuthUtils.h 0 → 100755
  1 +//
  2 +// KingSoftAuthUtils.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3AuthUtils.h"
  10 +#import <Foundation/Foundation.h>
  11 +typedef enum {
  12 + KSS3_HTTPVerbGet,
  13 + KSS3_HTTPVerbPost,
  14 + KSS3_HTTPVerbPut,
  15 + KSS3_HTTPVerbDelete,
  16 + KSS3_HTTPVerbHead,
  17 +} KSS3_HTTPVerbType;
  18 +
  19 +@class KS3ServiceRequest;
  20 +@class KS3Credentials;
  21 +@class KS3URLRequest;
  22 +
  23 +@interface KS3AuthUtils : NSObject
  24 +
  25 ++ (NSString *)KSYSignatureWithSecretKey:(NSString *)secretKey
  26 + httpVerb:(NSString *)httpVerb
  27 + contentMd5:(NSString *)strContentMd5
  28 + contentType:(NSString *)strContentType
  29 + date:(NSDate *)date
  30 + canonicalizedKssHeader:(NSString *)strHeaders
  31 + canonicalizedResource:(NSString *)strResource;
  32 +
  33 ++ (NSString *)KSYSignatureWithSecretKey:(NSString *)secretKey
  34 + httpVerb:(NSString *)httpVerb
  35 + contentMd5:(NSString *)strContentMd5
  36 + contentType:(NSString *)strContentType
  37 + strDate:(NSString *)strDate
  38 + canonicalizedKssHeader:(NSString *)strHeaders
  39 + canonicalizedResource:(NSString *)strResource;
  40 +
  41 ++ (NSString *)KSYAuthorizationWithAccessKey:(NSString *)accessKey
  42 + secretKey:(NSString *)secretKey
  43 + httpVerbType:(KSS3_HTTPVerbType)httpVerb
  44 + contentMd5:(NSString *)strContentMd5
  45 + contentType:(NSString *)strContentType
  46 + date:(NSDate *)date
  47 + canonicalizedKssHeader:(NSString *)strHeaders
  48 + canonicalizedResource:(NSString *)strResource;
  49 +
  50 ++ (NSString *)strDateWithDate:(NSDate *)date andType:(NSString *)strType;
  51 +
  52 ++ (void)signRequestV4:(KS3ServiceRequest *)serviceRequest
  53 + urlRequest:(KS3URLRequest *)urlRequest
  54 + headers:(NSMutableDictionary *)headers
  55 + payload:(NSString *)payload
  56 + credentials:(KS3Credentials *)credentials;
  57 +
  58 ++ (NSString *)KSYAuthorizationWithAccessKey:(NSString *)accessKey
  59 + secretKey:(NSString *)secretKey
  60 + httpVerb:(NSString *)httpVerb
  61 + contentMd5:(NSString *)strContentMd5
  62 + contentType:(NSString *)strContentType
  63 + date:(NSDate *)date
  64 + canonicalizedKssHeader:(NSString *)strHeaders
  65 + canonicalizedResource:(NSString *)strResource;
  66 +
  67 ++ (NSString *)KSYAuthorizationWithAccessKey:(NSString *)accessKey
  68 + secretKey:(NSString *)secretKey
  69 + httpVerb:(NSString *)httpVerb
  70 + contentMd5:(NSString *)strContentMd5
  71 + contentType:(NSString *)strContentType
  72 + strDate:(NSString *)strDate
  73 + canonicalizedKssHeader:(NSString *)strHeaders
  74 + canonicalizedResource:(NSString *)strResource;
  75 +
  76 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3Bucket.h 0 → 100755
  1 +//
  2 +// KSS3Buckket.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface KS3Bucket : NSObject
  12 +
  13 +@property(strong, nonatomic) NSString *name;
  14 +@property(strong, nonatomic) NSString *creationDate;
  15 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3BucketACLResult.h 0 → 100755
  1 +//
  2 +// KSS3BucketACLResult.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Grant.h"
  10 +#import "KS3Owner.h"
  11 +#import <Foundation/Foundation.h>
  12 +
  13 +@interface KS3BucketACLResult : NSObject
  14 +@property(strong, nonatomic) KS3Owner *owner;
  15 +@property(strong, nonatomic) NSMutableArray *accessControlList;
  16 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3BucketACLXMLParser.h 0 → 100755
  1 +//
  2 +// KSS3BucketACLXMLParser.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3BucketACLResult.h"
  10 +#import <Foundation/Foundation.h>
  11 +
  12 +@interface KS3BucketACLXMLParser : NSObject <NSXMLParserDelegate>
  13 +@property(strong, nonatomic) KS3BucketACLResult *listBuctkResult;
  14 +- (void)kSS3XMLarse:(NSData *)dataXml;
  15 +
  16 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3BucketNameUtilities.h 0 → 100755
  1 +//
  2 +// KS3BucketNameUtilities.h
  3 +// KS3YunSDK
  4 +//
  5 +// Created by JackWong on 12/23/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +@class KS3ClientException;
  11 +@interface KS3BucketNameUtilities : NSObject
  12 ++ (KS3ClientException *)validateBucketName:(NSString *)theBucketName;
  13 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3BucketObject.h 0 → 100755
  1 +//
  2 +// KS3BucketObj.h
  3 +// KS3iOSSDKDemo
  4 +//
  5 +// Created by Blues on 15/4/15.
  6 +// Copyright (c) 2015年 Blues. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface KS3BucketObject : NSObject
  12 +@property(strong, nonatomic) NSString *bucketName;
  13 +@property(strong, nonatomic) NSString *objKey;
  14 +
  15 +- (instancetype)initWithBucketName:(NSString *)strBucketName
  16 + keyName:(NSString *)strKeyName;
  17 +
  18 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3Client.h 0 → 100755
  1 +//
  2 +// KingSoftS3Client.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +// 有问题联系
  8 +// QQ:315720327
  9 +// email:me@iluckly.com
  10 +//
  11 +
  12 +#import "KS3WebServiceClient.h"
  13 +
  14 +@class KingSoftURLConnection;
  15 +@class KS3DownLoad;
  16 +@class ALAsset;
  17 +#pragma mark - Download block
  18 +
  19 +typedef void (^KSS3GetTokenSuccessBlock)(NSString *strToken);
  20 +typedef void (^KSS3DownloadBeginBlock)(KS3DownLoad *aDownload,
  21 + NSURLResponse *responseHeaders);
  22 +typedef void (^KSS3DownloadProgressChangeBlock)(KS3DownLoad *aDownload,
  23 + double newProgress);
  24 +typedef void (^KSS3DownloadFailedBlock)(KS3DownLoad *aDownload, NSError *error);
  25 +typedef void (^kSS3DownloadFileCompleteionBlock)(KS3DownLoad *aDownload,
  26 + NSString *filePath);
  27 +
  28 +@class KS3DeleteBucketResponse;
  29 +@class KS3SetACLResponse;
  30 +@class KS3ListBucketsRequest;
  31 +@class KS3ListBucketsResponse;
  32 +@class KS3CreateBucketResponse;
  33 +@class KS3GetACLResponse;
  34 +@class KS3GetBucketLoggingResponse;
  35 +@class KS3SetBucketLoggingResponse;
  36 +@class KS3GetObjectResponse;
  37 +@class KS3DeleteObjectResponse;
  38 +@class KS3HeadObjectResponse;
  39 +@class KS3PutObjectResponse;
  40 +@class KS3GetObjectACLResponse;
  41 +@class KS3SetObjectACLResponse;
  42 +@class KS3UploadPartResponse;
  43 +@class KS3UploadPartRequest;
  44 +@class KS3MultipartUpload;
  45 +@class KS3ListPartsResponse;
  46 +@class KS3ListPartsRequest;
  47 +@class KS3CompleteMultipartUploadResponse;
  48 +@class KS3CompleteMultipartUploadRequest;
  49 +@class KS3ListObjectsResponse;
  50 +@class KS3ListObjectsRequest;
  51 +@class KS3CreateBucketRequest;
  52 +@class KS3DeleteBucketResponse;
  53 +@class KS3DeleteBucketRequest;
  54 +@class KS3SetACLRequest;
  55 +@class KS3PutObjectRequest;
  56 +@class KS3GetObjectACLRequest;
  57 +@class KS3SetObjectACLRequest;
  58 +@class KS3DeleteObjectRequest;
  59 +@class KS3AbortMultipartUploadRequest;
  60 +@class KS3AbortMultipartUploadResponse;
  61 +@class KS3HeadBucketRequest;
  62 +@class KS3HeadBucketResponse;
  63 +@class KS3GetACLRequest;
  64 +@class KS3GetObjectRequest;
  65 +@class KS3HeadObjectRequest;
  66 +@class KS3SetGrantACLResponse;
  67 +@class KS3SetGrantACLRequest;
  68 +@class KS3SetObjectGrantACLResponse;
  69 +@class KS3SetObjectGrantACLRequest;
  70 +@class KS3SetBucketLoggingRequest;
  71 +@class KS3PutObjectCopyRequest;
  72 +@class KS3PutObjectCopyResponse;
  73 +@class KS3Response;
  74 +@class KS3Request;
  75 +@class KS3InitiateMultipartUploadRequest;
  76 +@class KS3InitiateMultipartUploadResponse;
  77 +@class KS3GetBucketLoggingRequest;
  78 +@class KS3Credentials;
  79 +
  80 +typedef enum {
  81 + KS3BucketBeijing = 0,
  82 + KS3BucketAmerica,
  83 + KS3BucketHongkong,
  84 + KS3BucketHangzhou,
  85 + KS3BucketShanghai,
  86 +} KS3BucketDomainRegion; // bucket所在地区
  87 +
  88 +@interface KS3Client : KS3WebServiceClient
  89 +
  90 +@property(assign, nonatomic) BOOL enableHTTPS;
  91 +@property(strong, nonatomic) KS3Credentials *credentials;
  92 +
  93 +/**
  94 + * 初始化
  95 + *
  96 + * @return Client对象
  97 + */
  98 ++ (KS3Client *)initialize;
  99 +
  100 +/**
  101 + * 返回请求协议:http/https
  102 + * 目前由enableHTTPS决定
  103 + */
  104 +- (NSString *)requestProtocol;
  105 +
  106 +/**
  107 + * 设置AccessKey和SecretKey
  108 + *
  109 + * @param accessKey
  110 + * @param secretKey
  111 + * 注释:这个接口必须实现(这个是使用下面API的(前提))建议在工程的delegate里面实现
  112 + */
  113 +- (void)connectWithAccessKey:(NSString *)accessKey
  114 + withSecretKey:(NSString *)secretKey;
  115 +/**
  116 + * 设置KS3Bucket所在的地区,默认北京
  117 +
  118 + * @param 共有北京,杭州,美国圣克拉拉,香港四个
  119 + * 注释:建议在工程的delegate里面实现
  120 + */
  121 +- (void)setBucketDomainWithRegion:(KS3BucketDomainRegion)domainRegion;
  122 +
  123 +/*
  124 + 设置KS3Bucket 所在的地区
  125 + @param 自定义的域名
  126 + */
  127 +- (void)setBucketDomain:(NSString *)domainRegion;
  128 +
  129 +/**
  130 + * 获取当前bucket所在地区,默认北京
  131 + 共有北京,杭州,美国圣克拉拉,香港四个
  132 + */
  133 +- (NSString *)getBucketDomain;
  134 +
  135 +/**
  136 + * 获取用户自定义的域名
  137 + * 如果没有设置,返回nil
  138 + */
  139 +- (NSString *)getCustomBucketDomain;
  140 +
  141 +/**
  142 + * 列出客户所有的Bucket信息
  143 + *
  144 + * @return 所有bucket的数组
  145 + */
  146 +- (NSArray *)listBuckets:(KS3ListBucketsRequest *)listBucketsRequest;
  147 +
  148 +/**
  149 + * 创建一个新的Bucket
  150 + *
  151 + * @param createBucketRequest 设置创建bucket的request信息
  152 + *
  153 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  154 + */
  155 +- (KS3CreateBucketResponse *)createBucket:
  156 + (KS3CreateBucketRequest *)createBucketRequest;
  157 +/**
  158 + * 删除指定Bucket
  159 + *
  160 + * @param deleteBucketRequest 设置删除bucket的request信息
  161 + *
  162 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  163 + */
  164 +- (KS3DeleteBucketResponse *)deleteBucket:
  165 + (KS3DeleteBucketRequest *)deleteBucketRequest;
  166 +/**
  167 + * 查询是否已经存在指定Bucket
  168 + *
  169 + * @param headBucketRequest 设置是否已经存在指定Bucket的request信息
  170 + *
  171 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  172 + */
  173 +- (KS3HeadBucketResponse *)headBucket:(KS3HeadBucketRequest *)headBucketRequest;
  174 +
  175 +/**
  176 + * 获得Bucket的acl
  177 + *
  178 + * @param getACLRequest 设置获取Bucket的acl的request对象
  179 + *
  180 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  181 + */
  182 +- (KS3GetACLResponse *)getBucketACL:(KS3GetACLRequest *)getACLRequest;
  183 +/**
  184 + * 设置Bucket的ACL
  185 + *
  186 + * @param getACLRequest 设置设置Bucket的ACL的request对象
  187 + *
  188 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  189 + */
  190 +- (KS3SetACLResponse *)setBucketACL:(KS3SetACLRequest *)getACLRequest;
  191 +/**
  192 + * 设置GrantACL信息
  193 + *
  194 + * @param setGrantACLRequest 设置grantACL的request信息
  195 + *
  196 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  197 + */
  198 +- (KS3SetGrantACLResponse *)setGrantACL:
  199 + (KS3SetGrantACLRequest *)setGrantACLRequest;
  200 +/**
  201 + * 列举Bucket内的Object
  202 + *
  203 + * @param bucketName
  204 + *
  205 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  206 + */
  207 +- (KS3ListObjectsResponse *)listObjects:
  208 + (KS3ListObjectsRequest *)listObjectsRequest;
  209 +
  210 +/**
  211 + * 获得Bucket的日志信息
  212 + *
  213 + * @param bucketName
  214 + *
  215 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  216 + */
  217 +- (KS3GetBucketLoggingResponse *)getBucketLogging:
  218 + (KS3GetBucketLoggingRequest *)getBucketLoggingRequest;
  219 +/**
  220 + * 下载Object数据
  221 + *
  222 + * @param getObjectRequest 设置下载Object的request请求信息
  223 + *
  224 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  225 + */
  226 +- (KS3GetObjectResponse *)getObject:(KS3GetObjectRequest *)getObjectRequest;
  227 +/**
  228 + * 删除指定Object
  229 + *
  230 + * @param deleteObjectRequest 设置删除Object的request请求信息
  231 + *
  232 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  233 + */
  234 +- (KS3DeleteObjectResponse *)deleteObject:
  235 + (KS3DeleteObjectRequest *)deleteObjectRequest;
  236 +
  237 +/**
  238 + * 查询是否已经存在指定Object
  239 + *
  240 + * @param headObjectRequest 设置是否已存在Object的request的信息
  241 + *
  242 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  243 + */
  244 +- (KS3HeadObjectResponse *)headObject:(KS3HeadObjectRequest *)headObjectRequest;
  245 +/**
  246 + * 上传Object数据 (如果文件比较大请设置委托)
  247 + *
  248 + * @param putObjectRequest 设置上传object的request的信息
  249 + *
  250 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  251 + */
  252 +- (KS3PutObjectResponse *)putObject:(KS3PutObjectRequest *)putObjectRequest;
  253 +/**
  254 + * 把源Bucket里面的某个Object复制到目的Bucket里面一个指定的Object
  255 + *
  256 + * @param putObjectCopyRequest 设置setObjectACLRequest的request信息
  257 + *
  258 + * @return 返回response对象(里边有服务返回的数据(具体的参照demo)
  259 + */
  260 +- (KS3PutObjectCopyResponse *)putObjectCopy:
  261 + (KS3PutObjectCopyRequest *)putObjectCopyRequest;
  262 +
  263 +/**
  264 + * 获得Object的acl
  265 + *
  266 + * @param getObjectACLRequest 设置获取object的acl的request信息
  267 + *
  268 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  269 + */
  270 +- (KS3GetObjectACLResponse *)getObjectACL:
  271 + (KS3GetObjectACLRequest *)getObjectACLRequest;
  272 +/**
  273 + * 设置Object的acl
  274 + *
  275 + * @param setObjectACLRequest 设置设置object的acl的request信息
  276 + *
  277 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  278 + */
  279 +
  280 +- (KS3SetObjectACLResponse *)setObjectACL:
  281 + (KS3SetObjectACLRequest *)setObjectACLRequest;
  282 +/**
  283 + * 设置ObjectGrantACL
  284 + *
  285 + * @param setObjectGrantACLRequest 设置设置ObjectGrantACL的request信息
  286 + *
  287 + * @return @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  288 + */
  289 +
  290 +- (KS3SetObjectGrantACLResponse *)setObjectGrantACL:
  291 + (KS3SetObjectGrantACLRequest *)setObjectGrantACLRequest;
  292 +/**
  293 + * 调用这个接口会初始化一个分块上传
  294 + *
  295 + * @param theKey 指的是上传到bucketName的文件名称
  296 + * @param bucketName
  297 + *
  298 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  299 + */
  300 +- (KS3MultipartUpload *)initiateMultipartUploadWithRequest:
  301 + (KS3InitiateMultipartUploadRequest *)request;
  302 +
  303 +- (KS3InitiateMultipartUploadResponse *)initiateMultipartUploadWithRequestAndResponse:(KS3InitiateMultipartUploadRequest *)request;
  304 +
  305 +/**
  306 + * 上传分块
  307 + *
  308 + * @param uploadPartRequest 指定上传分块的request信息
  309 + *
  310 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  311 + */
  312 +- (KS3UploadPartResponse *)uploadPart:(KS3UploadPartRequest *)uploadPartRequest;
  313 +/**
  314 + * 获取相册分块数据
  315 + *
  316 + * @param partNum 从1开始计数,第一块partNum = 1
  317 + * @param partLength 每一块数据的大小,单位为字节
  318 + * @param alassetURL 形如assets-library://asset/asset.mov?
  319 + id=25A47CAE-87CF-47A3-8834-592D60841DDB&ext=mov 的相册地址 ,
  320 + *
  321 + * @return
  322 + */
  323 +- (NSData *)getUploadPartDataWithPartNum:(NSInteger)partNum
  324 + partLength:(NSInteger)partlength
  325 + alassetURL:(NSURL *)alassetURL;
  326 +/**
  327 + * 获取相册分块数据
  328 + *
  329 + * @param partNum 从1开始计数,第一块partNum = 1
  330 + * @param partLength 每一块数据的大小,单位为字节
  331 + * @param alassetURL Alasset对象,是获取视频数据的类 ,
  332 + *
  333 + * @return
  334 + */
  335 +- (NSData *)getUploadPartDataWithPartNum:(NSInteger)partNum
  336 + partLength:(NSInteger)partlength
  337 + Alasset:(ALAsset *)assets;
  338 +/**
  339 + * 获取相册类
  340 + * @param alassetURL 开头是assets-library://标识Alasset类的相册地址
  341 + *
  342 + * @return
  343 + */
  344 +- (ALAsset *)getAlassetFromAlassetURL:(NSURL *)alassetURL;
  345 +/**
  346 + * 罗列出已经上传的块
  347 + *
  348 + * @param listPartsRequest 设置罗列已经上传的分块的request信息
  349 + *
  350 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  351 + */
  352 +
  353 +- (KS3ListPartsResponse *)listParts:(KS3ListPartsRequest *)listPartsRequest;
  354 +/**
  355 + * 组装所有分块上传的文件
  356 + *
  357 + * @param completeMultipartUploadRequest 设置组装所有分块的http信息
  358 + *
  359 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  360 + */
  361 +- (KS3CompleteMultipartUploadResponse *)completeMultipartUpload:
  362 + (KS3CompleteMultipartUploadRequest *)completeMultipartUploadRequest;
  363 +/**
  364 + * 取消分块上传
  365 + *
  366 + * @param abortMultipartRequest 设置分块文件属性
  367 + *
  368 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  369 + */
  370 +- (KS3AbortMultipartUploadResponse *)abortMultipartUpload:
  371 + (KS3AbortMultipartUploadRequest *)abortMultipartRequest;
  372 +/**
  373 + * 下载Object数据
  374 + *
  375 + * @param bucketName
  376 + * @param key 文件所在的仓库路径(和listObject的key对应)(具体的参照demo)
  377 + * @param downloadBeginBlock 下载开始回调
  378 + * @param downloadFileCompleteion 下载完成回调
  379 + * @param downloadProgressChangeBlock 下载进度回调
  380 + * @param failedBlock 下载失败回调
  381 + *
  382 + * @return 一个下载器对象(里面有文件属性)
  383 + */
  384 +- (KS3DownLoad *)
  385 +downloadObjectWithBucketName:(NSString *)bucketName
  386 + key:(NSString *)key
  387 + downloadBeginBlock:(KSS3DownloadBeginBlock)downloadBeginBlock
  388 + downloadFileCompleteion:
  389 + (kSS3DownloadFileCompleteionBlock)downloadFileCompleteion
  390 + downloadProgressChangeBlock:
  391 + (KSS3DownloadProgressChangeBlock)downloadProgressChangeBlock
  392 + failedBlock:(KSS3DownloadFailedBlock)failedBlock;
  393 +
  394 +/**
  395 + * 返回版本信息
  396 + *
  397 + * @return 版本信息
  398 + */
  399 ++ (NSString *)apiVersion;
  400 +
  401 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3ClientException.h 0 → 100755
  1 +//
  2 +// KS3ClientException.h
  3 +// KS3YunSDK
  4 +//
  5 +// Created by JackWong on 12/22/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface KS3ClientException : NSException
  12 +
  13 +@property(strong, nonatomic) NSString *message;
  14 +
  15 +@property(strong, nonatomic) NSError *error;
  16 +
  17 ++ (id)exceptionWithMessage:(NSString *)theMessage;
  18 +
  19 ++ (id)exceptionWithMessage:(NSString *)theMessage andError:(NSError *)theError;
  20 +
  21 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3CompleteMultipartUploadRequest.h 0 → 100755
  1 +//
  2 +// KSS3CompleteMultipartUploadRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3MultipartUpload.h"
  10 +#import "KS3Request.h"
  11 +
  12 +@interface KS3CompleteMultipartUploadRequest : KS3Request
  13 +
  14 +@property(nonatomic, strong) NSString *key;
  15 +@property(nonatomic, strong) NSString *uploadId;
  16 +@property(nonatomic, strong) NSData *dataParts;
  17 +@property(nonatomic, strong) NSString *callbackUrl;
  18 +@property(nonatomic, strong) NSString *callbackBody;
  19 +@property(nonatomic, strong) NSDictionary *callbackParams;
  20 +
  21 +- (id)initWithMultipartUpload:(KS3MultipartUpload *)multipartUpload;
  22 +
  23 +- (void)addPartWithPartNumber:(int)partNumber withETag:(NSString *)etag;
  24 +
  25 +- (NSData *)requestBody;
  26 +
  27 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3CompleteMultipartUploadResponse.h 0 → 100755
  1 +//
  2 +// KSS3CompleteMultipartUploadResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3CompleteMultipartUploadResult.h"
  10 +#import "KS3Response.h"
  11 +
  12 +@interface KS3CompleteMultipartUploadResponse : KS3Response
  13 +@property(nonatomic, readonly)
  14 + KS3CompleteMultipartUploadResult *completeMultipartUploadResult;
  15 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3CompleteMultipartUploadResult.h 0 → 100755
  1 +//
  2 +// KSS3CompleteMultipartUploadResult.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface KS3CompleteMultipartUploadResult : NSObject
  12 +
  13 +@property(nonatomic, strong) NSString *location;
  14 +
  15 +@property(nonatomic, strong) NSString *bucket;
  16 +
  17 +@property(nonatomic, strong) NSString *key;
  18 +
  19 +@property(nonatomic, strong) NSString *etag;
  20 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3Constants.h 0 → 100755
  1 +//
  2 +// KS3Constants.h
  3 +// KS3YunSDK
  4 +//
  5 +// Created by JackWong on 12/22/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#ifndef KS3YunSDK_KS3Constants_h
  10 +#define KS3YunSDK_KS3Constants_h
  11 +
  12 +#define kHttpMethodPut @"PUT"
  13 +#define kHttpMethodGet @"GET"
  14 +#define kHttpMethodHead @"HEAD"
  15 +#define kHttpMethodPost @"POST"
  16 +#define kHttpMethodDelete @"DELETE"
  17 +#define kHttpHdrHost @"Host"
  18 +
  19 +#define kKS3QueryParamPrefix @"prefix"
  20 +#define kKS3QueryParamMarker @"marker"
  21 +#define kKS3QueryParamDelimiter @"delimiter"
  22 +#define kKS3QueryParamMaxKeys @"max-keys"
  23 +#define kKS3QueryParamEncodingType @"encoding-type"
  24 +#define kKS3QueryParamResponseContentType @"response-content-type"
  25 +#define kKS3QueryParamResponseContentLanguage @"response-content-language"
  26 +#define kKS3QueryParamResponseExpires @"response-expires"
  27 +#define kKS3QueryParamResponseCacheControl @"response-cache-control"
  28 +#define kKS3QueryParamResponseContentDisposition @"response-content-disposition"
  29 +#define kKS3QueryParamResponseContentEncoding @"response-content-encoding"
  30 +
  31 +#define kKS3HttpHdrContentMD5 @"Content-MD5"
  32 +
  33 +#define kKS3SubResourceUploads @"uploads"
  34 +#define kKSHttpHdrContentEncoding @"Content-Encoding"
  35 +#define kKSHttpHdrContentDisposition @"Content-Disposition"
  36 +#define kKSHttpHdrCacheControl @"Cache-Control"
  37 +#define kKSHttpHdrContentLength @"Content-Length"
  38 +#define kKSHttpHdrContentType @"Content-Type"
  39 +#define kKSHttpHdrRange @"Range"
  40 +#define kKSHttpHdrIfModifiedSince @"If-Modified-Since"
  41 +#define kKSHttpHdrIfUnmodifiedSince @"If-Unmodified-Since"
  42 +#define kKSHttpHdrIfMatch @"If-Match"
  43 +#define kKSHttpHdrIfNoneMatch @"If-None-Match"
  44 +
  45 +#define kKS3QueryParamPartNumber @"partNumber"
  46 +#define kKS3QueryParamUploadId @"uploadId"
  47 +#define kKS3QueryParamMaxParts @"max-parts"
  48 +#define kKS3QueryParamPartNumberMarker @"part-number-marker"
  49 +
  50 +#endif
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3CreateBucketRequest.h 0 → 100755
  1 +//
  2 +// KSS3CreateBucketRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +@interface KS3CreateBucketRequest : KS3Request
  11 +- (instancetype)initWithName:(NSString *)bucketName;
  12 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3CreateBucketResponse.h 0 → 100755
  1 +//
  2 +// KSS3CreateBucketResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3CreateBucketResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3Credentials.h 0 → 100755
  1 +//
  2 +// KingSoftCredentials.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface KS3Credentials : NSObject
  12 +
  13 +@property(strong, readonly, nonatomic) NSString *accessKey;
  14 +@property(strong, readonly, nonatomic) NSString *secretKey;
  15 +
  16 +- (id)initWithAccessKey:(NSString *)accessKey
  17 + withSecretKey:(NSString *)secretKey;
  18 +
  19 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3DeleteBucketRequest.h 0 → 100755
  1 +//
  2 +// KSS3DeleteBucketRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@interface KS3DeleteBucketRequest : KS3Request
  12 +
  13 +- (instancetype)initWithName:(NSString *)bucketName;
  14 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3DeleteBucketResponse.h 0 → 100755
  1 +//
  2 +// KSS3DeleteBucketResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/10/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3DeleteBucketResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3DeleteObjectRequest.h 0 → 100755
  1 +//
  2 +// KSS3DeleteObjectRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@interface KS3DeleteObjectRequest : KS3Request
  12 +
  13 +@property(nonatomic, strong) NSString *key;
  14 +
  15 +- (instancetype)initWithName:(NSString *)bucketName
  16 + withKeyName:(NSString *)strKey;
  17 +
  18 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3DeleteObjectResponse.h 0 → 100755
  1 +//
  2 +// KSS3DeleteObjectResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3DeleteObjectResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3DownLoad.h 0 → 100755
  1 +//
  2 +// MSDownLoad.h
  3 +// MusicSample
  4 +//
  5 +// Created by JackWong on 14-1-9.
  6 +// Copyright (c) 2014年 JackWong. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Client.h"
  10 +#import <Foundation/Foundation.h>
  11 +
  12 +@class KS3Credentials;
  13 +
  14 +@protocol KS3DownloadDelegate;
  15 +@interface KS3DownLoad : NSObject {
  16 +
  17 + BOOL _isFinished;
  18 + BOOL _isStop;
  19 + BOOL overwrite;
  20 + NSString *url;
  21 + NSString *fileName;
  22 + NSString *filePath;
  23 + unsigned long long fileSize;
  24 +@private
  25 + NSString *destinationPath;
  26 + NSString *temporaryPath;
  27 + NSFileHandle *fileHandle;
  28 + NSURLConnection *connection;
  29 + unsigned long long offset;
  30 +}
  31 +- (id)initWithUrl:(NSString *)aUrl
  32 + credentials:(KS3Credentials *)
  33 + credentials:(NSString *)
  34 + bucketName:(NSString *)objectKey;
  35 +
  36 +@property(nonatomic, weak) id<KS3DownloadDelegate> delegate;
  37 +
  38 +@property(strong, nonatomic) NSString *bucketName;
  39 +
  40 +@property(strong, nonatomic) NSString *key;
  41 +
  42 +@property(nonatomic, assign) BOOL overwrite;
  43 +
  44 +@property(nonatomic, strong) NSString *url;
  45 +
  46 +@property(nonatomic, strong) NSString *fileName;
  47 +
  48 +@property(nonatomic, strong) NSString *filePath;
  49 +
  50 +@property(strong, nonatomic) NSString *httpMethod;
  51 +
  52 +@property(strong, nonatomic) NSString *contentMd5;
  53 +
  54 +@property(strong, nonatomic) NSString *contentType;
  55 +
  56 +@property(strong, nonatomic) NSString *kSYHeader;
  57 +
  58 +@property(strong, nonatomic) NSString *kSYResource;
  59 +
  60 +@property(nonatomic, strong) NSString *strKS3Token;
  61 +
  62 +@property(strong, nonatomic) NSDate *requestDate;
  63 +
  64 +@property(strong, nonatomic) NSString *strDate;
  65 +
  66 +@property NSTimeInterval timeoutInterval;
  67 +
  68 +@property(nonatomic, readonly) unsigned long long fileSize;
  69 +
  70 +@property(copy, nonatomic)
  71 + KSS3DownloadProgressChangeBlock downloadProgressChangeBlock;
  72 +
  73 +@property(copy, nonatomic) KSS3DownloadFailedBlock failedBlock;
  74 +
  75 +@property(copy, nonatomic)
  76 + kSS3DownloadFileCompleteionBlock downloadFileCompleteionBlock;
  77 +
  78 +@property(copy, nonatomic) KSS3DownloadBeginBlock downloadBeginBlock;
  79 +
  80 +- (void)start;
  81 +
  82 +- (void)stop;
  83 +
  84 +- (void)stopAndClear;
  85 +
  86 +- (void)setStrKS3Token:(NSString *)ks3Token;
  87 +
  88 +@end
  89 +
  90 +@protocol KS3DownloadDelegate <NSObject>
  91 +
  92 +- (void)downloadBegin:(KS3DownLoad *)aDownload
  93 + didReceiveResponseHeaders:(NSURLResponse *)responseHeaders;
  94 +
  95 +- (void)downloadFaild:(KS3DownLoad *)aDownload
  96 + didFailWithError:(NSError *)error;
  97 +
  98 +- (void)downloadFinished:(KS3DownLoad *)aDownload filePath:(NSString *)filePath;
  99 +
  100 +- (void)downloadProgressChange:(KS3DownLoad *)aDownload
  101 + progress:(double)newProgress;
  102 +
  103 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3ErrorHandler.h 0 → 100755
  1 +//
  2 +// KS3ErrorHandler.h
  3 +// KS3YunSDK
  4 +//
  5 +// Created by JackWong on 12/23/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +extern NSString *const KS3iOSSDKServiceErrorDomain;
  12 +extern NSString *const KS3iOSSDKClientErrorDomain;
  13 +
  14 +@interface KS3ErrorHandler : NSObject
  15 ++ (void)shouldThrowExceptions __attribute__((deprecated));
  16 ++ (void)shouldNotThrowExceptions;
  17 ++ (BOOL)throwsExceptions;
  18 ++ (NSError *)errorFromExceptionWithThrowsExceptionOption:
  19 + (NSException *)exception;
  20 ++ (NSError *)errorFromException:(NSException *)exception;
  21 ++ (NSError *)errorFromException:(NSException *)exception
  22 + serviceErrorDomain:(NSString *)serviceErrorDomain
  23 + clientErrorDomain:(NSString *)clientErrorDomain;
  24 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3GetACLRequest.h 0 → 100755
  1 +//
  2 +// KSS3BucketACLRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@interface KS3GetACLRequest : KS3Request
  12 +- (instancetype)initWithName:(NSString *)bucketName;
  13 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3GetACLResponse.h 0 → 100755
  1 +//
  2 +// KSS3BucketACLResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +@class KS3BucketACLResult;
  11 +@interface KS3GetACLResponse : KS3Response
  12 +
  13 +@property(nonatomic, strong) KS3BucketACLResult *listBucketsResult;
  14 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3GetBucketLoggingRequest.h 0 → 100755
  1 +//
  2 +// KSS3GetBucketLoggingRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@interface KS3GetBucketLoggingRequest : KS3Request
  12 +@property(nonatomic, strong) NSString *prefix;
  13 +
  14 +@property(nonatomic, strong) NSString *marker;
  15 +
  16 +@property(nonatomic) int32_t maxKeys;
  17 +
  18 +@property(nonatomic, retain) NSString *delimiter;
  19 +
  20 +- (instancetype)initWithName:(NSString *)bucketName;
  21 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3GetBucketLoggingResponse.h 0 → 100755
  1 +//
  2 +// KSS3GetBucketLoggingResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3GetBucketLoggingResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3GetObjectACLRequest.h 0 → 100755
  1 +//
  2 +// KSS3GetObjectACLRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@interface KS3GetObjectACLRequest : KS3Request
  12 +
  13 +@property(strong, nonatomic) NSString *key;
  14 +
  15 +- (instancetype)initWithName:(NSString *)bucketName
  16 + withKeyName:(NSString *)strKey;
  17 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3GetObjectACLResponse.h 0 → 100755
  1 +//
  2 +// KSS3GetObjectACLResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +@class KS3BucketACLResult;
  11 +@interface KS3GetObjectACLResponse : KS3Response
  12 +@property(nonatomic, strong) KS3BucketACLResult *listBucketsResult;
  13 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3GetObjectRequest.h 0 → 100755
  1 +//
  2 +// KSS3GetObjectRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@interface KS3GetObjectRequest : KS3Request
  12 +
  13 +@property(nonatomic, strong) NSString *responseContentType;
  14 +@property(nonatomic, strong) NSString *responseContentLanguage;
  15 +@property(nonatomic, strong) NSString *responseExpires;
  16 +@property(nonatomic, strong) NSString *responseCacheControl;
  17 +@property(nonatomic, strong) NSString *responseContentDisposition;
  18 +@property(nonatomic, strong) NSString *responseContentEncoding;
  19 +
  20 +@property(nonatomic, strong) NSString *range;
  21 +@property(nonatomic, strong) NSString *ifModifiedSince;
  22 +@property(nonatomic, strong) NSString *ifUnmodifiedSince;
  23 +@property(nonatomic, strong) NSString *ifMatch;
  24 +@property(nonatomic, strong) NSString *ifNoneMatch;
  25 +@property(nonatomic, strong) NSString *versionId;
  26 +@property(nonatomic, strong) NSString *key;
  27 +
  28 +- (instancetype)initWithName:(NSString *)bucketName;
  29 +
  30 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3GetObjectResponse.h 0 → 100755
  1 +//
  2 +// KSS3GetObjectResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3GetObjectResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3Grant.h 0 → 100755
  1 +//
  2 +// KSS3Grant.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +@class KS3Grantee;
  11 +@interface KS3Grant : NSObject
  12 +@property(strong, nonatomic) NSString *permission;
  13 +@property(strong, nonatomic) KS3Grantee *grantee;
  14 +
  15 +@end
  16 +
  17 +@interface KS3Grantee : NSObject
  18 +@property(strong, nonatomic) NSString *ID;
  19 +@property(strong, nonatomic) NSString *displayName;
  20 +@property(strong, nonatomic) NSString *URI;
  21 +
  22 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3GrantAccessControlList.h 0 → 100755
  1 +//
  2 +// KSS3GrantAccessControlList.h
  3 +// KS3iOSSDKDemo
  4 +//
  5 +// Created by Blues on 12/18/14.
  6 +// Copyright (c) 2014 Blues. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +typedef enum {
  12 + KingSoftYun_Grant_Permission_Read,
  13 + KingSoftYun_Grant_Permission_Write,
  14 + KingSoftYun_Grant_Permission_Read_ACP,
  15 + KingSoftYun_Grant_Permission_Write_ACP,
  16 + KingSoftYun_Grant_Permission_Full_Control,
  17 +} KingSoftYun_GrantPermissionACLType;
  18 +
  19 +@interface KS3GrantAccessControlList : NSObject
  20 +
  21 +@property(nonatomic, strong) NSString *accessGrantACL;
  22 +@property(nonatomic, strong) NSString *identifier;
  23 +@property(nonatomic, strong) NSString *displayName;
  24 +
  25 +- (NSString *)setGrantControlAccess:
  26 + (KingSoftYun_GrantPermissionACLType)grantAclType;
  27 +
  28 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3HeadBucketRequest.h 0 → 100755
  1 +//
  2 +// KSS3HeadBucketRequest.h
  3 +// KS3YunSDK
  4 +//
  5 +// Created by Blues on 12/18/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +#import "KS3Request.h"
  9 +@interface KS3HeadBucketRequest : KS3Request
  10 +- (instancetype)initWithName:(NSString *)bucketName;
  11 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3HeadBucketResponse.h 0 → 100755
  1 +//
  2 +// KSS3HeadBucketResponse.h
  3 +// KS3YunSDK
  4 +//
  5 +// Created by Blues on 12/18/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3HeadBucketResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3HeadObjectRequest.h 0 → 100755
  1 +//
  2 +// KSS3HeadObjectRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@interface KS3HeadObjectRequest : KS3Request
  12 +
  13 +@property(nonatomic, strong) NSString *range;
  14 +@property(nonatomic, strong) NSString *ifModifiedSince;
  15 +@property(nonatomic, strong) NSString *ifUnmodifiedSince;
  16 +@property(nonatomic, strong) NSString *ifMatch;
  17 +@property(nonatomic, strong) NSString *ifNoneMatch;
  18 +@property(nonatomic, strong) NSString *key;
  19 +
  20 +- (instancetype)initWithName:(NSString *)bucketName
  21 + withKeyName:(NSString *)strKey;
  22 +
  23 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3HeadObjectResponse.h 0 → 100755
  1 +//
  2 +// KSS3HeadObjectResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3HeadObjectResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3InitiateMultipartUploadRequest.h 0 → 100755
  1 +//
  2 +// KSS3InitiateMultipartUploadRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3AbstractPutRequest.h"
  10 +
  11 +@class KS3AccessControlList;
  12 +@class KS3GrantAccessControlList;
  13 +
  14 +@interface KS3InitiateMultipartUploadRequest : KS3AbstractPutRequest
  15 +
  16 +- (id)initWithKey:(NSString *)aKey
  17 + inBucket:(NSString *)aBucket
  18 + acl:(KS3AccessControlList *)acl
  19 + grantAcl:(NSArray *)arrGrantAcl;
  20 +
  21 +@property(nonatomic, strong) NSString *key;
  22 +@property(nonatomic, strong) NSString *cacheControl;
  23 +@property(nonatomic, strong) NSString *contentDisposition;
  24 +@property(nonatomic, strong) NSString *contentEncoding;
  25 +@property(nonatomic, strong) NSString *expires;
  26 +@property(nonatomic, strong) NSString *xkssMeta;
  27 +@property(nonatomic, strong) NSString *xkssStorageClass;
  28 +@property(nonatomic, strong) NSString *xkssWebSiteRedirectLocation;
  29 +@property(nonatomic, strong) NSString *xkssAcl;
  30 +@property(nonatomic, strong) KS3AccessControlList *acl;
  31 +@property(nonatomic, strong) NSArray *arrGrantAcl;
  32 +
  33 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3InitiateMultipartUploadResponse.h 0 → 100755
  1 +//
  2 +// KSS3InitiateMultipartUploadResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3MultipartUpload.h"
  10 +#import "KS3Response.h"
  11 +
  12 +@interface KS3InitiateMultipartUploadResponse : KS3Response
  13 +@property(nonatomic, strong) KS3MultipartUpload *multipartUpload;
  14 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3InitiateMultipartUploadResult.h 0 → 100755
  1 +//
  2 +// KSS3InitiateMultipartUploadResult.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3MultipartUpload.h"
  10 +#import <Foundation/Foundation.h>
  11 +
  12 +@interface KS3InitiateMultipartUploadResult : NSObject
  13 +@property(strong, nonatomic) KS3MultipartUpload *multipartUpload;
  14 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3InitiateMultipartUploadXMLParser.h 0 → 100755
  1 +//
  2 +// KSS3InitiateMultipartUploadXMLParser.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3InitiateMultipartUploadResult.h"
  10 +#import <Foundation/Foundation.h>
  11 +
  12 +@interface KS3InitiateMultipartUploadXMLParser : NSObject <NSXMLParserDelegate>
  13 +@property(strong, nonatomic) KS3InitiateMultipartUploadResult *listBuctkResult;
  14 +- (void)kSS3XMLarse:(NSData *)dataXml;
  15 +
  16 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3ListBucketsRequest.h 0 → 100755
  1 +//
  2 +// S3ListBucketsRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@interface KS3ListBucketsRequest : KS3Request
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3ListBucketsResponse.h 0 → 100755
  1 +//
  2 +// S3ListBucketsResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +@class KS3ListBucketsResult;
  11 +@interface KS3ListBucketsResponse : KS3Response
  12 +
  13 +@property(nonatomic, strong) KS3ListBucketsResult *listBucketsResult;
  14 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3ListBucketsResult.h 0 → 100755
  1 +//
  2 +// KSS3ListBucketsResult.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/11/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +@class KS3Owner;
  11 +
  12 +@interface KS3ListBucketsResult : NSObject
  13 +
  14 +@property(nonatomic, strong) KS3Owner *owner;
  15 +@property(nonatomic, strong) NSMutableArray *buckets;
  16 +
  17 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3ListBucketsXMLParser.h 0 → 100755
  1 +//
  2 +// KSS3ListBucketsXMLParser.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/11/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3ListBucketsResult.h"
  10 +#import "KS3Owner.h"
  11 +#import <Foundation/Foundation.h>
  12 +
  13 +@interface KS3ListBucketsXMLParser : NSObject <NSXMLParserDelegate>
  14 +@property(strong, nonatomic) KS3ListBucketsResult *listBuctkResult;
  15 +- (void)kSS3XMLarse:(NSData *)dataXml;
  16 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3ListObjectsRequest.h 0 → 100755
  1 +//
  2 +// KSS3ListObjectsRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@interface KS3ListObjectsRequest : KS3Request
  12 +
  13 +@property(nonatomic, strong) NSString *prefix;
  14 +@property(nonatomic, strong) NSString *marker;
  15 +@property(nonatomic) int32_t maxKeys;
  16 +@property(nonatomic, retain) NSString *delimiter;
  17 +@property(nonatomic, strong) NSString *encodingType;
  18 +
  19 +- (instancetype)initWithName:(NSString *)bucketName;
  20 +
  21 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3ListObjectsResponse.h 0 → 100755
  1 +//
  2 +// KSS3ListObjectsResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +@class KS3ListObjectsResult;
  11 +
  12 +@interface KS3ListObjectsResponse : KS3Response
  13 +@property(nonatomic, strong) KS3ListObjectsResult *listBucketsResult;
  14 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3ListObjectsResult.h 0 → 100755
  1 +//
  2 +// ListBucketObjects.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface KS3ListObjectsResult : NSObject
  12 +
  13 +@property(strong, nonatomic) NSMutableArray *objectSummaries;
  14 +@property(strong, nonatomic) NSString *bucketName;
  15 +@property(strong, nonatomic) NSString *prefix;
  16 +@property(strong, nonatomic) NSString *marker;
  17 +@property(strong, nonatomic) NSString *NextMarker;
  18 +@property(nonatomic) int32_t maxKeys;
  19 +@property(strong, nonatomic) NSString *delimiter;
  20 +@property(assign, nonatomic) BOOL IsTruncated;
  21 +@property(strong, nonatomic) NSMutableArray *commonPrefixes;
  22 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3ListObjectsXMLPrarser.h 0 → 100755
  1 +//
  2 +// KSS3ListObjectsXMLPrarser.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +@class KS3ListObjectsResult;
  11 +@interface KS3ListObjectsXMLPrarser : NSObject <NSXMLParserDelegate>
  12 +@property(strong, nonatomic) KS3ListObjectsResult *listBuctkResult;
  13 +- (void)kSS3XMLarse:(NSData *)dataXml;
  14 +
  15 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3ListPartsRequest.h 0 → 100755
  1 +//
  2 +// KSS3ListPartsRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3MultipartUpload.h"
  10 +#import "KS3Request.h"
  11 +
  12 +@interface KS3ListPartsRequest : KS3Request
  13 +
  14 +@property(strong, nonatomic) NSString *key;
  15 +@property(nonatomic, strong) NSString *uploadId;
  16 +@property(nonatomic, assign) int32_t maxParts;
  17 +@property(nonatomic, assign) int32_t partNumberMarker;
  18 +@property(nonatomic, strong) NSString *encodingType;
  19 +
  20 +- (id)initWithMultipartUpload:(KS3MultipartUpload *)multipartUpload;
  21 +
  22 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3ListPartsResponse.h 0 → 100755
  1 +//
  2 +// KSS3ListPartsResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3ListPartsResult.h"
  10 +#import "KS3Response.h"
  11 +
  12 +@class KS3ListPartsResult;
  13 +@interface KS3ListPartsResponse : KS3Response
  14 +
  15 +@property(strong, nonatomic) KS3ListPartsResult *listResult;
  16 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3ListPartsResult.h 0 → 100755
  1 +//
  2 +// KSS3ListPartsResult.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/16/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Owner.h"
  10 +#import <Foundation/Foundation.h>
  11 +
  12 +@interface KS3ListPartsResult : NSObject
  13 +
  14 +@property(strong, nonatomic) NSString *Bucket;
  15 +
  16 +@property(strong, nonatomic) NSString *key;
  17 +@property(strong, nonatomic) NSString *UploadId;
  18 +
  19 +@property(nonatomic) int32_t partNumberMarker;
  20 +
  21 +@property(nonatomic) int32_t maxParts;
  22 +
  23 +@property(nonatomic) BOOL isTruncated;
  24 +
  25 +@property(strong, nonatomic) KS3Owner *initiator;
  26 +
  27 +@property(strong, nonatomic) KS3Owner *owner;
  28 +
  29 +@property(strong, nonatomic) NSMutableArray *parts;
  30 +
  31 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3ListPartsResultXMLParser.h 0 → 100755
  1 +//
  2 +// KSS3ListPartsResultXMLParser.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/16/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3ListPartsResult.h"
  10 +#import <Foundation/Foundation.h>
  11 +
  12 +@interface KS3ListPartsResultXMLParser : NSObject <NSXMLParserDelegate>
  13 +
  14 +@property(strong, nonatomic) KS3ListPartsResult *listPartsResult;
  15 +
  16 +- (void)kSS3XMLarse:(NSData *)dataXml;
  17 +
  18 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3MD5Util.h 0 → 100755
  1 +//
  2 +// KingSoftMD5Util.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface KS3MD5Util : NSObject
  12 ++ (NSString *)hexEncode:(NSString *)key text:(NSString *)text;
  13 +
  14 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3MultipartUpload.h 0 → 100755
  1 +//
  2 +// KSS3MultipartUpload.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Owner.h"
  10 +#import <Foundation/Foundation.h>
  11 +
  12 +//上传类型
  13 +typedef enum {
  14 + kUploadAlasset = 0, //相册中
  15 + kUploadNormal, //沙盒里或工程里
  16 +} UploadType;
  17 +
  18 +@interface KS3MultipartUpload : NSObject
  19 +
  20 +@property(nonatomic, strong) NSString *key;
  21 +
  22 +@property(nonatomic, strong) NSString *bucket;
  23 +
  24 +@property(nonatomic, strong) NSString *uploadId;
  25 +
  26 +@property(nonatomic, strong) NSString *storageClass;
  27 +
  28 +@property(nonatomic, strong) KS3Owner *initiator;
  29 +
  30 +@property(nonatomic, strong) KS3Owner *owner;
  31 +
  32 +@property(nonatomic, strong) NSDate *initiated;
  33 +
  34 +@property(assign, readonly) BOOL isCanceled;
  35 +
  36 +@property(assign, nonatomic, readonly) BOOL isPaused;
  37 +
  38 +@property(assign, nonatomic) UploadType uploadType;
  39 +
  40 +//暂停
  41 +- (void)pause;
  42 +//继续
  43 +- (void)proceed;
  44 +//取消
  45 +- (void)cancel;
  46 +
  47 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3ObjectACLXMLParser.h 0 → 100755
  1 +//
  2 +// KSS3ObjectACLXMLParser.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3BucketACLResult.h"
  10 +#import <Foundation/Foundation.h>
  11 +@interface KS3ObjectACLXMLParser : NSObject <NSXMLParserDelegate>
  12 +@property(strong, nonatomic) KS3BucketACLResult *listBuctkResult;
  13 +- (void)kSS3XMLarse:(NSData *)dataXml;
  14 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3ObjectSummary.h 0 → 100755
  1 +//
  2 +// KSS3Contents.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/13/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +@class KS3Owner;
  11 +@interface KS3ObjectSummary : NSObject
  12 +@property(strong, nonatomic) NSString *Key;
  13 +@property(strong, nonatomic) NSString *LastModified;
  14 +@property(strong, nonatomic) NSString *ETag;
  15 +@property(strong, nonatomic) KS3Owner *owner;
  16 +@property(assign, nonatomic) int32_t size;
  17 +@property(strong, nonatomic) NSString *storageClass;
  18 +
  19 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3Owner.h 0 → 100755
  1 +//
  2 +// S3Owner.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/11/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface KS3Owner : NSObject
  12 +
  13 +@property(strong, nonatomic) NSString *ID;
  14 +
  15 +@property(strong, nonatomic) NSString *displayName;
  16 +
  17 +- (id)initWithID:(NSString *)theID withDisplayName:(NSString *)theDisplayName;
  18 +
  19 ++ (id)ownerWithID:(NSString *)theID withDisplayName:(NSString *)theDisplayName;
  20 +
  21 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3Part.h 0 → 100755
  1 +//
  2 +// KSS3Part.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/16/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface KS3Part : NSObject
  12 +
  13 +@property(strong, nonatomic) NSString *etag;
  14 +
  15 +@property(strong, nonatomic) NSString *lastModified;
  16 +
  17 +@property(nonatomic, assign) int32_t partNumber;
  18 +
  19 +@property(nonatomic, assign) long long size;
  20 +
  21 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3PutObjectCopyRequest.h 0 → 100755
  1 +//
  2 +// KS3PutObjectCopyRequest.h
  3 +// KSYSDKDemo
  4 +//
  5 +// Created by Blues on 12/25/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3BucketObject.h"
  10 +#import "KS3Request.h"
  11 +
  12 +@interface KS3PutObjectCopyRequest : KS3Request
  13 +
  14 +@property(nonatomic, strong) NSString *strSourceBucket;
  15 +@property(nonatomic, strong) NSString *strSourceObject;
  16 +@property(nonatomic, strong) NSString *xkssMetaDataDirective;
  17 +@property(nonatomic, strong) NSString *xkssCopySourceIfMatch;
  18 +@property(nonatomic, strong) NSString *xkssCopySourceIfNoneMatch;
  19 +@property(nonatomic, strong) NSString *xkssCopySourceIfUnmodifiedSince;
  20 +@property(nonatomic, strong) NSString *xkssCopySourceIfModifiedSince;
  21 +@property(nonatomic, strong) NSString *xkssMeta;
  22 +@property(nonatomic, strong) NSString *xkssStorageClass;
  23 +@property(nonatomic, strong) NSString *xkssWebsiteRedirectLocation;
  24 +
  25 +@property(nonatomic, strong) NSString *xkssServerSideEncryption;
  26 +@property(nonatomic, strong) NSString *xkssServerSideEncryptionCustomerKey;
  27 +@property(nonatomic, strong)
  28 + NSString *xkssServerSideEncryptionCustomerAlgorithm;
  29 +@property(nonatomic, strong) NSString *xkssServerSideEncryptionCustomerKeyMD5;
  30 +@property(nonatomic, strong)
  31 + NSString *xkssCopySourceServerSideEncryptionCustomerKey;
  32 +@property(nonatomic, strong)
  33 + NSString *xkssCopySourceServerSideEncryptionCustomerAlgorithm;
  34 +@property(nonatomic, strong)
  35 + NSString *xkssCopySourceServerSideEncryptionCustomerMD5;
  36 +@property(nonatomic, strong) NSString *xkssAcl;
  37 +
  38 +@property(nonatomic, strong) NSString *key;
  39 +
  40 +//- (instancetype)initWithName:(NSString *)bucketName;
  41 +- (instancetype)initWithName:(KS3BucketObject *)destBucketObj
  42 + sourceBucketObj:(KS3BucketObject *)sourBucketObj;
  43 +
  44 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3PutObjectCopyResponse.h 0 → 100755
  1 +//
  2 +// KS3PutObjectCopyResponse.h
  3 +// KSYSDKDemo
  4 +//
  5 +// Created by Blues on 12/25/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3PutObjectCopyResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3PutObjectRequest.h 0 → 100755
  1 +//
  2 +// KSS3PutObjectRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@class KS3AccessControlList;
  12 +@class KS3GrantAccessControlList;
  13 +
  14 +@interface KS3PutObjectRequest : KS3Request
  15 +
  16 +@property(nonatomic, strong) NSString *cacheControl;
  17 +@property(nonatomic, strong) NSString *contentDisposition;
  18 +@property(nonatomic, strong) NSString *contentEncoding;
  19 +@property(nonatomic, assign) BOOL generateMD5;
  20 +@property(nonatomic, strong) NSString *expect;
  21 +@property(nonatomic, strong) NSData *data;
  22 +@property(nonatomic, strong) NSInputStream *stream;
  23 +@property(nonatomic, assign, readonly) int64_t expires;
  24 +@property(nonatomic, strong) NSString *filename;
  25 +@property(nonatomic, strong) NSString *redirectLocation;
  26 +@property(nonatomic, strong) NSString *callbackUrl;
  27 +@property(nonatomic, strong) NSString *callbackBody;
  28 +@property(nonatomic, strong) NSDictionary *callbackParams;
  29 +@property(strong, nonatomic) KS3AccessControlList *acl;
  30 +@property(nonatomic, strong) NSArray *arrGrantAcl;
  31 +
  32 +- (instancetype)initWithName:(NSString *)bucketName
  33 + withAcl:(KS3AccessControlList *)acl
  34 + grantAcl:(NSArray *)arrGrantAcl;
  35 +
  36 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3PutObjectResponse.h 0 → 100755
  1 +//
  2 +// KSS3PutObjectResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3PutObjectResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3Request.h 0 → 100755
  1 +//
  2 +// S3Request.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3ServiceRequest.h"
  10 +
  11 +@interface KS3Request : KS3ServiceRequest
  12 +@property(strong, nonatomic) NSString *bucket;
  13 +@property(nonatomic, assign) int64_t contentLength;
  14 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3Response.h 0 → 100755
  1 +//
  2 +// S3Response.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +#import "KS3ServiceResponse.h"
  9 +@interface KS3Response : KS3ServiceResponse
  10 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3ResponseHeaderOverrides.h 0 → 100755
  1 +//
  2 +// KSS3ResponseHeaderOverrides.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface KS3ResponseHeaderOverrides : NSObject
  12 +
  13 +@property(nonatomic, strong) NSString *contentType;
  14 +
  15 +@property(nonatomic, strong) NSString *contentLanguage;
  16 +
  17 +@property(nonatomic, strong) NSString *expires;
  18 +
  19 +@property(nonatomic, strong) NSString *cacheControl;
  20 +
  21 +@property(nonatomic, strong) NSString *contentDisposition;
  22 +
  23 +@property(nonatomic, strong) NSString *contentEncoding;
  24 +
  25 +@property(nonatomic, assign) NSString *queryString;
  26 +
  27 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3SDKUtil.h 0 → 100755
  1 +//
  2 +// KingSoftSDKUtil.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +extern NSString *const KSYS3DefaultRunLoopMode;
  11 +@interface KS3SDKUtil : NSObject
  12 +NSDate *getCurrentDate();
  13 ++ (NSString *)base64md5FromData:(NSData *)data;
  14 ++ (NSString *)urlEncode:(NSString *)input;
  15 ++ (NSString *)applicationDocumentFilePath;
  16 ++ (BOOL)isIpString:(NSString *)aString;
  17 ++ (BOOL)isVaildBucketName:(NSString *)bucket;
  18 +@end
  19 +
  20 +@interface NSData (WithBase64)
  21 +
  22 +/**
  23 + * Return a base64 encoded representation of the data.
  24 + *
  25 + * @return base64 encoded representation of the data.
  26 + */
  27 +- (NSString *)base64EncodedString;
  28 +
  29 +/**
  30 + * Decode a base-64 encoded string into a new NSData object.
  31 + *
  32 + * @param encodedString an base-64 encoded string
  33 + *
  34 + * @return NSData with the data represented by the encoded string.
  35 + */
  36 ++ (NSData *)dataWithBase64EncodedString:(NSString *)encodedString;
  37 +
  38 +@end
  39 +@interface NSString (Md5)
  40 +- (NSString *)MD5Hash;
  41 +@end
0 \ No newline at end of file 42 \ No newline at end of file
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3ServiceRequest.h 0 → 100755
  1 +//
  2 +// KingSoftServiceRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Credentials.h"
  10 +#import "KS3URLRequest.h"
  11 +#import <Foundation/Foundation.h>
  12 +@class KS3ServiceResponse;
  13 +@class KS3ClientException;
  14 +@protocol KingSoftServiceRequestDelegate;
  15 +@interface KS3ServiceRequest : NSObject
  16 +@property(strong, nonatomic) KS3Credentials *credentials;
  17 +@property(strong, nonatomic) KS3URLRequest *urlRequest;
  18 +@property(strong, nonatomic) NSString *httpMethod;
  19 +@property(strong, nonatomic) NSURLConnection *urlConnection;
  20 +@property(strong, readonly, nonatomic) NSURL *url;
  21 +@property(strong, nonatomic) NSString *host;
  22 +@property(strong, nonatomic) NSString *contentMd5;
  23 +@property(strong, nonatomic) NSString *contentType;
  24 +@property(strong, nonatomic) NSString *kSYResource;
  25 +@property(strong, nonatomic) NSDate *requestDate;
  26 +@property(strong, nonatomic) NSString *strDate;
  27 +@property(nonatomic, strong) NSString *strKS3Token;
  28 +@property NSTimeInterval timeoutInterval;
  29 +@property(weak, nonatomic) id<KingSoftServiceRequestDelegate> delegate;
  30 +
  31 +- (KS3URLRequest *)configureURLRequest;
  32 +- (void)sign;
  33 +- (KS3ClientException *)validate;
  34 +- (void)cancel;
  35 +- (NSString *)URLEncodedString:(NSString *)str;
  36 +- (void)setCompleteRequest;
  37 +
  38 +- (NSString *)kSYHeader;
  39 +@end
  40 +
  41 +@protocol KingSoftServiceRequestDelegate <NSObject>
  42 +
  43 +@optional
  44 +
  45 +- (void)request:(KS3ServiceRequest *)request
  46 + didReceiveResponse:(NSURLResponse *)response;
  47 +
  48 +- (void)request:(KS3ServiceRequest *)request didReceiveData:(NSData *)data;
  49 +
  50 +- (void)request:(KS3ServiceRequest *)request
  51 + didCompleteWithResponse:(KS3ServiceResponse *)response;
  52 +
  53 +- (void)request:(KS3ServiceRequest *)request
  54 + didSendData:(long long)bytesWritten
  55 + totalBytesWritten:(long long)totalBytesWritten
  56 + totalBytesExpectedToWrite:(long long)totalBytesExpectedToWrite;
  57 +
  58 +- (void)request:(KS3ServiceRequest *)request didFailWithError:(NSError *)error;
  59 +
  60 +- (void)request:(KS3ServiceRequest *)request
  61 + didFailWithServiceException:(NSException *)exception
  62 + __attribute__((deprecated));
  63 +
  64 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3ServiceResponse.h 0 → 100755
  1 +//
  2 +// KingSoftServiceResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +@class KS3ServiceRequest;
  11 +@interface KS3ServiceResponse : NSObject {
  12 + NSMutableData *body;
  13 +}
  14 +@property(nonatomic, readonly) NSData *body;
  15 +@property(nonatomic, readonly) BOOL isFinishedLoading;
  16 +@property(nonatomic, readonly) BOOL didTimeout;
  17 +@property(nonatomic, strong) NSDictionary *responseHeader;
  18 +@property(nonatomic) int32_t httpStatusCode;
  19 +
  20 +@property(readonly, copy) NSURL *URL;
  21 +
  22 +@property(readonly, copy) NSString *MIMEType;
  23 +
  24 +@property(readonly) long long expectedContentLength;
  25 +
  26 +@property(readonly, copy) NSString *textEncodingName;
  27 +
  28 +@property(readonly, copy) NSString *suggestedFilename;
  29 +
  30 +@property(strong, nonatomic) NSError *error;
  31 +
  32 +@property(nonatomic, strong) KS3ServiceRequest *request;
  33 +- (void)timeout;
  34 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3SetACLRequest.h 0 → 100755
  1 +//
  2 +// KSS3SetACLRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@class KS3AccessControlList;
  12 +@interface KS3SetACLRequest : KS3Request
  13 +
  14 +@property(strong, nonatomic) KS3AccessControlList *acl;
  15 +
  16 +- (instancetype)initWithName:(NSString *)bucketName
  17 + accessACL:(KS3AccessControlList *)accessACL;
  18 +
  19 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3SetACLResponse.h 0 → 100755
  1 +//
  2 +// KSS3SetACLResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +#import "KS3Response.h"
  9 +@interface KS3SetACLResponse : KS3Response
  10 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3SetBucketLoggingRequest.h 0 → 100755
  1 +//
  2 +// KSS3SetBucketLoggingRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@interface KS3SetBucketLoggingRequest : KS3Request
  12 +
  13 +- (instancetype)initWithName:(NSString *)bucketName;
  14 +
  15 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3SetBucketLoggingResponse.h 0 → 100755
  1 +//
  2 +// KSS3SetBucketLoggingResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3SetBucketLoggingResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3SetGrantACLRequest.h 0 → 100755
  1 +//
  2 +// KSS3SetGrantACLRequest.h
  3 +// KS3iOSSDKDemo
  4 +//
  5 +// Created by Blues on 12/18/14.
  6 +// Copyright (c) 2014 Blues. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@class KS3GrantAccessControlList;
  12 +
  13 +@interface KS3SetGrantACLRequest : KS3Request
  14 +
  15 +@property(nonatomic, strong) KS3GrantAccessControlList *acl;
  16 +
  17 +- (instancetype)initWithName:(NSString *)bucketName
  18 + accessACL:(KS3GrantAccessControlList *)accessACL;
  19 +
  20 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3SetGrantACLResponse.h 0 → 100755
  1 +//
  2 +// KSS3SetGrantACLResponse.h
  3 +// KS3iOSSDKDemo
  4 +//
  5 +// Created by Blues on 12/18/14.
  6 +// Copyright (c) 2014 Blues. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3SetGrantACLResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3SetObjectACLRequest.h 0 → 100755
  1 +//
  2 +// KSS3SetObjectACLRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +@class KS3AccessControlList;
  11 +@interface KS3SetObjectACLRequest : KS3Request
  12 +
  13 +@property(strong, nonatomic) NSString *key;
  14 +
  15 +@property(strong, nonatomic) KS3AccessControlList *acl;
  16 +
  17 +- (instancetype)initWithName:(NSString *)bucketName
  18 + withKeyName:(NSString *)strKeyName
  19 + acl:(KS3AccessControlList *)acl;
  20 +
  21 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3SetObjectACLResponse.h 0 → 100755
  1 +//
  2 +// KSS3SetObjectACLResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3SetObjectACLResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3SetObjectGrantACLRequest.h 0 → 100755
  1 +//
  2 +// KSS3SetObjectGrantACLRequest.h
  3 +// KS3iOSSDKDemo
  4 +//
  5 +// Created by Blues on 12/18/14.
  6 +// Copyright (c) 2014 Blues. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@class KS3GrantAccessControlList;
  12 +
  13 +@interface KS3SetObjectGrantACLRequest : KS3Request
  14 +
  15 +@property(nonatomic, strong) KS3GrantAccessControlList *acl;
  16 +@property(nonatomic, strong) NSString *key;
  17 +
  18 +- (instancetype)initWithName:(NSString *)bucketName
  19 + withKeyName:(NSString *)strKeyName
  20 + grantAcl:(KS3GrantAccessControlList *)grantAcl;
  21 +
  22 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3SetObjectGrantACLResponse.h 0 → 100755
  1 +//
  2 +// KSS3SetObjectGrantACLResponse.h
  3 +// KS3iOSSDKDemo
  4 +//
  5 +// Created by Blues on 12/18/14.
  6 +// Copyright (c) 2014 Blues. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3SetObjectGrantACLResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3URLRequest.h 0 → 100755
  1 +//
  2 +// KingSoftURLRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Credentials.h"
  10 +#import <Foundation/Foundation.h>
  11 +
  12 +@interface KS3URLRequest : NSMutableURLRequest
  13 +@property(weak, nonatomic) KS3Credentials *credentials;
  14 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3Upload.h 0 → 100755
  1 +//
  2 +// KS3Upload.h
  3 +// Pods
  4 +//
  5 +// Created by Sun Peng on 2017/5/4.
  6 +//
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +#import "KS3MultipartUpload.h"
  11 +
  12 +@interface KS3Upload : KS3MultipartUpload <NSCopying>
  13 +
  14 +@property (assign, nonatomic) NSInteger contentLength;
  15 +@property (assign, nonatomic) NSInteger blockSize;
  16 +@property (assign, nonatomic) NSInteger partCount;
  17 +
  18 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3UploadPartRequest.h 0 → 100755
  1 +//
  2 +// KSS3UploadPartRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3MultipartUpload.h"
  10 +#import "KS3Request.h"
  11 +
  12 +@interface KS3UploadPartRequest : KS3Request
  13 +
  14 +@property(nonatomic, strong) NSString *expect;
  15 +
  16 +@property(nonatomic, assign) int32_t partNumber;
  17 +@property(nonatomic, assign) BOOL generateMD5;
  18 +@property(nonatomic, strong) NSString *uploadId;
  19 +@property(nonatomic, strong) NSData *data;
  20 +@property(nonatomic, strong) NSString *key;
  21 +@property(strong, nonatomic) KS3MultipartUpload *multipartUpload;
  22 +- (id)initWithMultipartUpload:(KS3MultipartUpload *)multipartUpload
  23 + partNumber:(int32_t)partNumber
  24 + data:(NSData *)data
  25 + generateMD5:(BOOL)generateMD5;
  26 +
  27 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3UploadPartResponse.h 0 → 100755
  1 +//
  2 +// KSS3UploadPartResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3UploadPartResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3UploadRequest.h 0 → 100755
  1 +//
  2 +// KS3UploadRequest.h
  3 +// Pods
  4 +//
  5 +// Created by Sun Peng on 2017/5/4.
  6 +//
  7 +//
  8 +
  9 +#import "KS3InitiateMultipartUploadRequest.h"
  10 +
  11 +@interface KS3UploadRequest : KS3InitiateMultipartUploadRequest
  12 +
  13 +- (id)initWithKey:(NSString *)aKey
  14 + inBucket:(NSString *)aBucket
  15 + acl:(KS3AccessControlList *)acl
  16 + grantAcl:(NSArray *)arrGrantAcl;
  17 +
  18 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3WebServiceClient.h 0 → 100755
  1 +//
  2 +// KingSoftWebServiceClient.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3AbstractWebServiceClient.h"
  10 +
  11 +@interface KS3WebServiceClient : KS3AbstractWebServiceClient
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Headers/KS3YunSDK.h 0 → 100755
  1 +//
  2 +// KS3YunSDK.h
  3 +// KS3YunSDK
  4 +//
  5 +// Created by JackWong on 12/18/14.
  6 +// Copyright (c) 2014 KS3. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +#ifdef __OBJC__
  11 +
  12 +//! Project version number for KS3YunSDK.
  13 +FOUNDATION_EXPORT double KS3YunSDKVersionNumber;
  14 +
  15 +//! Project version string for KS3YunSDK.
  16 +FOUNDATION_EXPORT const unsigned char KS3YunSDKVersionString[];
  17 +
  18 +// In this header, you should import all the public headers of your framework
  19 +// using statements like #import <KS3YunSDK/PublicHeader.h>
  20 +#import "KS3AbortMultipartUploadRequest.h"
  21 +#import "KS3AbortMultipartUploadResponse.h"
  22 +#import "KS3AbstractPutRequest.h"
  23 +#import "KS3AbstractWebServiceClient.h"
  24 +#import "KS3AccessControlList.h"
  25 +#import "KS3AuthUtils.h"
  26 +#import "KS3Bucket.h"
  27 +#import "KS3BucketACLResult.h"
  28 +#import "KS3BucketACLXMLParser.h"
  29 +#import "KS3BucketNameUtilities.h"
  30 +#import "KS3BucketObject.h"
  31 +#import "KS3Client.h"
  32 +#import "KS3ClientException.h"
  33 +#import "KS3CompleteMultipartUploadRequest.h"
  34 +#import "KS3CompleteMultipartUploadResponse.h"
  35 +#import "KS3CompleteMultipartUploadResult.h"
  36 +#import "KS3Constants.h"
  37 +#import "KS3CreateBucketRequest.h"
  38 +#import "KS3CreateBucketResponse.h"
  39 +#import "KS3Credentials.h"
  40 +#import "KS3DeleteBucketRequest.h"
  41 +#import "KS3DeleteBucketResponse.h"
  42 +#import "KS3DeleteObjectRequest.h"
  43 +#import "KS3DeleteObjectResponse.h"
  44 +#import "KS3DownLoad.h"
  45 +#import "KS3ErrorHandler.h"
  46 +#import "KS3GetACLRequest.h"
  47 +#import "KS3GetACLResponse.h"
  48 +#import "KS3GetBucketLoggingRequest.h"
  49 +#import "KS3GetBucketLoggingResponse.h"
  50 +#import "KS3GetObjectACLRequest.h"
  51 +#import "KS3GetObjectACLResponse.h"
  52 +#import "KS3GetObjectRequest.h"
  53 +#import "KS3GetObjectResponse.h"
  54 +#import "KS3Grant.h"
  55 +#import "KS3GrantAccessControlList.h"
  56 +#import "KS3HeadBucketRequest.h"
  57 +#import "KS3HeadBucketResponse.h"
  58 +#import "KS3HeadObjectRequest.h"
  59 +#import "KS3HeadObjectResponse.h"
  60 +#import "KS3InitiateMultipartUploadRequest.h"
  61 +#import "KS3InitiateMultipartUploadResponse.h"
  62 +#import "KS3InitiateMultipartUploadResult.h"
  63 +#import "KS3InitiateMultipartUploadXMLParser.h"
  64 +#import "KS3ListBucketsRequest.h"
  65 +#import "KS3ListBucketsResponse.h"
  66 +#import "KS3ListBucketsResult.h"
  67 +#import "KS3ListBucketsXMLParser.h"
  68 +#import "KS3ListObjectsRequest.h"
  69 +#import "KS3ListObjectsResponse.h"
  70 +#import "KS3ListObjectsResult.h"
  71 +#import "KS3ListObjectsXMLPrarser.h"
  72 +#import "KS3ListPartsRequest.h"
  73 +#import "KS3ListPartsResponse.h"
  74 +#import "KS3ListPartsResult.h"
  75 +#import "KS3ListPartsResultXMLParser.h"
  76 +#import "KS3MD5Util.h"
  77 +#import "KS3MultipartUpload.h"
  78 +#import "KS3ObjectACLXMLParser.h"
  79 +#import "KS3ObjectSummary.h"
  80 +#import "KS3Owner.h"
  81 +#import "KS3Part.h"
  82 +#import "KS3PutObjectCopyRequest.h"
  83 +#import "KS3PutObjectCopyResponse.h"
  84 +#import "KS3PutObjectRequest.h"
  85 +#import "KS3PutObjectResponse.h"
  86 +#import "KS3Request.h"
  87 +#import "KS3Response.h"
  88 +#import "KS3ResponseHeaderOverrides.h"
  89 +#import "KS3SDKUtil.h"
  90 +#import "KS3ServiceRequest.h"
  91 +#import "KS3ServiceResponse.h"
  92 +#import "KS3SetACLRequest.h"
  93 +#import "KS3SetACLResponse.h"
  94 +#import "KS3SetBucketLoggingRequest.h"
  95 +#import "KS3SetBucketLoggingResponse.h"
  96 +#import "KS3SetGrantACLRequest.h"
  97 +#import "KS3SetGrantACLResponse.h"
  98 +#import "KS3SetObjectACLRequest.h"
  99 +#import "KS3SetObjectACLResponse.h"
  100 +#import "KS3SetObjectGrantACLRequest.h"
  101 +#import "KS3SetObjectGrantACLResponse.h"
  102 +#import "KS3URLRequest.h"
  103 +#import "KS3UploadPartRequest.h"
  104 +#import "KS3UploadPartResponse.h"
  105 +#import "KS3WebServiceClient.h"
  106 +#import "KS3Upload.h"
  107 +#import "KS3UploadRequest.h"
  108 +#endif
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Info.plist 0 → 100644
No preview for this file type
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/KS3YunSDK 0 → 100755
No preview for this file type
CNLiveUploadYunSDKDemo/KS3YunSDK.framework/Modules/module.modulemap 0 → 100644
  1 +framework module KS3YunSDK {
  2 + umbrella header "KS3YunSDK.h"
  3 +
  4 + export *
  5 + module * { export * }
  6 +}
CNLiveUploadYunSDKDemo/iOS 视讯云上传SDK使用说明文档.pdf 0 → 100644
No preview for this file type
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/CNLiveUploadYunSDK 0 → 100755
No preview for this file type
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/Headers/CNLiveAbortMultipartUploadRequest.h 0 → 100644
  1 +//
  2 +// CNLiveAbortMultipartUploadRequest.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +
  11 +@class CNLiveMultipartUpload;
  12 +
  13 +@interface CNLiveAbortMultipartUploadRequest : KS3AbortMultipartUploadRequest
  14 +
  15 +@property(strong, nonatomic) NSString *CNYResource;
  16 +@property(nonatomic, strong) NSString *strCNLiveToken;
  17 +
  18 +- (id)initWithMultipartUpload:(CNLiveMultipartUpload *)multipartUpload;
  19 +
  20 +- (NSString *)CNYHeader;
  21 +@end
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/Headers/CNLiveAbortMultipartUploadResponse.h 0 → 100644
  1 +//
  2 +// CNLiveAbortMultipartUploadResponse.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +
  11 +@interface CNLiveAbortMultipartUploadResponse : KS3AbortMultipartUploadResponse
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/Headers/CNLiveAccessControlList.h 0 → 100644
  1 +//
  2 +// CNLiveAccessControlList.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +#import <Foundation/Foundation.h>
  9 +
  10 +typedef NS_ENUM(NSInteger, CNLiveYun_PermissionACLType) {
  11 + CNLiveYun_Permission_Private,
  12 + CNLiveYun_Permission_Public_Read,
  13 + CNLiveYun_Permission_Public_Read_Write,
  14 + CNLiveYun_Permission_Authenticated_Read,
  15 +};
  16 +
  17 +@interface CNLiveAccessControlList : NSObject
  18 +
  19 +@property(strong, nonatomic) NSString *accessACL;
  20 +- (NSString *)setContronAccess:(CNLiveYun_PermissionACLType)aclType;
  21 +
  22 +@end
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/Headers/CNLiveClient.h 0 → 100644
  1 +//
  2 +// CNLiveClient.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@class ALAsset;
  12 +@class CNLiveMultipartUpload;
  13 +@class CNLiveInitiateMultipartUploadRequest;
  14 +@class CNLiveListPartsResponse;
  15 +@class CNLiveListPartsRequest;
  16 +@class CNLiveInitiateMultipartUploadResponse;
  17 +@class CNLiveUploadPartResponse;
  18 +@class CNLiveUploadPartRequest;
  19 +@class CNLivePutObjectResponse;
  20 +@class CNLivePutObjectRequest;
  21 +@class CNLiveAbortMultipartUploadResponse;
  22 +@class CNLiveAbortMultipartUploadRequest;
  23 +@class CNLiveCompleteMultipartUploadResponse;
  24 +@class CNLiveCompleteMultipartUploadRequest;
  25 +
  26 +typedef enum {
  27 + CNLiveBucketBeijing = 0,
  28 + CNLiveBucketAmerica,
  29 + CNLiveBucketHongkong,
  30 + CNLiveBucketHangzhou,
  31 + CNLiveBucketShanghai,
  32 +} CNLiveBucketDomainRegion; // bucket所在地区
  33 +
  34 +@interface CNLiveClient : NSObject
  35 +
  36 +@property(assign, nonatomic) BOOL enableHTTPS;
  37 +
  38 +/**
  39 + * 初始化
  40 + *
  41 + * @return Client对象
  42 + */
  43 ++ (instancetype)initialize;
  44 +
  45 +/**
  46 + * 设置CNLiveBucket所在的地区,默认北京
  47 +
  48 + * @param domainRegion 共有北京,杭州,美国圣克拉拉,香港,上海五个
  49 + * 注释:建议在工程的delegate里面实现
  50 + */
  51 +- (void)setBucketDomainWithRegion:(CNLiveBucketDomainRegion)domainRegion;
  52 +
  53 +/*
  54 + 设置CNLiveBucket 所在的地区,绑定bucket的自定义域名
  55 + @param 自定义的域名
  56 + */
  57 +- (void)setBucketDomain:(NSString *)domainRegion;
  58 +
  59 +/**
  60 + * 获取用户自定义的域名
  61 + * 如果没有设置,返回nil
  62 + */
  63 +- (NSString *)getCustomBucketDomain;
  64 +
  65 +/**
  66 + * 获取当前bucket所在地区,默认北京
  67 + 共有北京,杭州,美国圣克拉拉,香港四个
  68 + */
  69 +- (NSString *)getBucketDomain;
  70 +
  71 +/**
  72 + * 返回请求协议:http/https
  73 + * 目前由enableHTTPS决定
  74 + */
  75 +- (NSString *)requestProtocol;
  76 +
  77 +/**
  78 + * 调用这个接口会初始化一个分块上传
  79 + *
  80 + * @param request 分块上传请求CNLiveInitiateMultipartUploadRequest
  81 + *
  82 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  83 + */
  84 +- (CNLiveMultipartUpload *)initiateMultipartUploadWithRequest:
  85 +(CNLiveInitiateMultipartUploadRequest *)request;
  86 +
  87 +/**
  88 + * 获取相册分块数据
  89 + *
  90 + * @param partNum 从1开始计数,第一块partNum = 1
  91 + * @param partlength 每一块数据的大小,单位为字节
  92 + * @param assets Alasset对象,是获取视频数据的类
  93 + *
  94 + * @return 相册分块数据
  95 + */
  96 +- (NSData *)getUploadPartDataWithPartNum:(NSInteger)partNum
  97 + partLength:(NSInteger)partlength
  98 + Alasset:(ALAsset *)assets;
  99 +
  100 +/**
  101 + * 罗列出已经上传的块
  102 + *
  103 + * @param listPartsRequest 设置罗列已经上传的分块的request信息
  104 + *
  105 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  106 + */
  107 +
  108 +- (CNLiveListPartsResponse *)listParts:(CNLiveListPartsRequest *)listPartsRequest;
  109 +
  110 +/**
  111 + * 组装所有分块上传的文件
  112 + *
  113 + * @param completeMultipartUploadRequest 设置组装所有分块的http信息
  114 + *
  115 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  116 + */
  117 +- (CNLiveCompleteMultipartUploadResponse *)completeMultipartUpload:
  118 +(CNLiveCompleteMultipartUploadRequest *)completeMultipartUploadRequest;
  119 +
  120 +/**
  121 + 上传分块
  122 +
  123 + @param uploadPartRequest 指定上传分块的request信息
  124 + @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  125 + */
  126 +- (CNLiveUploadPartResponse *)uploadPart:(CNLiveUploadPartRequest *)uploadPartRequest;
  127 +
  128 +/**
  129 + * 取消分块上传
  130 + *
  131 + * @param abortMultipartRequest 设置分块文件属性
  132 + *
  133 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  134 + */
  135 +- (CNLiveAbortMultipartUploadResponse *)abortMultipartUpload:
  136 +(CNLiveAbortMultipartUploadRequest *)abortMultipartRequest;
  137 +
  138 +
  139 +/**
  140 + 单块上传
  141 +
  142 + @param putObjectRequest 指定上传单块的request信息
  143 + @return 返回单块的response信息
  144 + */
  145 +- (CNLivePutObjectResponse *)putObject:(CNLivePutObjectRequest *)putObjectRequest;
  146 +
  147 +/**
  148 + * 返回版本信息
  149 + *
  150 + * @return 版本信息
  151 + */
  152 ++ (NSString *)apiVersion;
  153 +@end
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/Headers/CNLiveCompleteMultipartUploadRequest.h 0 → 100644
  1 +//
  2 +// CNLiveCompleteMultipartUploadRequest.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/25.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +#import "CNLiveMultipartUpload.h"
  11 +
  12 +@interface CNLiveCompleteMultipartUploadRequest : KS3CompleteMultipartUploadRequest
  13 +
  14 +@property(strong, nonatomic) NSString *CNYResource;
  15 +@property(nonatomic, strong) NSString *strCNLiveToken;
  16 +
  17 +- (NSString *)CNYHeader;
  18 +- (id)initWithMultipartUpload:(CNLiveMultipartUpload *)multipartUpload;
  19 +
  20 +@end
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/Headers/CNLiveCompleteMultipartUploadResponse.h 0 → 100644
  1 +//
  2 +// CNLiveCompleteMultipartUploadResponse.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/25.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +
  11 +@interface CNLiveCompleteMultipartUploadResponse : KS3CompleteMultipartUploadResponse
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/Headers/CNLiveConstants.h 0 → 100644
  1 +//
  2 +// CNLiveConstants.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#ifndef CNLiveConstants_h
  10 +#define CNLiveConstants_h
  11 +
  12 +#define kCNLiveHttpMethodPut @"PUT"
  13 +#define kCNLiveHttpMethodGet @"GET"
  14 +
  15 +#define kCNLiveHttpMethodPost @"POST"
  16 +#define kCNLiveHttpMethodDelete @"DELETE"
  17 +
  18 +#define kCNLiveQueryParamEncodingType @"encoding-type"
  19 +
  20 +#define kCNLiveHttpHdrContentMD5 @"Content-MD5"
  21 +
  22 +#define kCNLiveHttpHdrContentEncoding @"Content-Encoding"
  23 +#define kCNLiveHttpHdrContentDisposition @"Content-Disposition"
  24 +#define kCNLiveHttpHdrCacheControl @"Cache-Control"
  25 +#define kCNLiveHttpHdrContentLength @"Content-Length"
  26 +
  27 +#define kCNLiveHttpHdrContentType @"Content-Type"
  28 +
  29 +#define kCNLiveQueryParamPartNumber @"partNumber"
  30 +#define kCNLiveQueryParamUploadId @"uploadId"
  31 +#define kCNLiveQueryParamMaxParts @"max-parts"
  32 +#define kCNLiveQueryParamPartNumberMarker @"part-number-marker"
  33 +
  34 +#endif /* CNLiveConstants_h */
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/Headers/CNLiveInitiateMultipartUploadRequest.h 0 → 100644
  1 +//
  2 +// CNLiveInitiateMultipartUploadRequest.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +
  11 +@class CNLiveAccessControlList;
  12 +
  13 +@interface CNLiveInitiateMultipartUploadRequest : KS3InitiateMultipartUploadRequest
  14 +
  15 +@property(strong, nonatomic) NSString *CNYResource;
  16 +@property(nonatomic, strong) NSString *strCNLiveToken;
  17 +
  18 +- (id)initWithKey:(NSString *)aKey
  19 + inBucket:(NSString *)aBucket
  20 + acl:(CNLiveAccessControlList *)acl
  21 + grantAcl:(NSArray *)arrGrantAcl;
  22 +
  23 +- (NSString *)CNYHeader;
  24 +@end
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/Headers/CNLiveInitiateMultipartUploadResponse.h 0 → 100644
  1 +//
  2 +// CNLiveInitiateMultipartUploadResponse.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/25.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +
  11 +@interface CNLiveInitiateMultipartUploadResponse : KS3InitiateMultipartUploadResponse
  12 +@end
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/Headers/CNLiveListPartsRequest.h 0 → 100644
  1 +//
  2 +// CNLiveListPartsRequest.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +#import "CNLiveMultipartUpload.h"
  11 +
  12 +@interface CNLiveListPartsRequest : KS3ListPartsRequest
  13 +
  14 +@property(strong, nonatomic) NSString *CNYResource;
  15 +@property(nonatomic, strong) NSString *strCNLiveToken;
  16 +
  17 +- (id)initWithMultipartUpload:(CNLiveMultipartUpload *)multipartUpload;
  18 +- (NSString *)CNYHeader;
  19 +@end
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/Headers/CNLiveListPartsResponse.h 0 → 100644
  1 +//
  2 +// CNLiveListPartsResponse.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +
  11 +@interface CNLiveListPartsResponse : KS3ListPartsResponse
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/Headers/CNLiveMultipartUpload.h 0 → 100644
  1 +//
  2 +// CNLiveMultipartUpload.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import "CNLiveOwner.h"
  10 +#import <Foundation/Foundation.h>
  11 +
  12 +//上传类型
  13 +typedef enum {
  14 + kCNLiveUploadAlasset = 0, //相册中
  15 + kCNLiveUploadNormal, //沙盒里或工程里
  16 +} CNLiveUploadType;
  17 +
  18 +
  19 +@interface CNLiveMultipartUpload : NSObject
  20 +
  21 +@property(nonatomic, strong) NSString *key;
  22 +
  23 +@property(nonatomic, strong) NSString *bucket;
  24 +
  25 +@property(nonatomic, strong) NSString *uploadId;
  26 +
  27 +@property(nonatomic, strong) NSString *storageClass;
  28 +
  29 +@property(nonatomic, strong) CNLiveOwner *initiator;
  30 +
  31 +@property(nonatomic, strong) CNLiveOwner *owner;
  32 +
  33 +@property(nonatomic, strong) NSDate *initiated;
  34 +
  35 +@property(assign, readonly) BOOL isCanceled;
  36 +
  37 +@property(assign, nonatomic, readonly) BOOL isPaused;
  38 +
  39 +@property(assign, nonatomic) CNLiveUploadType uploadType;
  40 +
  41 +//暂停
  42 +- (void)pause;
  43 +//继续
  44 +- (void)proceed;
  45 +//取消
  46 +- (void)cancel;
  47 +
  48 +
  49 +@end
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/Headers/CNLiveOwner.h 0 → 100644
  1 +//
  2 +// CNLiveOwner.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface CNLiveOwner : NSObject
  12 +
  13 +@property(strong, nonatomic) NSString *ID;
  14 +
  15 +@property(strong, nonatomic) NSString *displayName;
  16 +
  17 +- (id)initWithID:(NSString *)theID withDisplayName:(NSString *)theDisplayName;
  18 +
  19 ++ (id)ownerWithID:(NSString *)theID withDisplayName:(NSString *)theDisplayName;
  20 +@end
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/Headers/CNLivePart.h 0 → 100644
  1 +//
  2 +// CNLivePart.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface CNLivePart : NSObject
  12 +
  13 +@property(strong, nonatomic) NSString *etag;
  14 +
  15 +@property(strong, nonatomic) NSString *lastModified;
  16 +
  17 +@property(nonatomic, assign) int32_t partNumber;
  18 +
  19 +@property(nonatomic, assign) long long size;
  20 +
  21 +@end
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/Headers/CNLivePutObjectRequest.h 0 → 100644
  1 +//
  2 +// CNLivePutObjectRequest.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +
  11 +@class CNLiveAccessControlList;
  12 +@interface CNLivePutObjectRequest : KS3PutObjectRequest
  13 +@property(strong, nonatomic) NSString *CNYResource;
  14 +@property(nonatomic, strong) NSString *strCNLiveToken;
  15 +
  16 +- (instancetype)initWithName:(NSString *)bucketName
  17 + withAcl:(CNLiveAccessControlList *)acl
  18 + grantAcl:(NSArray *)arrGrantAcl;
  19 +- (NSString *)CNYHeader;
  20 +@end
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/Headers/CNLivePutObjectResponse.h 0 → 100644
  1 +//
  2 +// CNLivePutObjectResponse.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +
  11 +@interface CNLivePutObjectResponse : KS3PutObjectResponse
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/Headers/CNLiveSDKUtil.h 0 → 100644
  1 +//
  2 +// CNLiveSDKUtil.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +extern NSString *const CNLiveDefaultRunLoopMode;
  12 +
  13 +@interface CNLiveSDKUtil : NSObject
  14 +
  15 ++ (NSString *)base64md5FromData:(NSData *)data;
  16 +
  17 +@end
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/Headers/CNLiveUpload.h 0 → 100644
  1 +//
  2 +// CNLiveUpload.h
  3 +// CNLiveUploadSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/4.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface CNLiveUpload : NSObject
  12 +
  13 +/**
  14 + 初始化上传云SDK
  15 +
  16 + @param appId 在open.cnlive.com网站申请得到的appId
  17 + @param appKey 在open.cnlive.com网站申请得到的appKey
  18 + @param isTestEnvironment YES:测试环境 NO:正式环境
  19 + */
  20 ++ (void)setAppId:(NSString *)appId appKey:(NSString *)appKey isTestEnvironment:(BOOL)isTestEnvironment;
  21 +
  22 +/**
  23 + 获取鉴权Token
  24 +
  25 + @param md5 MD5加密数据
  26 + @param verb 请求方式GET/POST
  27 + @param type content-type
  28 + @param res 文件资源
  29 + @param headers 头文件信息
  30 + @param date 格林威治时间('D, d M Y H:i:s \G\M\T')
  31 + @param successBlock 成功回调
  32 + @param failureBlock 失败回调
  33 + */
  34 ++ (void)getTokenWithMd5:(NSString *)md5 verb:(NSString *)verb type:(NSString *)type res:(NSString *)res headers:(NSString *)headers date:(NSString *)date success:(void (^)(NSString *token))successBlock failure:(void (^)(NSDictionary *error))failureBlock;
  35 +@end
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/Headers/CNLiveUploadPartRequest.h 0 → 100644
  1 +//
  2 +// CNLiveUploadPartRequest.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +#import "CNLiveMultipartUpload.h"
  11 +
  12 +@interface CNLiveUploadPartRequest : KS3UploadPartRequest
  13 +@property(strong, nonatomic) NSString *CNYResource;
  14 +@property(nonatomic, strong) NSString *strCNLiveToken;
  15 +
  16 +- (id)initWithMultipartUpload:(CNLiveMultipartUpload *)multipartUpload
  17 + partNumber:(int32_t)partNumber
  18 + data:(NSData *)data
  19 + generateMD5:(BOOL)generateMD5;
  20 +- (NSString *)CNYHeader;
  21 +@end
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/Headers/CNLiveUploadPartResponse.h 0 → 100644
  1 +//
  2 +// CNLiveUploadPartResponse.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/25.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <KS3YunSDK/KS3YunSDK.h>
  10 +
  11 +@interface CNLiveUploadPartResponse : KS3UploadPartResponse
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/Headers/CNLiveUploadYunSDK.h 0 → 100644
  1 +//
  2 +// CNLiveUploadYunSDK.h
  3 +// CNLiveUploadYunSDK
  4 +//
  5 +// Created by 张旭 on 2017/8/24.
  6 +// Copyright © 2017年 cnlive. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +
  11 +#ifdef __OBJC__
  12 +
  13 +//! Project version number for CNLiveUploadYunSDK.
  14 +FOUNDATION_EXPORT double CNLiveUploadYunSDKVersionNumber;
  15 +
  16 +//! Project version string for CNLiveUploadYunSDK.
  17 +FOUNDATION_EXPORT const unsigned char CNLiveUploadYunSDKVersionString[];
  18 +
  19 +// In this header, you should import all the public headers of your framework using statements like #import <CNLiveUploadYunSDK/PublicHeader.h>
  20 +
  21 +#import "CNLiveUpload.h"
  22 +#import "CNLiveAbortMultipartUploadRequest.h"
  23 +#import "CNLiveAbortMultipartUploadResponse.h"
  24 +#import "CNLiveAccessControlList.h"
  25 +#import "CNLiveClient.h"
  26 +#import "CNLiveInitiateMultipartUploadRequest.h"
  27 +#import "CNLiveListPartsRequest.h"
  28 +#import "CNLiveListPartsResponse.h"
  29 +#import "CNLiveMultipartUpload.h"
  30 +#import "CNLiveOwner.h"
  31 +#import "CNLivePart.h"
  32 +#import "CNLivePutObjectRequest.h"
  33 +#import "CNLivePutObjectResponse.h"
  34 +#import "CNLiveSDKUtil.h"
  35 +#import "CNLiveUploadPartRequest.h"
  36 +#import "CNLiveCompleteMultipartUploadRequest.h"
  37 +#import "CNLiveCompleteMultipartUploadResponse.h"
  38 +
  39 +#endif
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/Info.plist 0 → 100644
No preview for this file type
CNLiveUploadYunSDKDemo/发布版SDK/CNLiveUploadYunSDK.framework/Modules/module.modulemap 0 → 100644
  1 +framework module CNLiveUploadYunSDK {
  2 + umbrella header "CNLiveUploadYunSDK.h"
  3 +
  4 + export *
  5 + module * { export * }
  6 +}
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3AbortMultipartUploadRequest.h 0 → 100755
  1 +//
  2 +// KSS3AbortMultipartUploadRequest.h
  3 +// KS3iOSSDKDemo
  4 +//
  5 +// Created by Blues on 12/18/14.
  6 +// Copyright (c) 2014 Blues. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3MultipartUpload.h"
  10 +#import "KS3Request.h"
  11 +
  12 +@interface KS3AbortMultipartUploadRequest : KS3Request
  13 +
  14 +@property(strong, nonatomic) NSString *key;
  15 +@property(strong, nonatomic) NSString *uploadId;
  16 +
  17 +- (instancetype)initWithName:(NSString *)bucketName;
  18 +- (id)initWithMultipartUpload:(KS3MultipartUpload *)multipartUpload;
  19 +
  20 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3AbortMultipartUploadResponse.h 0 → 100755
  1 +//
  2 +// KSS3AbortMultipartUploadResponse.h
  3 +// KS3iOSSDKDemo
  4 +//
  5 +// Created by Blues on 12/18/14.
  6 +// Copyright (c) 2014 Blues. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +@interface KS3AbortMultipartUploadResponse : KS3Response
  11 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3AbstractPutRequest.h 0 → 100755
  1 +//
  2 +// KSS3AbstractPutRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +@interface KS3AbstractPutRequest : KS3Request
  11 +
  12 +- (void)addMetadataWithValue:(NSString *)value forKey:(NSString *)aKey;
  13 +
  14 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3AbstractWebServiceClient.h 0 → 100755
  1 +//
  2 +// KingSoftAbstractWebServiceClient.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface KS3AbstractWebServiceClient : NSObject
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3AccessControlList.h 0 → 100755
  1 +//
  2 +// KSS3AccessControlList.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +typedef NS_ENUM(NSInteger, KingSoftYun_PermissionACLType) {
  12 + KingSoftYun_Permission_Private,
  13 + KingSoftYun_Permission_Public_Read,
  14 + KingSoftYun_Permission_Public_Read_Write,
  15 + KingSoftYun_Permission_Authenticated_Read,
  16 +
  17 +};
  18 +
  19 +@interface KS3AccessControlList : NSObject
  20 +@property(strong, nonatomic) NSString *accessACL;
  21 +
  22 +- (NSString *)setContronAccess:(KingSoftYun_PermissionACLType)aclType;
  23 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3AuthUtils.h 0 → 100755
  1 +//
  2 +// KingSoftAuthUtils.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3AuthUtils.h"
  10 +#import <Foundation/Foundation.h>
  11 +typedef enum {
  12 + KSS3_HTTPVerbGet,
  13 + KSS3_HTTPVerbPost,
  14 + KSS3_HTTPVerbPut,
  15 + KSS3_HTTPVerbDelete,
  16 + KSS3_HTTPVerbHead,
  17 +} KSS3_HTTPVerbType;
  18 +
  19 +@class KS3ServiceRequest;
  20 +@class KS3Credentials;
  21 +@class KS3URLRequest;
  22 +
  23 +@interface KS3AuthUtils : NSObject
  24 +
  25 ++ (NSString *)KSYSignatureWithSecretKey:(NSString *)secretKey
  26 + httpVerb:(NSString *)httpVerb
  27 + contentMd5:(NSString *)strContentMd5
  28 + contentType:(NSString *)strContentType
  29 + date:(NSDate *)date
  30 + canonicalizedKssHeader:(NSString *)strHeaders
  31 + canonicalizedResource:(NSString *)strResource;
  32 +
  33 ++ (NSString *)KSYSignatureWithSecretKey:(NSString *)secretKey
  34 + httpVerb:(NSString *)httpVerb
  35 + contentMd5:(NSString *)strContentMd5
  36 + contentType:(NSString *)strContentType
  37 + strDate:(NSString *)strDate
  38 + canonicalizedKssHeader:(NSString *)strHeaders
  39 + canonicalizedResource:(NSString *)strResource;
  40 +
  41 ++ (NSString *)KSYAuthorizationWithAccessKey:(NSString *)accessKey
  42 + secretKey:(NSString *)secretKey
  43 + httpVerbType:(KSS3_HTTPVerbType)httpVerb
  44 + contentMd5:(NSString *)strContentMd5
  45 + contentType:(NSString *)strContentType
  46 + date:(NSDate *)date
  47 + canonicalizedKssHeader:(NSString *)strHeaders
  48 + canonicalizedResource:(NSString *)strResource;
  49 +
  50 ++ (NSString *)strDateWithDate:(NSDate *)date andType:(NSString *)strType;
  51 +
  52 ++ (void)signRequestV4:(KS3ServiceRequest *)serviceRequest
  53 + urlRequest:(KS3URLRequest *)urlRequest
  54 + headers:(NSMutableDictionary *)headers
  55 + payload:(NSString *)payload
  56 + credentials:(KS3Credentials *)credentials;
  57 +
  58 ++ (NSString *)KSYAuthorizationWithAccessKey:(NSString *)accessKey
  59 + secretKey:(NSString *)secretKey
  60 + httpVerb:(NSString *)httpVerb
  61 + contentMd5:(NSString *)strContentMd5
  62 + contentType:(NSString *)strContentType
  63 + date:(NSDate *)date
  64 + canonicalizedKssHeader:(NSString *)strHeaders
  65 + canonicalizedResource:(NSString *)strResource;
  66 +
  67 ++ (NSString *)KSYAuthorizationWithAccessKey:(NSString *)accessKey
  68 + secretKey:(NSString *)secretKey
  69 + httpVerb:(NSString *)httpVerb
  70 + contentMd5:(NSString *)strContentMd5
  71 + contentType:(NSString *)strContentType
  72 + strDate:(NSString *)strDate
  73 + canonicalizedKssHeader:(NSString *)strHeaders
  74 + canonicalizedResource:(NSString *)strResource;
  75 +
  76 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3Bucket.h 0 → 100755
  1 +//
  2 +// KSS3Buckket.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface KS3Bucket : NSObject
  12 +
  13 +@property(strong, nonatomic) NSString *name;
  14 +@property(strong, nonatomic) NSString *creationDate;
  15 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3BucketACLResult.h 0 → 100755
  1 +//
  2 +// KSS3BucketACLResult.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Grant.h"
  10 +#import "KS3Owner.h"
  11 +#import <Foundation/Foundation.h>
  12 +
  13 +@interface KS3BucketACLResult : NSObject
  14 +@property(strong, nonatomic) KS3Owner *owner;
  15 +@property(strong, nonatomic) NSMutableArray *accessControlList;
  16 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3BucketACLXMLParser.h 0 → 100755
  1 +//
  2 +// KSS3BucketACLXMLParser.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3BucketACLResult.h"
  10 +#import <Foundation/Foundation.h>
  11 +
  12 +@interface KS3BucketACLXMLParser : NSObject <NSXMLParserDelegate>
  13 +@property(strong, nonatomic) KS3BucketACLResult *listBuctkResult;
  14 +- (void)kSS3XMLarse:(NSData *)dataXml;
  15 +
  16 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3BucketNameUtilities.h 0 → 100755
  1 +//
  2 +// KS3BucketNameUtilities.h
  3 +// KS3YunSDK
  4 +//
  5 +// Created by JackWong on 12/23/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +@class KS3ClientException;
  11 +@interface KS3BucketNameUtilities : NSObject
  12 ++ (KS3ClientException *)validateBucketName:(NSString *)theBucketName;
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3BucketObject.h 0 → 100755
  1 +//
  2 +// KS3BucketObj.h
  3 +// KS3iOSSDKDemo
  4 +//
  5 +// Created by Blues on 15/4/15.
  6 +// Copyright (c) 2015年 Blues. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface KS3BucketObject : NSObject
  12 +@property(strong, nonatomic) NSString *bucketName;
  13 +@property(strong, nonatomic) NSString *objKey;
  14 +
  15 +- (instancetype)initWithBucketName:(NSString *)strBucketName
  16 + keyName:(NSString *)strKeyName;
  17 +
  18 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3Client.h 0 → 100755
  1 +//
  2 +// KingSoftS3Client.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +// 有问题联系
  8 +// QQ:315720327
  9 +// email:me@iluckly.com
  10 +//
  11 +
  12 +#import "KS3WebServiceClient.h"
  13 +
  14 +@class KingSoftURLConnection;
  15 +@class KS3DownLoad;
  16 +@class ALAsset;
  17 +#pragma mark - Download block
  18 +
  19 +typedef void (^KSS3GetTokenSuccessBlock)(NSString *strToken);
  20 +typedef void (^KSS3DownloadBeginBlock)(KS3DownLoad *aDownload,
  21 + NSURLResponse *responseHeaders);
  22 +typedef void (^KSS3DownloadProgressChangeBlock)(KS3DownLoad *aDownload,
  23 + double newProgress);
  24 +typedef void (^KSS3DownloadFailedBlock)(KS3DownLoad *aDownload, NSError *error);
  25 +typedef void (^kSS3DownloadFileCompleteionBlock)(KS3DownLoad *aDownload,
  26 + NSString *filePath);
  27 +
  28 +@class KS3DeleteBucketResponse;
  29 +@class KS3SetACLResponse;
  30 +@class KS3ListBucketsRequest;
  31 +@class KS3ListBucketsResponse;
  32 +@class KS3CreateBucketResponse;
  33 +@class KS3GetACLResponse;
  34 +@class KS3GetBucketLoggingResponse;
  35 +@class KS3SetBucketLoggingResponse;
  36 +@class KS3GetObjectResponse;
  37 +@class KS3DeleteObjectResponse;
  38 +@class KS3HeadObjectResponse;
  39 +@class KS3PutObjectResponse;
  40 +@class KS3GetObjectACLResponse;
  41 +@class KS3SetObjectACLResponse;
  42 +@class KS3UploadPartResponse;
  43 +@class KS3UploadPartRequest;
  44 +@class KS3MultipartUpload;
  45 +@class KS3ListPartsResponse;
  46 +@class KS3ListPartsRequest;
  47 +@class KS3CompleteMultipartUploadResponse;
  48 +@class KS3CompleteMultipartUploadRequest;
  49 +@class KS3ListObjectsResponse;
  50 +@class KS3ListObjectsRequest;
  51 +@class KS3CreateBucketRequest;
  52 +@class KS3DeleteBucketResponse;
  53 +@class KS3DeleteBucketRequest;
  54 +@class KS3SetACLRequest;
  55 +@class KS3PutObjectRequest;
  56 +@class KS3GetObjectACLRequest;
  57 +@class KS3SetObjectACLRequest;
  58 +@class KS3DeleteObjectRequest;
  59 +@class KS3AbortMultipartUploadRequest;
  60 +@class KS3AbortMultipartUploadResponse;
  61 +@class KS3HeadBucketRequest;
  62 +@class KS3HeadBucketResponse;
  63 +@class KS3GetACLRequest;
  64 +@class KS3GetObjectRequest;
  65 +@class KS3HeadObjectRequest;
  66 +@class KS3SetGrantACLResponse;
  67 +@class KS3SetGrantACLRequest;
  68 +@class KS3SetObjectGrantACLResponse;
  69 +@class KS3SetObjectGrantACLRequest;
  70 +@class KS3SetBucketLoggingRequest;
  71 +@class KS3PutObjectCopyRequest;
  72 +@class KS3PutObjectCopyResponse;
  73 +@class KS3Response;
  74 +@class KS3Request;
  75 +@class KS3InitiateMultipartUploadRequest;
  76 +@class KS3InitiateMultipartUploadResponse;
  77 +@class KS3GetBucketLoggingRequest;
  78 +@class KS3Credentials;
  79 +
  80 +typedef enum {
  81 + KS3BucketBeijing = 0,
  82 + KS3BucketAmerica,
  83 + KS3BucketHongkong,
  84 + KS3BucketHangzhou,
  85 + KS3BucketShanghai,
  86 +} KS3BucketDomainRegion; // bucket所在地区
  87 +
  88 +@interface KS3Client : KS3WebServiceClient
  89 +
  90 +@property(assign, nonatomic) BOOL enableHTTPS;
  91 +@property(strong, nonatomic) KS3Credentials *credentials;
  92 +
  93 +/**
  94 + * 初始化
  95 + *
  96 + * @return Client对象
  97 + */
  98 ++ (KS3Client *)initialize;
  99 +
  100 +/**
  101 + * 返回请求协议:http/https
  102 + * 目前由enableHTTPS决定
  103 + */
  104 +- (NSString *)requestProtocol;
  105 +
  106 +/**
  107 + * 设置AccessKey和SecretKey
  108 + *
  109 + * @param accessKey
  110 + * @param secretKey
  111 + * 注释:这个接口必须实现(这个是使用下面API的(前提))建议在工程的delegate里面实现
  112 + */
  113 +- (void)connectWithAccessKey:(NSString *)accessKey
  114 + withSecretKey:(NSString *)secretKey;
  115 +/**
  116 + * 设置KS3Bucket所在的地区,默认北京
  117 +
  118 + * @param 共有北京,杭州,美国圣克拉拉,香港四个
  119 + * 注释:建议在工程的delegate里面实现
  120 + */
  121 +- (void)setBucketDomainWithRegion:(KS3BucketDomainRegion)domainRegion;
  122 +
  123 +/*
  124 + 设置KS3Bucket 所在的地区
  125 + @param 自定义的域名
  126 + */
  127 +- (void)setBucketDomain:(NSString *)domainRegion;
  128 +
  129 +/**
  130 + * 获取当前bucket所在地区,默认北京
  131 + 共有北京,杭州,美国圣克拉拉,香港四个
  132 + */
  133 +- (NSString *)getBucketDomain;
  134 +
  135 +/**
  136 + * 获取用户自定义的域名
  137 + * 如果没有设置,返回nil
  138 + */
  139 +- (NSString *)getCustomBucketDomain;
  140 +
  141 +/**
  142 + * 列出客户所有的Bucket信息
  143 + *
  144 + * @return 所有bucket的数组
  145 + */
  146 +- (NSArray *)listBuckets:(KS3ListBucketsRequest *)listBucketsRequest;
  147 +
  148 +/**
  149 + * 创建一个新的Bucket
  150 + *
  151 + * @param createBucketRequest 设置创建bucket的request信息
  152 + *
  153 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  154 + */
  155 +- (KS3CreateBucketResponse *)createBucket:
  156 + (KS3CreateBucketRequest *)createBucketRequest;
  157 +/**
  158 + * 删除指定Bucket
  159 + *
  160 + * @param deleteBucketRequest 设置删除bucket的request信息
  161 + *
  162 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  163 + */
  164 +- (KS3DeleteBucketResponse *)deleteBucket:
  165 + (KS3DeleteBucketRequest *)deleteBucketRequest;
  166 +/**
  167 + * 查询是否已经存在指定Bucket
  168 + *
  169 + * @param headBucketRequest 设置是否已经存在指定Bucket的request信息
  170 + *
  171 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  172 + */
  173 +- (KS3HeadBucketResponse *)headBucket:(KS3HeadBucketRequest *)headBucketRequest;
  174 +
  175 +/**
  176 + * 获得Bucket的acl
  177 + *
  178 + * @param getACLRequest 设置获取Bucket的acl的request对象
  179 + *
  180 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  181 + */
  182 +- (KS3GetACLResponse *)getBucketACL:(KS3GetACLRequest *)getACLRequest;
  183 +/**
  184 + * 设置Bucket的ACL
  185 + *
  186 + * @param getACLRequest 设置设置Bucket的ACL的request对象
  187 + *
  188 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  189 + */
  190 +- (KS3SetACLResponse *)setBucketACL:(KS3SetACLRequest *)getACLRequest;
  191 +/**
  192 + * 设置GrantACL信息
  193 + *
  194 + * @param setGrantACLRequest 设置grantACL的request信息
  195 + *
  196 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  197 + */
  198 +- (KS3SetGrantACLResponse *)setGrantACL:
  199 + (KS3SetGrantACLRequest *)setGrantACLRequest;
  200 +/**
  201 + * 列举Bucket内的Object
  202 + *
  203 + * @param bucketName
  204 + *
  205 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  206 + */
  207 +- (KS3ListObjectsResponse *)listObjects:
  208 + (KS3ListObjectsRequest *)listObjectsRequest;
  209 +
  210 +/**
  211 + * 获得Bucket的日志信息
  212 + *
  213 + * @param bucketName
  214 + *
  215 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  216 + */
  217 +- (KS3GetBucketLoggingResponse *)getBucketLogging:
  218 + (KS3GetBucketLoggingRequest *)getBucketLoggingRequest;
  219 +/**
  220 + * 下载Object数据
  221 + *
  222 + * @param getObjectRequest 设置下载Object的request请求信息
  223 + *
  224 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  225 + */
  226 +- (KS3GetObjectResponse *)getObject:(KS3GetObjectRequest *)getObjectRequest;
  227 +/**
  228 + * 删除指定Object
  229 + *
  230 + * @param deleteObjectRequest 设置删除Object的request请求信息
  231 + *
  232 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  233 + */
  234 +- (KS3DeleteObjectResponse *)deleteObject:
  235 + (KS3DeleteObjectRequest *)deleteObjectRequest;
  236 +
  237 +/**
  238 + * 查询是否已经存在指定Object
  239 + *
  240 + * @param headObjectRequest 设置是否已存在Object的request的信息
  241 + *
  242 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  243 + */
  244 +- (KS3HeadObjectResponse *)headObject:(KS3HeadObjectRequest *)headObjectRequest;
  245 +/**
  246 + * 上传Object数据 (如果文件比较大请设置委托)
  247 + *
  248 + * @param putObjectRequest 设置上传object的request的信息
  249 + *
  250 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  251 + */
  252 +- (KS3PutObjectResponse *)putObject:(KS3PutObjectRequest *)putObjectRequest;
  253 +/**
  254 + * 把源Bucket里面的某个Object复制到目的Bucket里面一个指定的Object
  255 + *
  256 + * @param putObjectCopyRequest 设置setObjectACLRequest的request信息
  257 + *
  258 + * @return 返回response对象(里边有服务返回的数据(具体的参照demo)
  259 + */
  260 +- (KS3PutObjectCopyResponse *)putObjectCopy:
  261 + (KS3PutObjectCopyRequest *)putObjectCopyRequest;
  262 +
  263 +/**
  264 + * 获得Object的acl
  265 + *
  266 + * @param getObjectACLRequest 设置获取object的acl的request信息
  267 + *
  268 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  269 + */
  270 +- (KS3GetObjectACLResponse *)getObjectACL:
  271 + (KS3GetObjectACLRequest *)getObjectACLRequest;
  272 +/**
  273 + * 设置Object的acl
  274 + *
  275 + * @param setObjectACLRequest 设置设置object的acl的request信息
  276 + *
  277 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  278 + */
  279 +
  280 +- (KS3SetObjectACLResponse *)setObjectACL:
  281 + (KS3SetObjectACLRequest *)setObjectACLRequest;
  282 +/**
  283 + * 设置ObjectGrantACL
  284 + *
  285 + * @param setObjectGrantACLRequest 设置设置ObjectGrantACL的request信息
  286 + *
  287 + * @return @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  288 + */
  289 +
  290 +- (KS3SetObjectGrantACLResponse *)setObjectGrantACL:
  291 + (KS3SetObjectGrantACLRequest *)setObjectGrantACLRequest;
  292 +/**
  293 + * 调用这个接口会初始化一个分块上传
  294 + *
  295 + * @param theKey 指的是上传到bucketName的文件名称
  296 + * @param bucketName
  297 + *
  298 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  299 + */
  300 +- (KS3MultipartUpload *)initiateMultipartUploadWithRequest:
  301 + (KS3InitiateMultipartUploadRequest *)request;
  302 +
  303 +- (KS3InitiateMultipartUploadResponse *)initiateMultipartUploadWithRequestAndResponse:(KS3InitiateMultipartUploadRequest *)request;
  304 +
  305 +/**
  306 + * 上传分块
  307 + *
  308 + * @param uploadPartRequest 指定上传分块的request信息
  309 + *
  310 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  311 + */
  312 +- (KS3UploadPartResponse *)uploadPart:(KS3UploadPartRequest *)uploadPartRequest;
  313 +/**
  314 + * 获取相册分块数据
  315 + *
  316 + * @param partNum 从1开始计数,第一块partNum = 1
  317 + * @param partLength 每一块数据的大小,单位为字节
  318 + * @param alassetURL 形如assets-library://asset/asset.mov?
  319 + id=25A47CAE-87CF-47A3-8834-592D60841DDB&ext=mov 的相册地址 ,
  320 + *
  321 + * @return
  322 + */
  323 +- (NSData *)getUploadPartDataWithPartNum:(NSInteger)partNum
  324 + partLength:(NSInteger)partlength
  325 + alassetURL:(NSURL *)alassetURL;
  326 +/**
  327 + * 获取相册分块数据
  328 + *
  329 + * @param partNum 从1开始计数,第一块partNum = 1
  330 + * @param partLength 每一块数据的大小,单位为字节
  331 + * @param alassetURL Alasset对象,是获取视频数据的类 ,
  332 + *
  333 + * @return
  334 + */
  335 +- (NSData *)getUploadPartDataWithPartNum:(NSInteger)partNum
  336 + partLength:(NSInteger)partlength
  337 + Alasset:(ALAsset *)assets;
  338 +/**
  339 + * 获取相册类
  340 + * @param alassetURL 开头是assets-library://标识Alasset类的相册地址
  341 + *
  342 + * @return
  343 + */
  344 +- (ALAsset *)getAlassetFromAlassetURL:(NSURL *)alassetURL;
  345 +/**
  346 + * 罗列出已经上传的块
  347 + *
  348 + * @param listPartsRequest 设置罗列已经上传的分块的request信息
  349 + *
  350 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  351 + */
  352 +
  353 +- (KS3ListPartsResponse *)listParts:(KS3ListPartsRequest *)listPartsRequest;
  354 +/**
  355 + * 组装所有分块上传的文件
  356 + *
  357 + * @param completeMultipartUploadRequest 设置组装所有分块的http信息
  358 + *
  359 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  360 + */
  361 +- (KS3CompleteMultipartUploadResponse *)completeMultipartUpload:
  362 + (KS3CompleteMultipartUploadRequest *)completeMultipartUploadRequest;
  363 +/**
  364 + * 取消分块上传
  365 + *
  366 + * @param abortMultipartRequest 设置分块文件属性
  367 + *
  368 + * @return 返回resonse对象(里边有服务返回的数据(具体的参照demo))
  369 + */
  370 +- (KS3AbortMultipartUploadResponse *)abortMultipartUpload:
  371 + (KS3AbortMultipartUploadRequest *)abortMultipartRequest;
  372 +/**
  373 + * 下载Object数据
  374 + *
  375 + * @param bucketName
  376 + * @param key 文件所在的仓库路径(和listObject的key对应)(具体的参照demo)
  377 + * @param downloadBeginBlock 下载开始回调
  378 + * @param downloadFileCompleteion 下载完成回调
  379 + * @param downloadProgressChangeBlock 下载进度回调
  380 + * @param failedBlock 下载失败回调
  381 + *
  382 + * @return 一个下载器对象(里面有文件属性)
  383 + */
  384 +- (KS3DownLoad *)
  385 +downloadObjectWithBucketName:(NSString *)bucketName
  386 + key:(NSString *)key
  387 + downloadBeginBlock:(KSS3DownloadBeginBlock)downloadBeginBlock
  388 + downloadFileCompleteion:
  389 + (kSS3DownloadFileCompleteionBlock)downloadFileCompleteion
  390 + downloadProgressChangeBlock:
  391 + (KSS3DownloadProgressChangeBlock)downloadProgressChangeBlock
  392 + failedBlock:(KSS3DownloadFailedBlock)failedBlock;
  393 +
  394 +/**
  395 + * 返回版本信息
  396 + *
  397 + * @return 版本信息
  398 + */
  399 ++ (NSString *)apiVersion;
  400 +
  401 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3ClientException.h 0 → 100755
  1 +//
  2 +// KS3ClientException.h
  3 +// KS3YunSDK
  4 +//
  5 +// Created by JackWong on 12/22/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface KS3ClientException : NSException
  12 +
  13 +@property(strong, nonatomic) NSString *message;
  14 +
  15 +@property(strong, nonatomic) NSError *error;
  16 +
  17 ++ (id)exceptionWithMessage:(NSString *)theMessage;
  18 +
  19 ++ (id)exceptionWithMessage:(NSString *)theMessage andError:(NSError *)theError;
  20 +
  21 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3CompleteMultipartUploadRequest.h 0 → 100755
  1 +//
  2 +// KSS3CompleteMultipartUploadRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3MultipartUpload.h"
  10 +#import "KS3Request.h"
  11 +
  12 +@interface KS3CompleteMultipartUploadRequest : KS3Request
  13 +
  14 +@property(nonatomic, strong) NSString *key;
  15 +@property(nonatomic, strong) NSString *uploadId;
  16 +@property(nonatomic, strong) NSData *dataParts;
  17 +@property(nonatomic, strong) NSString *callbackUrl;
  18 +@property(nonatomic, strong) NSString *callbackBody;
  19 +@property(nonatomic, strong) NSDictionary *callbackParams;
  20 +
  21 +- (id)initWithMultipartUpload:(KS3MultipartUpload *)multipartUpload;
  22 +
  23 +- (void)addPartWithPartNumber:(int)partNumber withETag:(NSString *)etag;
  24 +
  25 +- (NSData *)requestBody;
  26 +
  27 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3CompleteMultipartUploadResponse.h 0 → 100755
  1 +//
  2 +// KSS3CompleteMultipartUploadResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3CompleteMultipartUploadResult.h"
  10 +#import "KS3Response.h"
  11 +
  12 +@interface KS3CompleteMultipartUploadResponse : KS3Response
  13 +@property(nonatomic, readonly)
  14 + KS3CompleteMultipartUploadResult *completeMultipartUploadResult;
  15 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3CompleteMultipartUploadResult.h 0 → 100755
  1 +//
  2 +// KSS3CompleteMultipartUploadResult.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface KS3CompleteMultipartUploadResult : NSObject
  12 +
  13 +@property(nonatomic, strong) NSString *location;
  14 +
  15 +@property(nonatomic, strong) NSString *bucket;
  16 +
  17 +@property(nonatomic, strong) NSString *key;
  18 +
  19 +@property(nonatomic, strong) NSString *etag;
  20 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3Constants.h 0 → 100755
  1 +//
  2 +// KS3Constants.h
  3 +// KS3YunSDK
  4 +//
  5 +// Created by JackWong on 12/22/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#ifndef KS3YunSDK_KS3Constants_h
  10 +#define KS3YunSDK_KS3Constants_h
  11 +
  12 +#define kHttpMethodPut @"PUT"
  13 +#define kHttpMethodGet @"GET"
  14 +#define kHttpMethodHead @"HEAD"
  15 +#define kHttpMethodPost @"POST"
  16 +#define kHttpMethodDelete @"DELETE"
  17 +#define kHttpHdrHost @"Host"
  18 +
  19 +#define kKS3QueryParamPrefix @"prefix"
  20 +#define kKS3QueryParamMarker @"marker"
  21 +#define kKS3QueryParamDelimiter @"delimiter"
  22 +#define kKS3QueryParamMaxKeys @"max-keys"
  23 +#define kKS3QueryParamEncodingType @"encoding-type"
  24 +#define kKS3QueryParamResponseContentType @"response-content-type"
  25 +#define kKS3QueryParamResponseContentLanguage @"response-content-language"
  26 +#define kKS3QueryParamResponseExpires @"response-expires"
  27 +#define kKS3QueryParamResponseCacheControl @"response-cache-control"
  28 +#define kKS3QueryParamResponseContentDisposition @"response-content-disposition"
  29 +#define kKS3QueryParamResponseContentEncoding @"response-content-encoding"
  30 +
  31 +#define kKS3HttpHdrContentMD5 @"Content-MD5"
  32 +
  33 +#define kKS3SubResourceUploads @"uploads"
  34 +#define kKSHttpHdrContentEncoding @"Content-Encoding"
  35 +#define kKSHttpHdrContentDisposition @"Content-Disposition"
  36 +#define kKSHttpHdrCacheControl @"Cache-Control"
  37 +#define kKSHttpHdrContentLength @"Content-Length"
  38 +#define kKSHttpHdrContentType @"Content-Type"
  39 +#define kKSHttpHdrRange @"Range"
  40 +#define kKSHttpHdrIfModifiedSince @"If-Modified-Since"
  41 +#define kKSHttpHdrIfUnmodifiedSince @"If-Unmodified-Since"
  42 +#define kKSHttpHdrIfMatch @"If-Match"
  43 +#define kKSHttpHdrIfNoneMatch @"If-None-Match"
  44 +
  45 +#define kKS3QueryParamPartNumber @"partNumber"
  46 +#define kKS3QueryParamUploadId @"uploadId"
  47 +#define kKS3QueryParamMaxParts @"max-parts"
  48 +#define kKS3QueryParamPartNumberMarker @"part-number-marker"
  49 +
  50 +#endif
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3CreateBucketRequest.h 0 → 100755
  1 +//
  2 +// KSS3CreateBucketRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +@interface KS3CreateBucketRequest : KS3Request
  11 +- (instancetype)initWithName:(NSString *)bucketName;
  12 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3CreateBucketResponse.h 0 → 100755
  1 +//
  2 +// KSS3CreateBucketResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3CreateBucketResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3Credentials.h 0 → 100755
  1 +//
  2 +// KingSoftCredentials.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface KS3Credentials : NSObject
  12 +
  13 +@property(strong, readonly, nonatomic) NSString *accessKey;
  14 +@property(strong, readonly, nonatomic) NSString *secretKey;
  15 +
  16 +- (id)initWithAccessKey:(NSString *)accessKey
  17 + withSecretKey:(NSString *)secretKey;
  18 +
  19 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3DeleteBucketRequest.h 0 → 100755
  1 +//
  2 +// KSS3DeleteBucketRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@interface KS3DeleteBucketRequest : KS3Request
  12 +
  13 +- (instancetype)initWithName:(NSString *)bucketName;
  14 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3DeleteBucketResponse.h 0 → 100755
  1 +//
  2 +// KSS3DeleteBucketResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/10/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3DeleteBucketResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3DeleteObjectRequest.h 0 → 100755
  1 +//
  2 +// KSS3DeleteObjectRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@interface KS3DeleteObjectRequest : KS3Request
  12 +
  13 +@property(nonatomic, strong) NSString *key;
  14 +
  15 +- (instancetype)initWithName:(NSString *)bucketName
  16 + withKeyName:(NSString *)strKey;
  17 +
  18 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3DeleteObjectResponse.h 0 → 100755
  1 +//
  2 +// KSS3DeleteObjectResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3DeleteObjectResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3DownLoad.h 0 → 100755
  1 +//
  2 +// MSDownLoad.h
  3 +// MusicSample
  4 +//
  5 +// Created by JackWong on 14-1-9.
  6 +// Copyright (c) 2014年 JackWong. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Client.h"
  10 +#import <Foundation/Foundation.h>
  11 +
  12 +@class KS3Credentials;
  13 +
  14 +@protocol KS3DownloadDelegate;
  15 +@interface KS3DownLoad : NSObject {
  16 +
  17 + BOOL _isFinished;
  18 + BOOL _isStop;
  19 + BOOL overwrite;
  20 + NSString *url;
  21 + NSString *fileName;
  22 + NSString *filePath;
  23 + unsigned long long fileSize;
  24 +@private
  25 + NSString *destinationPath;
  26 + NSString *temporaryPath;
  27 + NSFileHandle *fileHandle;
  28 + NSURLConnection *connection;
  29 + unsigned long long offset;
  30 +}
  31 +- (id)initWithUrl:(NSString *)aUrl
  32 + credentials:(KS3Credentials *)
  33 + credentials:(NSString *)
  34 + bucketName:(NSString *)objectKey;
  35 +
  36 +@property(nonatomic, weak) id<KS3DownloadDelegate> delegate;
  37 +
  38 +@property(strong, nonatomic) NSString *bucketName;
  39 +
  40 +@property(strong, nonatomic) NSString *key;
  41 +
  42 +@property(nonatomic, assign) BOOL overwrite;
  43 +
  44 +@property(nonatomic, strong) NSString *url;
  45 +
  46 +@property(nonatomic, strong) NSString *fileName;
  47 +
  48 +@property(nonatomic, strong) NSString *filePath;
  49 +
  50 +@property(strong, nonatomic) NSString *httpMethod;
  51 +
  52 +@property(strong, nonatomic) NSString *contentMd5;
  53 +
  54 +@property(strong, nonatomic) NSString *contentType;
  55 +
  56 +@property(strong, nonatomic) NSString *kSYHeader;
  57 +
  58 +@property(strong, nonatomic) NSString *kSYResource;
  59 +
  60 +@property(nonatomic, strong) NSString *strKS3Token;
  61 +
  62 +@property(strong, nonatomic) NSDate *requestDate;
  63 +
  64 +@property(strong, nonatomic) NSString *strDate;
  65 +
  66 +@property NSTimeInterval timeoutInterval;
  67 +
  68 +@property(nonatomic, readonly) unsigned long long fileSize;
  69 +
  70 +@property(copy, nonatomic)
  71 + KSS3DownloadProgressChangeBlock downloadProgressChangeBlock;
  72 +
  73 +@property(copy, nonatomic) KSS3DownloadFailedBlock failedBlock;
  74 +
  75 +@property(copy, nonatomic)
  76 + kSS3DownloadFileCompleteionBlock downloadFileCompleteionBlock;
  77 +
  78 +@property(copy, nonatomic) KSS3DownloadBeginBlock downloadBeginBlock;
  79 +
  80 +- (void)start;
  81 +
  82 +- (void)stop;
  83 +
  84 +- (void)stopAndClear;
  85 +
  86 +- (void)setStrKS3Token:(NSString *)ks3Token;
  87 +
  88 +@end
  89 +
  90 +@protocol KS3DownloadDelegate <NSObject>
  91 +
  92 +- (void)downloadBegin:(KS3DownLoad *)aDownload
  93 + didReceiveResponseHeaders:(NSURLResponse *)responseHeaders;
  94 +
  95 +- (void)downloadFaild:(KS3DownLoad *)aDownload
  96 + didFailWithError:(NSError *)error;
  97 +
  98 +- (void)downloadFinished:(KS3DownLoad *)aDownload filePath:(NSString *)filePath;
  99 +
  100 +- (void)downloadProgressChange:(KS3DownLoad *)aDownload
  101 + progress:(double)newProgress;
  102 +
  103 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3ErrorHandler.h 0 → 100755
  1 +//
  2 +// KS3ErrorHandler.h
  3 +// KS3YunSDK
  4 +//
  5 +// Created by JackWong on 12/23/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +extern NSString *const KS3iOSSDKServiceErrorDomain;
  12 +extern NSString *const KS3iOSSDKClientErrorDomain;
  13 +
  14 +@interface KS3ErrorHandler : NSObject
  15 ++ (void)shouldThrowExceptions __attribute__((deprecated));
  16 ++ (void)shouldNotThrowExceptions;
  17 ++ (BOOL)throwsExceptions;
  18 ++ (NSError *)errorFromExceptionWithThrowsExceptionOption:
  19 + (NSException *)exception;
  20 ++ (NSError *)errorFromException:(NSException *)exception;
  21 ++ (NSError *)errorFromException:(NSException *)exception
  22 + serviceErrorDomain:(NSString *)serviceErrorDomain
  23 + clientErrorDomain:(NSString *)clientErrorDomain;
  24 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3GetACLRequest.h 0 → 100755
  1 +//
  2 +// KSS3BucketACLRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@interface KS3GetACLRequest : KS3Request
  12 +- (instancetype)initWithName:(NSString *)bucketName;
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3GetACLResponse.h 0 → 100755
  1 +//
  2 +// KSS3BucketACLResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +@class KS3BucketACLResult;
  11 +@interface KS3GetACLResponse : KS3Response
  12 +
  13 +@property(nonatomic, strong) KS3BucketACLResult *listBucketsResult;
  14 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3GetBucketLoggingRequest.h 0 → 100755
  1 +//
  2 +// KSS3GetBucketLoggingRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@interface KS3GetBucketLoggingRequest : KS3Request
  12 +@property(nonatomic, strong) NSString *prefix;
  13 +
  14 +@property(nonatomic, strong) NSString *marker;
  15 +
  16 +@property(nonatomic) int32_t maxKeys;
  17 +
  18 +@property(nonatomic, retain) NSString *delimiter;
  19 +
  20 +- (instancetype)initWithName:(NSString *)bucketName;
  21 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3GetBucketLoggingResponse.h 0 → 100755
  1 +//
  2 +// KSS3GetBucketLoggingResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3GetBucketLoggingResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3GetObjectACLRequest.h 0 → 100755
  1 +//
  2 +// KSS3GetObjectACLRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@interface KS3GetObjectACLRequest : KS3Request
  12 +
  13 +@property(strong, nonatomic) NSString *key;
  14 +
  15 +- (instancetype)initWithName:(NSString *)bucketName
  16 + withKeyName:(NSString *)strKey;
  17 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3GetObjectACLResponse.h 0 → 100755
  1 +//
  2 +// KSS3GetObjectACLResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +@class KS3BucketACLResult;
  11 +@interface KS3GetObjectACLResponse : KS3Response
  12 +@property(nonatomic, strong) KS3BucketACLResult *listBucketsResult;
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3GetObjectRequest.h 0 → 100755
  1 +//
  2 +// KSS3GetObjectRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@interface KS3GetObjectRequest : KS3Request
  12 +
  13 +@property(nonatomic, strong) NSString *responseContentType;
  14 +@property(nonatomic, strong) NSString *responseContentLanguage;
  15 +@property(nonatomic, strong) NSString *responseExpires;
  16 +@property(nonatomic, strong) NSString *responseCacheControl;
  17 +@property(nonatomic, strong) NSString *responseContentDisposition;
  18 +@property(nonatomic, strong) NSString *responseContentEncoding;
  19 +
  20 +@property(nonatomic, strong) NSString *range;
  21 +@property(nonatomic, strong) NSString *ifModifiedSince;
  22 +@property(nonatomic, strong) NSString *ifUnmodifiedSince;
  23 +@property(nonatomic, strong) NSString *ifMatch;
  24 +@property(nonatomic, strong) NSString *ifNoneMatch;
  25 +@property(nonatomic, strong) NSString *versionId;
  26 +@property(nonatomic, strong) NSString *key;
  27 +
  28 +- (instancetype)initWithName:(NSString *)bucketName;
  29 +
  30 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3GetObjectResponse.h 0 → 100755
  1 +//
  2 +// KSS3GetObjectResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3GetObjectResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3Grant.h 0 → 100755
  1 +//
  2 +// KSS3Grant.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +@class KS3Grantee;
  11 +@interface KS3Grant : NSObject
  12 +@property(strong, nonatomic) NSString *permission;
  13 +@property(strong, nonatomic) KS3Grantee *grantee;
  14 +
  15 +@end
  16 +
  17 +@interface KS3Grantee : NSObject
  18 +@property(strong, nonatomic) NSString *ID;
  19 +@property(strong, nonatomic) NSString *displayName;
  20 +@property(strong, nonatomic) NSString *URI;
  21 +
  22 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3GrantAccessControlList.h 0 → 100755
  1 +//
  2 +// KSS3GrantAccessControlList.h
  3 +// KS3iOSSDKDemo
  4 +//
  5 +// Created by Blues on 12/18/14.
  6 +// Copyright (c) 2014 Blues. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +typedef enum {
  12 + KingSoftYun_Grant_Permission_Read,
  13 + KingSoftYun_Grant_Permission_Write,
  14 + KingSoftYun_Grant_Permission_Read_ACP,
  15 + KingSoftYun_Grant_Permission_Write_ACP,
  16 + KingSoftYun_Grant_Permission_Full_Control,
  17 +} KingSoftYun_GrantPermissionACLType;
  18 +
  19 +@interface KS3GrantAccessControlList : NSObject
  20 +
  21 +@property(nonatomic, strong) NSString *accessGrantACL;
  22 +@property(nonatomic, strong) NSString *identifier;
  23 +@property(nonatomic, strong) NSString *displayName;
  24 +
  25 +- (NSString *)setGrantControlAccess:
  26 + (KingSoftYun_GrantPermissionACLType)grantAclType;
  27 +
  28 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3HeadBucketRequest.h 0 → 100755
  1 +//
  2 +// KSS3HeadBucketRequest.h
  3 +// KS3YunSDK
  4 +//
  5 +// Created by Blues on 12/18/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +#import "KS3Request.h"
  9 +@interface KS3HeadBucketRequest : KS3Request
  10 +- (instancetype)initWithName:(NSString *)bucketName;
  11 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3HeadBucketResponse.h 0 → 100755
  1 +//
  2 +// KSS3HeadBucketResponse.h
  3 +// KS3YunSDK
  4 +//
  5 +// Created by Blues on 12/18/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3HeadBucketResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3HeadObjectRequest.h 0 → 100755
  1 +//
  2 +// KSS3HeadObjectRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@interface KS3HeadObjectRequest : KS3Request
  12 +
  13 +@property(nonatomic, strong) NSString *range;
  14 +@property(nonatomic, strong) NSString *ifModifiedSince;
  15 +@property(nonatomic, strong) NSString *ifUnmodifiedSince;
  16 +@property(nonatomic, strong) NSString *ifMatch;
  17 +@property(nonatomic, strong) NSString *ifNoneMatch;
  18 +@property(nonatomic, strong) NSString *key;
  19 +
  20 +- (instancetype)initWithName:(NSString *)bucketName
  21 + withKeyName:(NSString *)strKey;
  22 +
  23 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3HeadObjectResponse.h 0 → 100755
  1 +//
  2 +// KSS3HeadObjectResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3HeadObjectResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3InitiateMultipartUploadRequest.h 0 → 100755
  1 +//
  2 +// KSS3InitiateMultipartUploadRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3AbstractPutRequest.h"
  10 +
  11 +@class KS3AccessControlList;
  12 +@class KS3GrantAccessControlList;
  13 +
  14 +@interface KS3InitiateMultipartUploadRequest : KS3AbstractPutRequest
  15 +
  16 +- (id)initWithKey:(NSString *)aKey
  17 + inBucket:(NSString *)aBucket
  18 + acl:(KS3AccessControlList *)acl
  19 + grantAcl:(NSArray *)arrGrantAcl;
  20 +
  21 +@property(nonatomic, strong) NSString *key;
  22 +@property(nonatomic, strong) NSString *cacheControl;
  23 +@property(nonatomic, strong) NSString *contentDisposition;
  24 +@property(nonatomic, strong) NSString *contentEncoding;
  25 +@property(nonatomic, strong) NSString *expires;
  26 +@property(nonatomic, strong) NSString *xkssMeta;
  27 +@property(nonatomic, strong) NSString *xkssStorageClass;
  28 +@property(nonatomic, strong) NSString *xkssWebSiteRedirectLocation;
  29 +@property(nonatomic, strong) NSString *xkssAcl;
  30 +@property(nonatomic, strong) KS3AccessControlList *acl;
  31 +@property(nonatomic, strong) NSArray *arrGrantAcl;
  32 +
  33 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3InitiateMultipartUploadResponse.h 0 → 100755
  1 +//
  2 +// KSS3InitiateMultipartUploadResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3MultipartUpload.h"
  10 +#import "KS3Response.h"
  11 +
  12 +@interface KS3InitiateMultipartUploadResponse : KS3Response
  13 +@property(nonatomic, strong) KS3MultipartUpload *multipartUpload;
  14 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3InitiateMultipartUploadResult.h 0 → 100755
  1 +//
  2 +// KSS3InitiateMultipartUploadResult.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3MultipartUpload.h"
  10 +#import <Foundation/Foundation.h>
  11 +
  12 +@interface KS3InitiateMultipartUploadResult : NSObject
  13 +@property(strong, nonatomic) KS3MultipartUpload *multipartUpload;
  14 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3InitiateMultipartUploadXMLParser.h 0 → 100755
  1 +//
  2 +// KSS3InitiateMultipartUploadXMLParser.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3InitiateMultipartUploadResult.h"
  10 +#import <Foundation/Foundation.h>
  11 +
  12 +@interface KS3InitiateMultipartUploadXMLParser : NSObject <NSXMLParserDelegate>
  13 +@property(strong, nonatomic) KS3InitiateMultipartUploadResult *listBuctkResult;
  14 +- (void)kSS3XMLarse:(NSData *)dataXml;
  15 +
  16 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3ListBucketsRequest.h 0 → 100755
  1 +//
  2 +// S3ListBucketsRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@interface KS3ListBucketsRequest : KS3Request
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3ListBucketsResponse.h 0 → 100755
  1 +//
  2 +// S3ListBucketsResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +@class KS3ListBucketsResult;
  11 +@interface KS3ListBucketsResponse : KS3Response
  12 +
  13 +@property(nonatomic, strong) KS3ListBucketsResult *listBucketsResult;
  14 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3ListBucketsResult.h 0 → 100755
  1 +//
  2 +// KSS3ListBucketsResult.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/11/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +@class KS3Owner;
  11 +
  12 +@interface KS3ListBucketsResult : NSObject
  13 +
  14 +@property(nonatomic, strong) KS3Owner *owner;
  15 +@property(nonatomic, strong) NSMutableArray *buckets;
  16 +
  17 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3ListBucketsXMLParser.h 0 → 100755
  1 +//
  2 +// KSS3ListBucketsXMLParser.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/11/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3ListBucketsResult.h"
  10 +#import "KS3Owner.h"
  11 +#import <Foundation/Foundation.h>
  12 +
  13 +@interface KS3ListBucketsXMLParser : NSObject <NSXMLParserDelegate>
  14 +@property(strong, nonatomic) KS3ListBucketsResult *listBuctkResult;
  15 +- (void)kSS3XMLarse:(NSData *)dataXml;
  16 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3ListObjectsRequest.h 0 → 100755
  1 +//
  2 +// KSS3ListObjectsRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@interface KS3ListObjectsRequest : KS3Request
  12 +
  13 +@property(nonatomic, strong) NSString *prefix;
  14 +@property(nonatomic, strong) NSString *marker;
  15 +@property(nonatomic) int32_t maxKeys;
  16 +@property(nonatomic, retain) NSString *delimiter;
  17 +@property(nonatomic, strong) NSString *encodingType;
  18 +
  19 +- (instancetype)initWithName:(NSString *)bucketName;
  20 +
  21 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3ListObjectsResponse.h 0 → 100755
  1 +//
  2 +// KSS3ListObjectsResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +@class KS3ListObjectsResult;
  11 +
  12 +@interface KS3ListObjectsResponse : KS3Response
  13 +@property(nonatomic, strong) KS3ListObjectsResult *listBucketsResult;
  14 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3ListObjectsResult.h 0 → 100755
  1 +//
  2 +// ListBucketObjects.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface KS3ListObjectsResult : NSObject
  12 +
  13 +@property(strong, nonatomic) NSMutableArray *objectSummaries;
  14 +@property(strong, nonatomic) NSString *bucketName;
  15 +@property(strong, nonatomic) NSString *prefix;
  16 +@property(strong, nonatomic) NSString *marker;
  17 +@property(strong, nonatomic) NSString *NextMarker;
  18 +@property(nonatomic) int32_t maxKeys;
  19 +@property(strong, nonatomic) NSString *delimiter;
  20 +@property(assign, nonatomic) BOOL IsTruncated;
  21 +@property(strong, nonatomic) NSMutableArray *commonPrefixes;
  22 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3ListObjectsXMLPrarser.h 0 → 100755
  1 +//
  2 +// KSS3ListObjectsXMLPrarser.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +@class KS3ListObjectsResult;
  11 +@interface KS3ListObjectsXMLPrarser : NSObject <NSXMLParserDelegate>
  12 +@property(strong, nonatomic) KS3ListObjectsResult *listBuctkResult;
  13 +- (void)kSS3XMLarse:(NSData *)dataXml;
  14 +
  15 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3ListPartsRequest.h 0 → 100755
  1 +//
  2 +// KSS3ListPartsRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3MultipartUpload.h"
  10 +#import "KS3Request.h"
  11 +
  12 +@interface KS3ListPartsRequest : KS3Request
  13 +
  14 +@property(strong, nonatomic) NSString *key;
  15 +@property(nonatomic, strong) NSString *uploadId;
  16 +@property(nonatomic, assign) int32_t maxParts;
  17 +@property(nonatomic, assign) int32_t partNumberMarker;
  18 +@property(nonatomic, strong) NSString *encodingType;
  19 +
  20 +- (id)initWithMultipartUpload:(KS3MultipartUpload *)multipartUpload;
  21 +
  22 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3ListPartsResponse.h 0 → 100755
  1 +//
  2 +// KSS3ListPartsResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3ListPartsResult.h"
  10 +#import "KS3Response.h"
  11 +
  12 +@class KS3ListPartsResult;
  13 +@interface KS3ListPartsResponse : KS3Response
  14 +
  15 +@property(strong, nonatomic) KS3ListPartsResult *listResult;
  16 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3ListPartsResult.h 0 → 100755
  1 +//
  2 +// KSS3ListPartsResult.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/16/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Owner.h"
  10 +#import <Foundation/Foundation.h>
  11 +
  12 +@interface KS3ListPartsResult : NSObject
  13 +
  14 +@property(strong, nonatomic) NSString *Bucket;
  15 +
  16 +@property(strong, nonatomic) NSString *key;
  17 +@property(strong, nonatomic) NSString *UploadId;
  18 +
  19 +@property(nonatomic) int32_t partNumberMarker;
  20 +
  21 +@property(nonatomic) int32_t maxParts;
  22 +
  23 +@property(nonatomic) BOOL isTruncated;
  24 +
  25 +@property(strong, nonatomic) KS3Owner *initiator;
  26 +
  27 +@property(strong, nonatomic) KS3Owner *owner;
  28 +
  29 +@property(strong, nonatomic) NSMutableArray *parts;
  30 +
  31 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3ListPartsResultXMLParser.h 0 → 100755
  1 +//
  2 +// KSS3ListPartsResultXMLParser.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/16/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3ListPartsResult.h"
  10 +#import <Foundation/Foundation.h>
  11 +
  12 +@interface KS3ListPartsResultXMLParser : NSObject <NSXMLParserDelegate>
  13 +
  14 +@property(strong, nonatomic) KS3ListPartsResult *listPartsResult;
  15 +
  16 +- (void)kSS3XMLarse:(NSData *)dataXml;
  17 +
  18 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3MD5Util.h 0 → 100755
  1 +//
  2 +// KingSoftMD5Util.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface KS3MD5Util : NSObject
  12 ++ (NSString *)hexEncode:(NSString *)key text:(NSString *)text;
  13 +
  14 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3MultipartUpload.h 0 → 100755
  1 +//
  2 +// KSS3MultipartUpload.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Owner.h"
  10 +#import <Foundation/Foundation.h>
  11 +
  12 +//上传类型
  13 +typedef enum {
  14 + kUploadAlasset = 0, //相册中
  15 + kUploadNormal, //沙盒里或工程里
  16 +} UploadType;
  17 +
  18 +@interface KS3MultipartUpload : NSObject
  19 +
  20 +@property(nonatomic, strong) NSString *key;
  21 +
  22 +@property(nonatomic, strong) NSString *bucket;
  23 +
  24 +@property(nonatomic, strong) NSString *uploadId;
  25 +
  26 +@property(nonatomic, strong) NSString *storageClass;
  27 +
  28 +@property(nonatomic, strong) KS3Owner *initiator;
  29 +
  30 +@property(nonatomic, strong) KS3Owner *owner;
  31 +
  32 +@property(nonatomic, strong) NSDate *initiated;
  33 +
  34 +@property(assign, readonly) BOOL isCanceled;
  35 +
  36 +@property(assign, nonatomic, readonly) BOOL isPaused;
  37 +
  38 +@property(assign, nonatomic) UploadType uploadType;
  39 +
  40 +//暂停
  41 +- (void)pause;
  42 +//继续
  43 +- (void)proceed;
  44 +//取消
  45 +- (void)cancel;
  46 +
  47 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3ObjectACLXMLParser.h 0 → 100755
  1 +//
  2 +// KSS3ObjectACLXMLParser.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3BucketACLResult.h"
  10 +#import <Foundation/Foundation.h>
  11 +@interface KS3ObjectACLXMLParser : NSObject <NSXMLParserDelegate>
  12 +@property(strong, nonatomic) KS3BucketACLResult *listBuctkResult;
  13 +- (void)kSS3XMLarse:(NSData *)dataXml;
  14 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3ObjectSummary.h 0 → 100755
  1 +//
  2 +// KSS3Contents.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/13/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +@class KS3Owner;
  11 +@interface KS3ObjectSummary : NSObject
  12 +@property(strong, nonatomic) NSString *Key;
  13 +@property(strong, nonatomic) NSString *LastModified;
  14 +@property(strong, nonatomic) NSString *ETag;
  15 +@property(strong, nonatomic) KS3Owner *owner;
  16 +@property(assign, nonatomic) int32_t size;
  17 +@property(strong, nonatomic) NSString *storageClass;
  18 +
  19 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3Owner.h 0 → 100755
  1 +//
  2 +// S3Owner.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/11/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface KS3Owner : NSObject
  12 +
  13 +@property(strong, nonatomic) NSString *ID;
  14 +
  15 +@property(strong, nonatomic) NSString *displayName;
  16 +
  17 +- (id)initWithID:(NSString *)theID withDisplayName:(NSString *)theDisplayName;
  18 +
  19 ++ (id)ownerWithID:(NSString *)theID withDisplayName:(NSString *)theDisplayName;
  20 +
  21 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3Part.h 0 → 100755
  1 +//
  2 +// KSS3Part.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/16/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface KS3Part : NSObject
  12 +
  13 +@property(strong, nonatomic) NSString *etag;
  14 +
  15 +@property(strong, nonatomic) NSString *lastModified;
  16 +
  17 +@property(nonatomic, assign) int32_t partNumber;
  18 +
  19 +@property(nonatomic, assign) long long size;
  20 +
  21 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3PutObjectCopyRequest.h 0 → 100755
  1 +//
  2 +// KS3PutObjectCopyRequest.h
  3 +// KSYSDKDemo
  4 +//
  5 +// Created by Blues on 12/25/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3BucketObject.h"
  10 +#import "KS3Request.h"
  11 +
  12 +@interface KS3PutObjectCopyRequest : KS3Request
  13 +
  14 +@property(nonatomic, strong) NSString *strSourceBucket;
  15 +@property(nonatomic, strong) NSString *strSourceObject;
  16 +@property(nonatomic, strong) NSString *xkssMetaDataDirective;
  17 +@property(nonatomic, strong) NSString *xkssCopySourceIfMatch;
  18 +@property(nonatomic, strong) NSString *xkssCopySourceIfNoneMatch;
  19 +@property(nonatomic, strong) NSString *xkssCopySourceIfUnmodifiedSince;
  20 +@property(nonatomic, strong) NSString *xkssCopySourceIfModifiedSince;
  21 +@property(nonatomic, strong) NSString *xkssMeta;
  22 +@property(nonatomic, strong) NSString *xkssStorageClass;
  23 +@property(nonatomic, strong) NSString *xkssWebsiteRedirectLocation;
  24 +
  25 +@property(nonatomic, strong) NSString *xkssServerSideEncryption;
  26 +@property(nonatomic, strong) NSString *xkssServerSideEncryptionCustomerKey;
  27 +@property(nonatomic, strong)
  28 + NSString *xkssServerSideEncryptionCustomerAlgorithm;
  29 +@property(nonatomic, strong) NSString *xkssServerSideEncryptionCustomerKeyMD5;
  30 +@property(nonatomic, strong)
  31 + NSString *xkssCopySourceServerSideEncryptionCustomerKey;
  32 +@property(nonatomic, strong)
  33 + NSString *xkssCopySourceServerSideEncryptionCustomerAlgorithm;
  34 +@property(nonatomic, strong)
  35 + NSString *xkssCopySourceServerSideEncryptionCustomerMD5;
  36 +@property(nonatomic, strong) NSString *xkssAcl;
  37 +
  38 +@property(nonatomic, strong) NSString *key;
  39 +
  40 +//- (instancetype)initWithName:(NSString *)bucketName;
  41 +- (instancetype)initWithName:(KS3BucketObject *)destBucketObj
  42 + sourceBucketObj:(KS3BucketObject *)sourBucketObj;
  43 +
  44 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3PutObjectCopyResponse.h 0 → 100755
  1 +//
  2 +// KS3PutObjectCopyResponse.h
  3 +// KSYSDKDemo
  4 +//
  5 +// Created by Blues on 12/25/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3PutObjectCopyResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3PutObjectRequest.h 0 → 100755
  1 +//
  2 +// KSS3PutObjectRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@class KS3AccessControlList;
  12 +@class KS3GrantAccessControlList;
  13 +
  14 +@interface KS3PutObjectRequest : KS3Request
  15 +
  16 +@property(nonatomic, strong) NSString *cacheControl;
  17 +@property(nonatomic, strong) NSString *contentDisposition;
  18 +@property(nonatomic, strong) NSString *contentEncoding;
  19 +@property(nonatomic, assign) BOOL generateMD5;
  20 +@property(nonatomic, strong) NSString *expect;
  21 +@property(nonatomic, strong) NSData *data;
  22 +@property(nonatomic, strong) NSInputStream *stream;
  23 +@property(nonatomic, assign, readonly) int64_t expires;
  24 +@property(nonatomic, strong) NSString *filename;
  25 +@property(nonatomic, strong) NSString *redirectLocation;
  26 +@property(nonatomic, strong) NSString *callbackUrl;
  27 +@property(nonatomic, strong) NSString *callbackBody;
  28 +@property(nonatomic, strong) NSDictionary *callbackParams;
  29 +@property(strong, nonatomic) KS3AccessControlList *acl;
  30 +@property(nonatomic, strong) NSArray *arrGrantAcl;
  31 +
  32 +- (instancetype)initWithName:(NSString *)bucketName
  33 + withAcl:(KS3AccessControlList *)acl
  34 + grantAcl:(NSArray *)arrGrantAcl;
  35 +
  36 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3PutObjectResponse.h 0 → 100755
  1 +//
  2 +// KSS3PutObjectResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3PutObjectResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3Request.h 0 → 100755
  1 +//
  2 +// S3Request.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3ServiceRequest.h"
  10 +
  11 +@interface KS3Request : KS3ServiceRequest
  12 +@property(strong, nonatomic) NSString *bucket;
  13 +@property(nonatomic, assign) int64_t contentLength;
  14 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3Response.h 0 → 100755
  1 +//
  2 +// S3Response.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +#import "KS3ServiceResponse.h"
  9 +@interface KS3Response : KS3ServiceResponse
  10 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3ResponseHeaderOverrides.h 0 → 100755
  1 +//
  2 +// KSS3ResponseHeaderOverrides.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +
  11 +@interface KS3ResponseHeaderOverrides : NSObject
  12 +
  13 +@property(nonatomic, strong) NSString *contentType;
  14 +
  15 +@property(nonatomic, strong) NSString *contentLanguage;
  16 +
  17 +@property(nonatomic, strong) NSString *expires;
  18 +
  19 +@property(nonatomic, strong) NSString *cacheControl;
  20 +
  21 +@property(nonatomic, strong) NSString *contentDisposition;
  22 +
  23 +@property(nonatomic, strong) NSString *contentEncoding;
  24 +
  25 +@property(nonatomic, assign) NSString *queryString;
  26 +
  27 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3SDKUtil.h 0 → 100755
  1 +//
  2 +// KingSoftSDKUtil.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +extern NSString *const KSYS3DefaultRunLoopMode;
  11 +@interface KS3SDKUtil : NSObject
  12 +NSDate *getCurrentDate();
  13 ++ (NSString *)base64md5FromData:(NSData *)data;
  14 ++ (NSString *)urlEncode:(NSString *)input;
  15 ++ (NSString *)applicationDocumentFilePath;
  16 ++ (BOOL)isIpString:(NSString *)aString;
  17 ++ (BOOL)isVaildBucketName:(NSString *)bucket;
  18 +@end
  19 +
  20 +@interface NSData (WithBase64)
  21 +
  22 +/**
  23 + * Return a base64 encoded representation of the data.
  24 + *
  25 + * @return base64 encoded representation of the data.
  26 + */
  27 +- (NSString *)base64EncodedString;
  28 +
  29 +/**
  30 + * Decode a base-64 encoded string into a new NSData object.
  31 + *
  32 + * @param encodedString an base-64 encoded string
  33 + *
  34 + * @return NSData with the data represented by the encoded string.
  35 + */
  36 ++ (NSData *)dataWithBase64EncodedString:(NSString *)encodedString;
  37 +
  38 +@end
  39 +@interface NSString (Md5)
  40 +- (NSString *)MD5Hash;
  41 +@end
0 \ No newline at end of file 42 \ No newline at end of file
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3ServiceRequest.h 0 → 100755
  1 +//
  2 +// KingSoftServiceRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Credentials.h"
  10 +#import "KS3URLRequest.h"
  11 +#import <Foundation/Foundation.h>
  12 +@class KS3ServiceResponse;
  13 +@class KS3ClientException;
  14 +@protocol KingSoftServiceRequestDelegate;
  15 +@interface KS3ServiceRequest : NSObject
  16 +@property(strong, nonatomic) KS3Credentials *credentials;
  17 +@property(strong, nonatomic) KS3URLRequest *urlRequest;
  18 +@property(strong, nonatomic) NSString *httpMethod;
  19 +@property(strong, nonatomic) NSURLConnection *urlConnection;
  20 +@property(strong, readonly, nonatomic) NSURL *url;
  21 +@property(strong, nonatomic) NSString *host;
  22 +@property(strong, nonatomic) NSString *contentMd5;
  23 +@property(strong, nonatomic) NSString *contentType;
  24 +@property(strong, nonatomic) NSString *kSYResource;
  25 +@property(strong, nonatomic) NSDate *requestDate;
  26 +@property(strong, nonatomic) NSString *strDate;
  27 +@property(nonatomic, strong) NSString *strKS3Token;
  28 +@property NSTimeInterval timeoutInterval;
  29 +@property(weak, nonatomic) id<KingSoftServiceRequestDelegate> delegate;
  30 +
  31 +- (KS3URLRequest *)configureURLRequest;
  32 +- (void)sign;
  33 +- (KS3ClientException *)validate;
  34 +- (void)cancel;
  35 +- (NSString *)URLEncodedString:(NSString *)str;
  36 +- (void)setCompleteRequest;
  37 +
  38 +- (NSString *)kSYHeader;
  39 +@end
  40 +
  41 +@protocol KingSoftServiceRequestDelegate <NSObject>
  42 +
  43 +@optional
  44 +
  45 +- (void)request:(KS3ServiceRequest *)request
  46 + didReceiveResponse:(NSURLResponse *)response;
  47 +
  48 +- (void)request:(KS3ServiceRequest *)request didReceiveData:(NSData *)data;
  49 +
  50 +- (void)request:(KS3ServiceRequest *)request
  51 + didCompleteWithResponse:(KS3ServiceResponse *)response;
  52 +
  53 +- (void)request:(KS3ServiceRequest *)request
  54 + didSendData:(long long)bytesWritten
  55 + totalBytesWritten:(long long)totalBytesWritten
  56 + totalBytesExpectedToWrite:(long long)totalBytesExpectedToWrite;
  57 +
  58 +- (void)request:(KS3ServiceRequest *)request didFailWithError:(NSError *)error;
  59 +
  60 +- (void)request:(KS3ServiceRequest *)request
  61 + didFailWithServiceException:(NSException *)exception
  62 + __attribute__((deprecated));
  63 +
  64 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3ServiceResponse.h 0 → 100755
  1 +//
  2 +// KingSoftServiceResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +@class KS3ServiceRequest;
  11 +@interface KS3ServiceResponse : NSObject {
  12 + NSMutableData *body;
  13 +}
  14 +@property(nonatomic, readonly) NSData *body;
  15 +@property(nonatomic, readonly) BOOL isFinishedLoading;
  16 +@property(nonatomic, readonly) BOOL didTimeout;
  17 +@property(nonatomic, strong) NSDictionary *responseHeader;
  18 +@property(nonatomic) int32_t httpStatusCode;
  19 +
  20 +@property(readonly, copy) NSURL *URL;
  21 +
  22 +@property(readonly, copy) NSString *MIMEType;
  23 +
  24 +@property(readonly) long long expectedContentLength;
  25 +
  26 +@property(readonly, copy) NSString *textEncodingName;
  27 +
  28 +@property(readonly, copy) NSString *suggestedFilename;
  29 +
  30 +@property(strong, nonatomic) NSError *error;
  31 +
  32 +@property(nonatomic, strong) KS3ServiceRequest *request;
  33 +- (void)timeout;
  34 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3SetACLRequest.h 0 → 100755
  1 +//
  2 +// KSS3SetACLRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@class KS3AccessControlList;
  12 +@interface KS3SetACLRequest : KS3Request
  13 +
  14 +@property(strong, nonatomic) KS3AccessControlList *acl;
  15 +
  16 +- (instancetype)initWithName:(NSString *)bucketName
  17 + accessACL:(KS3AccessControlList *)accessACL;
  18 +
  19 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3SetACLResponse.h 0 → 100755
  1 +//
  2 +// KSS3SetACLResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/12/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +#import "KS3Response.h"
  9 +@interface KS3SetACLResponse : KS3Response
  10 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3SetBucketLoggingRequest.h 0 → 100755
  1 +//
  2 +// KSS3SetBucketLoggingRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@interface KS3SetBucketLoggingRequest : KS3Request
  12 +
  13 +- (instancetype)initWithName:(NSString *)bucketName;
  14 +
  15 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3SetBucketLoggingResponse.h 0 → 100755
  1 +//
  2 +// KSS3SetBucketLoggingResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/14/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3SetBucketLoggingResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3SetGrantACLRequest.h 0 → 100755
  1 +//
  2 +// KSS3SetGrantACLRequest.h
  3 +// KS3iOSSDKDemo
  4 +//
  5 +// Created by Blues on 12/18/14.
  6 +// Copyright (c) 2014 Blues. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@class KS3GrantAccessControlList;
  12 +
  13 +@interface KS3SetGrantACLRequest : KS3Request
  14 +
  15 +@property(nonatomic, strong) KS3GrantAccessControlList *acl;
  16 +
  17 +- (instancetype)initWithName:(NSString *)bucketName
  18 + accessACL:(KS3GrantAccessControlList *)accessACL;
  19 +
  20 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3SetGrantACLResponse.h 0 → 100755
  1 +//
  2 +// KSS3SetGrantACLResponse.h
  3 +// KS3iOSSDKDemo
  4 +//
  5 +// Created by Blues on 12/18/14.
  6 +// Copyright (c) 2014 Blues. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3SetGrantACLResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3SetObjectACLRequest.h 0 → 100755
  1 +//
  2 +// KSS3SetObjectACLRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +@class KS3AccessControlList;
  11 +@interface KS3SetObjectACLRequest : KS3Request
  12 +
  13 +@property(strong, nonatomic) NSString *key;
  14 +
  15 +@property(strong, nonatomic) KS3AccessControlList *acl;
  16 +
  17 +- (instancetype)initWithName:(NSString *)bucketName
  18 + withKeyName:(NSString *)strKeyName
  19 + acl:(KS3AccessControlList *)acl;
  20 +
  21 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3SetObjectACLResponse.h 0 → 100755
  1 +//
  2 +// KSS3SetObjectACLResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3SetObjectACLResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3SetObjectGrantACLRequest.h 0 → 100755
  1 +//
  2 +// KSS3SetObjectGrantACLRequest.h
  3 +// KS3iOSSDKDemo
  4 +//
  5 +// Created by Blues on 12/18/14.
  6 +// Copyright (c) 2014 Blues. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Request.h"
  10 +
  11 +@class KS3GrantAccessControlList;
  12 +
  13 +@interface KS3SetObjectGrantACLRequest : KS3Request
  14 +
  15 +@property(nonatomic, strong) KS3GrantAccessControlList *acl;
  16 +@property(nonatomic, strong) NSString *key;
  17 +
  18 +- (instancetype)initWithName:(NSString *)bucketName
  19 + withKeyName:(NSString *)strKeyName
  20 + grantAcl:(KS3GrantAccessControlList *)grantAcl;
  21 +
  22 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3SetObjectGrantACLResponse.h 0 → 100755
  1 +//
  2 +// KSS3SetObjectGrantACLResponse.h
  3 +// KS3iOSSDKDemo
  4 +//
  5 +// Created by Blues on 12/18/14.
  6 +// Copyright (c) 2014 Blues. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3SetObjectGrantACLResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3URLRequest.h 0 → 100755
  1 +//
  2 +// KingSoftURLRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Credentials.h"
  10 +#import <Foundation/Foundation.h>
  11 +
  12 +@interface KS3URLRequest : NSMutableURLRequest
  13 +@property(weak, nonatomic) KS3Credentials *credentials;
  14 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3Upload.h 0 → 100755
  1 +//
  2 +// KS3Upload.h
  3 +// Pods
  4 +//
  5 +// Created by Sun Peng on 2017/5/4.
  6 +//
  7 +//
  8 +
  9 +#import <Foundation/Foundation.h>
  10 +#import "KS3MultipartUpload.h"
  11 +
  12 +@interface KS3Upload : KS3MultipartUpload <NSCopying>
  13 +
  14 +@property (assign, nonatomic) NSInteger contentLength;
  15 +@property (assign, nonatomic) NSInteger blockSize;
  16 +@property (assign, nonatomic) NSInteger partCount;
  17 +
  18 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3UploadPartRequest.h 0 → 100755
  1 +//
  2 +// KSS3UploadPartRequest.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3MultipartUpload.h"
  10 +#import "KS3Request.h"
  11 +
  12 +@interface KS3UploadPartRequest : KS3Request
  13 +
  14 +@property(nonatomic, strong) NSString *expect;
  15 +
  16 +@property(nonatomic, assign) int32_t partNumber;
  17 +@property(nonatomic, assign) BOOL generateMD5;
  18 +@property(nonatomic, strong) NSString *uploadId;
  19 +@property(nonatomic, strong) NSData *data;
  20 +@property(nonatomic, strong) NSString *key;
  21 +@property(strong, nonatomic) KS3MultipartUpload *multipartUpload;
  22 +- (id)initWithMultipartUpload:(KS3MultipartUpload *)multipartUpload
  23 + partNumber:(int32_t)partNumber
  24 + data:(NSData *)data
  25 + generateMD5:(BOOL)generateMD5;
  26 +
  27 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3UploadPartResponse.h 0 → 100755
  1 +//
  2 +// KSS3UploadPartResponse.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/15/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3Response.h"
  10 +
  11 +@interface KS3UploadPartResponse : KS3Response
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3UploadRequest.h 0 → 100755
  1 +//
  2 +// KS3UploadRequest.h
  3 +// Pods
  4 +//
  5 +// Created by Sun Peng on 2017/5/4.
  6 +//
  7 +//
  8 +
  9 +#import "KS3InitiateMultipartUploadRequest.h"
  10 +
  11 +@interface KS3UploadRequest : KS3InitiateMultipartUploadRequest
  12 +
  13 +- (id)initWithKey:(NSString *)aKey
  14 + inBucket:(NSString *)aBucket
  15 + acl:(KS3AccessControlList *)acl
  16 + grantAcl:(NSArray *)arrGrantAcl;
  17 +
  18 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3WebServiceClient.h 0 → 100755
  1 +//
  2 +// KingSoftWebServiceClient.h
  3 +// KS3SDK
  4 +//
  5 +// Created by JackWong on 12/9/14.
  6 +// Copyright (c) 2014 kingsoft. All rights reserved.
  7 +//
  8 +
  9 +#import "KS3AbstractWebServiceClient.h"
  10 +
  11 +@interface KS3WebServiceClient : KS3AbstractWebServiceClient
  12 +
  13 +@end
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Headers/KS3YunSDK.h 0 → 100755
  1 +//
  2 +// KS3YunSDK.h
  3 +// KS3YunSDK
  4 +//
  5 +// Created by JackWong on 12/18/14.
  6 +// Copyright (c) 2014 KS3. All rights reserved.
  7 +//
  8 +
  9 +#import <UIKit/UIKit.h>
  10 +#ifdef __OBJC__
  11 +
  12 +//! Project version number for KS3YunSDK.
  13 +FOUNDATION_EXPORT double KS3YunSDKVersionNumber;
  14 +
  15 +//! Project version string for KS3YunSDK.
  16 +FOUNDATION_EXPORT const unsigned char KS3YunSDKVersionString[];
  17 +
  18 +// In this header, you should import all the public headers of your framework
  19 +// using statements like #import <KS3YunSDK/PublicHeader.h>
  20 +#import "KS3AbortMultipartUploadRequest.h"
  21 +#import "KS3AbortMultipartUploadResponse.h"
  22 +#import "KS3AbstractPutRequest.h"
  23 +#import "KS3AbstractWebServiceClient.h"
  24 +#import "KS3AccessControlList.h"
  25 +#import "KS3AuthUtils.h"
  26 +#import "KS3Bucket.h"
  27 +#import "KS3BucketACLResult.h"
  28 +#import "KS3BucketACLXMLParser.h"
  29 +#import "KS3BucketNameUtilities.h"
  30 +#import "KS3BucketObject.h"
  31 +#import "KS3Client.h"
  32 +#import "KS3ClientException.h"
  33 +#import "KS3CompleteMultipartUploadRequest.h"
  34 +#import "KS3CompleteMultipartUploadResponse.h"
  35 +#import "KS3CompleteMultipartUploadResult.h"
  36 +#import "KS3Constants.h"
  37 +#import "KS3CreateBucketRequest.h"
  38 +#import "KS3CreateBucketResponse.h"
  39 +#import "KS3Credentials.h"
  40 +#import "KS3DeleteBucketRequest.h"
  41 +#import "KS3DeleteBucketResponse.h"
  42 +#import "KS3DeleteObjectRequest.h"
  43 +#import "KS3DeleteObjectResponse.h"
  44 +#import "KS3DownLoad.h"
  45 +#import "KS3ErrorHandler.h"
  46 +#import "KS3GetACLRequest.h"
  47 +#import "KS3GetACLResponse.h"
  48 +#import "KS3GetBucketLoggingRequest.h"
  49 +#import "KS3GetBucketLoggingResponse.h"
  50 +#import "KS3GetObjectACLRequest.h"
  51 +#import "KS3GetObjectACLResponse.h"
  52 +#import "KS3GetObjectRequest.h"
  53 +#import "KS3GetObjectResponse.h"
  54 +#import "KS3Grant.h"
  55 +#import "KS3GrantAccessControlList.h"
  56 +#import "KS3HeadBucketRequest.h"
  57 +#import "KS3HeadBucketResponse.h"
  58 +#import "KS3HeadObjectRequest.h"
  59 +#import "KS3HeadObjectResponse.h"
  60 +#import "KS3InitiateMultipartUploadRequest.h"
  61 +#import "KS3InitiateMultipartUploadResponse.h"
  62 +#import "KS3InitiateMultipartUploadResult.h"
  63 +#import "KS3InitiateMultipartUploadXMLParser.h"
  64 +#import "KS3ListBucketsRequest.h"
  65 +#import "KS3ListBucketsResponse.h"
  66 +#import "KS3ListBucketsResult.h"
  67 +#import "KS3ListBucketsXMLParser.h"
  68 +#import "KS3ListObjectsRequest.h"
  69 +#import "KS3ListObjectsResponse.h"
  70 +#import "KS3ListObjectsResult.h"
  71 +#import "KS3ListObjectsXMLPrarser.h"
  72 +#import "KS3ListPartsRequest.h"
  73 +#import "KS3ListPartsResponse.h"
  74 +#import "KS3ListPartsResult.h"
  75 +#import "KS3ListPartsResultXMLParser.h"
  76 +#import "KS3MD5Util.h"
  77 +#import "KS3MultipartUpload.h"
  78 +#import "KS3ObjectACLXMLParser.h"
  79 +#import "KS3ObjectSummary.h"
  80 +#import "KS3Owner.h"
  81 +#import "KS3Part.h"
  82 +#import "KS3PutObjectCopyRequest.h"
  83 +#import "KS3PutObjectCopyResponse.h"
  84 +#import "KS3PutObjectRequest.h"
  85 +#import "KS3PutObjectResponse.h"
  86 +#import "KS3Request.h"
  87 +#import "KS3Response.h"
  88 +#import "KS3ResponseHeaderOverrides.h"
  89 +#import "KS3SDKUtil.h"
  90 +#import "KS3ServiceRequest.h"
  91 +#import "KS3ServiceResponse.h"
  92 +#import "KS3SetACLRequest.h"
  93 +#import "KS3SetACLResponse.h"
  94 +#import "KS3SetBucketLoggingRequest.h"
  95 +#import "KS3SetBucketLoggingResponse.h"
  96 +#import "KS3SetGrantACLRequest.h"
  97 +#import "KS3SetGrantACLResponse.h"
  98 +#import "KS3SetObjectACLRequest.h"
  99 +#import "KS3SetObjectACLResponse.h"
  100 +#import "KS3SetObjectGrantACLRequest.h"
  101 +#import "KS3SetObjectGrantACLResponse.h"
  102 +#import "KS3URLRequest.h"
  103 +#import "KS3UploadPartRequest.h"
  104 +#import "KS3UploadPartResponse.h"
  105 +#import "KS3WebServiceClient.h"
  106 +#import "KS3Upload.h"
  107 +#import "KS3UploadRequest.h"
  108 +#endif
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Info.plist 0 → 100644
No preview for this file type
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/KS3YunSDK 0 → 100755
No preview for this file type
CNLiveUploadYunSDKDemo/发布版SDK/KS3YunSDK.framework/Modules/module.modulemap 0 → 100644
  1 +framework module KS3YunSDK {
  2 + umbrella header "KS3YunSDK.h"
  3 +
  4 + export *
  5 + module * { export * }
  6 +}