Swiftgram/LegacyComponents/LegacyComponentsAccessChecker.h
2017-07-22 01:05:13 +03:00

39 lines
1.3 KiB
Objective-C

#import <Foundation/Foundation.h>
typedef enum {
TGPhotoAccessIntentRead,
TGPhotoAccessIntentSave,
TGPhotoAccessIntentCustomWallpaper
} TGPhotoAccessIntent;
typedef enum {
TGMicrophoneAccessIntentVoice,
TGMicrophoneAccessIntentVideo,
TGMicrophoneAccessIntentCall,
TGMicrophoneAccessIntentVideoMessage
} TGMicrophoneAccessIntent;
typedef enum {
TGCameraAccessIntentDefault,
TGCameraAccessIntentVideoMessage
} TGCameraAccessIntent;
typedef enum {
TGLocationAccessIntentSend,
TGLocationAccessIntentTracking,
} TGLocationAccessIntent;
@protocol LegacyComponentsAccessChecker <NSObject>
- (bool)checkAddressBookAuthorizationStatusWithAlertDismissComlpetion:(void (^)(void))alertDismissCompletion;
- (bool)checkPhotoAuthorizationStatusForIntent:(TGPhotoAccessIntent)intent alertDismissCompletion:(void (^)(void))alertDismissCompletion;
- (bool)checkMicrophoneAuthorizationStatusForIntent:(TGMicrophoneAccessIntent)intent alertDismissCompletion:(void (^)(void))alertDismissCompletion;
- (bool)checkCameraAuthorizationStatusForIntent:(TGCameraAccessIntent)intent alertDismissCompletion:(void (^)(void))alertDismissCompletion;
- (bool)checkLocationAuthorizationStatusForIntent:(TGLocationAccessIntent)intent alertDismissComlpetion:(void (^)(void))alertDismissCompletion;
@end