123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112 |
- //
- // OSSConstants.h
- // AliyunOSSSDK
- //
- // Created by huaixu on 2018/1/22.
- // Copyright © 2018年 aliyun. All rights reserved.
- //
-
- #import <Foundation/Foundation.h>
-
- NS_ASSUME_NONNULL_BEGIN
-
- typedef NSString* _Nullable (^OSSCustomSignContentBlock) (NSString * contentToSign, NSError **error);
- typedef NSData * _Nullable (^OSSResponseDecoderBlock) (NSData * data);
-
- typedef void (^OSSNetworkingUploadProgressBlock) (int64_t bytesSent, int64_t totalBytesSent, int64_t totalBytesExpectedToSend);
- typedef void (^OSSNetworkingDownloadProgressBlock) (int64_t bytesWritten, int64_t totalBytesWritten, int64_t totalBytesExpectedToWrite);
- typedef void (^OSSNetworkingRetryBlock) (void);
- typedef void (^OSSNetworkingCompletionHandlerBlock) (id _Nullable responseObject, NSError * _Nullable error);
- typedef void (^OSSNetworkingOnRecieveDataBlock) (NSData * data);
-
- /**
- The flag of verification about crc64
- */
- typedef NS_ENUM(NSUInteger, OSSRequestCRCFlag) {
- OSSRequestCRCUninitialized,
- OSSRequestCRCOpen,
- OSSRequestCRCClosed
- };
-
- /**
- Retry type definition
- */
- typedef NS_ENUM(NSInteger, OSSNetworkingRetryType) {
- OSSNetworkingRetryTypeUnknown,
- OSSNetworkingRetryTypeShouldRetry,
- OSSNetworkingRetryTypeShouldNotRetry,
- OSSNetworkingRetryTypeShouldRefreshCredentialsAndRetry,
- OSSNetworkingRetryTypeShouldCorrectClockSkewAndRetry
- };
-
- /**
- * @brief: The following constants are provided by OSSNetworking as possible operation types.
- */
- typedef NS_ENUM(NSInteger, OSSOperationType) {
- OSSOperationTypeGetService,
- OSSOperationTypeCreateBucket,
- OSSOperationTypeDeleteBucket,
- OSSOperationTypeGetBucket,
- OSSOperationTypeGetBucketACL,
- OSSOperationTypeHeadObject,
- OSSOperationTypeGetObject,
- OSSOperationTypeGetObjectACL,
- OSSOperationTypePutObject,
- OSSOperationTypePutObjectACL,
- OSSOperationTypeAppendObject,
- OSSOperationTypeDeleteObject,
- OSSOperationTypeDeleteMultipleObjects,
- OSSOperationTypeCopyObject,
- OSSOperationTypeInitMultipartUpload,
- OSSOperationTypeUploadPart,
- OSSOperationTypeCompleteMultipartUpload,
- OSSOperationTypeAbortMultipartUpload,
- OSSOperationTypeListMultipart,
- OSSOperationTypeListMultipartUploads,
- OSSOperationTypeTriggerCallBack,
- OSSOperationTypeImagePersist
- };
-
- /**
- * @brief: The following constants are provided by OSSClient as possible error codes.
- */
- typedef NS_ENUM(NSInteger, OSSClientErrorCODE) {
- OSSClientErrorCodeNetworkingFailWithResponseCode0,
- OSSClientErrorCodeSignFailed,
- OSSClientErrorCodeFileCantWrite,
- OSSClientErrorCodeInvalidArgument,
- OSSClientErrorCodeNilUploadid,
- OSSClientErrorCodeTaskCancelled,
- OSSClientErrorCodeNetworkError,
- OSSClientErrorCodeInvalidCRC,
- OSSClientErrorCodeCannotResumeUpload,
- OSSClientErrorCodeExcpetionCatched,
- OSSClientErrorCodeNotKnown
- };
-
- typedef NS_ENUM(NSInteger, OSSXMLDictionaryAttributesMode)
- {
- OSSXMLDictionaryAttributesModePrefixed = 0, //default
- OSSXMLDictionaryAttributesModeDictionary,
- OSSXMLDictionaryAttributesModeUnprefixed,
- OSSXMLDictionaryAttributesModeDiscard
- };
-
-
- typedef NS_ENUM(NSInteger, OSSXMLDictionaryNodeNameMode)
- {
- OSSXMLDictionaryNodeNameModeRootOnly = 0, //default
- OSSXMLDictionaryNodeNameModeAlways,
- OSSXMLDictionaryNodeNameModeNever
- };
-
- typedef NSString * OSSXMLDictionaryAttributeName NS_EXTENSIBLE_STRING_ENUM;
-
- OBJC_EXTERN OSSXMLDictionaryAttributeName const OSSXMLDictionaryAttributesKey;
- OBJC_EXTERN OSSXMLDictionaryAttributeName const OSSXMLDictionaryCommentsKey;
- OBJC_EXTERN OSSXMLDictionaryAttributeName const OSSXMLDictionaryTextKey;
- OBJC_EXTERN OSSXMLDictionaryAttributeName const OSSXMLDictionaryNodeNameKey;
- OBJC_EXTERN OSSXMLDictionaryAttributeName const OSSXMLDictionaryAttributePrefix;
-
- NS_ASSUME_NONNULL_END
|