123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146 |
- //
- // KMServicesFiles.h
- // PDF Reader
- //
- // Created by 丁林圭 on 2020/7/8.
- // Copyright © 2020 Kdan Mobile. All rights reserved.
- //
- #import <Foundation/Foundation.h>
- typedef NS_ENUM(NSInteger, KMCloudServiceFileType) {
- KMCloudServiceFileType_File = 0,
- KMCloudServiceFileType_Folder,
- KMCloudServiceFileType_Deleted,
- };
- #pragma mark - KMGoogleDriveUserMetadata
- @interface KMGoogleDriveUserMetadata : NSObject
- @property (nonatomic, retain) NSString *accessToken; //授权服务器生成的访问令牌
- @property (nonatomic, retain) NSDate *accessTokenExpirationDate; //访问令牌的大致到期日期和时间
- @property (nonatomic, retain) NSString *tokenType; //令牌类型
- @property (nonatomic, retain) NSString *idToken; //简短ID令牌值
- @property (nonatomic, retain) NSString *refreshToken; //介绍刷新令牌
- @property (nonatomic, retain) NSString *scope; //介绍访问令牌的作用域
- @property (nonatomic, retain) NSString *userEmail; //用户邮箱
- @property (nonatomic, retain) NSDictionary *additionalParameters; //从令牌服务器返回的其他参数
- @end
- #pragma mark - KMDropboxUserMetadata
- @interface KMDropboxUserMetadata : NSObject
- @property (nonatomic, retain) NSString *accountId; ///用户的唯一Dropbox ID
- @property (nonatomic, retain) NSString *givenName; ///用户名的详细信息
- @property (nonatomic, retain) NSString *surname; ///也称为姓氏或姓氏
- @property (nonatomic, retain) NSString *email; ///用户的电子邮件地址
- @property (nonatomic, retain) NSNumber *emailVerified; ///用户是否已验证其电子邮件地址
- @property (nonatomic, retain) NSNumber *disabled; ///用户是否已被禁用
- @property (nonatomic, retain) NSString *country; ///用户的两个字母的国家代码(如果可用)
- @property (nonatomic, retain) NSString *locale; ///用户指定的语言
- @property (nonatomic, retain) NSString *referralLink; ///用户的推荐链接
- @end
- #pragma mark - KMDropboxErrorMetadata
- @interface KMDropboxErrorMetadata : NSObject
- /**
- DBFILESDeleteError *routeError
- /// Represents the possible error types that can be returned from network requests.
- typedef NS_ENUM(NSInteger, DBRequestErrorTag) {
- DBRequestErrorHttp, /// Errors produced at the HTTP layer.
- DBRequestErrorBadInput, /// Errors due to bad input parameters to an API Operation.
- DBRequestErrorAuth, /// Errors due to invalid authentication credentials.
- DBRequestErrorPathRoot, /// Errors due to invalid authentication credentials.
- DBRequestErrorAccess, /// Errors due to invalid permission to access.
- DBRequestErrorRateLimit, /// Error caused by rate limiting.
- DBRequestErrorInternalServer,/// Errors due to a problem on Dropbox.
- DBRequestErrorClient, /// Errors due to a problem on the client-side of the SDK.
- };
- */
- @property (nonatomic, retain) NSNumber *routeError;
- /**
- DBRequestError *networkError
- /// The `DBFILESDeleteErrorTag` enum type represents the possible tag states with which the `DBFILESDeleteError` union can exist.
- typedef NS_ENUM(NSInteger, DBFILESDeleteErrorTag) {
- DBFILESDeleteErrorPathLookup, /// (no description).
- DBFILESDeleteErrorPathWrite, /// (no description).
- DBFILESDeleteErrorTooManyWriteOperations,/// There are too many write operations in user's Dropbox. Please retry this request.
- DBFILESDeleteErrorTooManyFiles, /// There are too many files in one request. Please retry with fewer files.
- DBFILESDeleteErrorOther, /// (no description).
- };
- */
- @property (nonatomic, retain) NSNumber *networkError;
- @end
- #pragma mark - KMServicesFile
- @interface KMServicesCloudFile : NSObject
- @property (nonatomic, retain) NSDate *fileModiDate; //上次在Dropbox上修改文件的时间
- @property (nonatomic, retain) NSString *fileName; //路径的最后一个组件(包括扩展名)
- @property (nonatomic, assign) NSInteger fileSize; //文件大小(字节)
- @property (nonatomic, assign) KMCloudServiceFileType filetype; //文件类型
- @property (nonatomic, retain) NSString *fileId; //文件的唯一标识符
- @property (nonatomic, retain) NSString *path_lower; //用户Dropbox中小写的完整路径。
- @property (nonatomic, retain) NSString *rev; //文件当前版本的唯一标识符
- @property (nonatomic, retain) NSString *content_hash; //文件内容的哈希值。此字段可用于验证数据完整性。
- @property (nonatomic, retain) NSDate *client_modified; //对于文件,这是桌面客户端在将文件添加到Dropbox时设置的修改时间
- @property (nonatomic, retain) NSString *fileModiDateString;
- @property (nonatomic, retain) NSString *fileSizeString;
- @property (nonatomic, retain) NSString *mimeType; //文件的MIME类型
- @property (nonatomic, retain) NSString *kind; //标识这是哪种资源。值:固定字符串“drive#file”。
- @property (nonatomic, retain) NSDate *createdTime; //文件创建时间
- @property (nonatomic, retain) NSString *webViewLink;//在浏览器的相关Google编辑器或查看器中打开文件的链接。
- @property (nonatomic, retain) NSString *parensID; //包含的父文件夹ID; 仅在云盘空间包含,Google共享文件可为空
- @property (nonatomic, retain) NSNumber *ownedByMe; //用户是否拥有该文件。 Uses NSNumber of boolValue.
- @property (nonatomic,retain) NSString *lastUserName; //上次修改用户的纯文本可显示名称。
- @property (nonatomic, retain) NSString *displayName; //相对路径
- @property (nonatomic, retain) NSString *authorName; //作者
- - (NSComparisonResult)nameCompare:(KMServicesCloudFile *)item;
- - (NSComparisonResult)dateCompare:(KMServicesCloudFile *)item;
- - (NSComparisonResult)sizeCompare:(KMServicesCloudFile *)item;
- @end
|