mirror of
https://github.com/danog/Telegram.git
synced 2024-12-02 09:27:55 +01:00
32 lines
1.7 KiB
Objective-C
32 lines
1.7 KiB
Objective-C
#import "TGMediaPickerAsset.h"
|
|
#import "TGMediaPickerAssetsGroup.h"
|
|
|
|
typedef enum {
|
|
TGMediaPickerAuthorizationStatusNotDetermined,
|
|
TGMediaPickerAuthorizationStatusRestricted,
|
|
TGMediaPickerAuthorizationStatusDenied,
|
|
TGMediaPickerAuthorizationStatusAuthorized
|
|
} TGMediaPickerAuthorizationStatus;
|
|
|
|
@interface TGMediaPickerAssetsLibrary : NSObject
|
|
|
|
@property (nonatomic, readonly) TGMediaPickerAuthorizationStatus authorizationStatus;
|
|
@property (nonatomic, readonly) TGMediaPickerAssetType assetType;
|
|
|
|
@property (nonatomic, copy) void (^libraryChanged)(void);
|
|
|
|
- (instancetype)initForAssetType:(TGMediaPickerAssetType)assetType;
|
|
|
|
- (void)fetchAssetsGroupsWithCompletionBlock:(void(^)(NSArray *groups, TGMediaPickerAuthorizationStatus status, NSError *error))completionBlock;
|
|
- (void)fetchAssetsOfAssetsGroup:(TGMediaPickerAssetsGroup *)assetsGroup withCompletionBlock:(void (^)(NSArray *assets, TGMediaPickerAuthorizationStatus status, NSError *error))completionBlock;
|
|
- (void)fetchAssetsOfAssetsGroup:(TGMediaPickerAssetsGroup *)assetsGroup reversed:(bool)reversed withEnumerationBlock:(void (^)(TGMediaPickerAsset *, TGMediaPickerAuthorizationStatus, NSError *))enumerationBlock;
|
|
|
|
- (void)saveAssetWithImage:(UIImage *)image completionBlock:(void(^)(bool success, NSString *uniqueId, NSError *error))completionBlock;
|
|
- (void)saveAssetWithImageData:(NSData *)data completionBlock:(void(^)(bool success, NSString *uniqueId, NSError *error))completionBlock;
|
|
- (void)saveAssetWithImageAtURL:(NSURL *)url completionBlock:(void(^)(bool success, NSString *uniqueId, NSError *error))completionBlock;
|
|
- (void)saveAssetWithVideoAtURL:(NSURL *)url completionBlock:(void(^)(bool success, NSString *uniqueId, NSError *error))completionBlock;
|
|
|
|
+ (instancetype)sharedLibrary;
|
|
|
|
@end
|