1
0
mirror of https://github.com/danog/Telegram.git synced 2024-12-04 02:17:51 +01:00
Telegram/Telegraph/TGAccessChecker.h

32 lines
1.1 KiB
C
Raw Normal View History

2015-10-01 18:19:52 +02:00
#import <Foundation/Foundation.h>
typedef enum {
TGPhotoAccessIntentRead,
TGPhotoAccessIntentSave,
TGPhotoAccessIntentCustomWallpaper
} TGPhotoAccessIntent;
typedef enum {
TGMicrophoneAccessIntentVoice,
TGMicrophoneAccessIntentVideo,
} TGMicrophoneAccessIntent;
typedef enum {
TGLocationAccessIntentSend,
TGLocationAccessIntentTracking,
} TGLocationAccessIntent;
@interface TGAccessChecker : NSObject
+ (bool)checkAddressBookAuthorizationStatusWithAlertDismissComlpetion:(void (^)(void))alertDismissCompletion;
+ (bool)checkPhotoAuthorizationStatusForIntent:(TGPhotoAccessIntent)intent alertDismissCompletion:(void (^)(void))alertDismissCompletion;
+ (bool)checkMicrophoneAuthorizationStatusForIntent:(TGMicrophoneAccessIntent)intent alertDismissCompletion:(void (^)(void))alertDismissCompletion;
+ (bool)checkCameraAuthorizationStatusWithAlertDismissComlpetion:(void (^)(void))alertDismissCompletion;
+ (bool)checkLocationAuthorizationStatusForIntent:(TGLocationAccessIntent)intent alertDismissComlpetion:(void (^)(void))alertDismissCompletion;
@end