-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathFBPermissionRequest.h
More file actions
65 lines (47 loc) · 2.27 KB
/
FBPermissionRequest.h
File metadata and controls
65 lines (47 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
//
// FBPermissionRequest.h
// Thumbprint
//
// Created by Blake Watters on 5/13/09.
// Copyright 2009 Two Toasters. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "FBConnect/FBConnect.h"
@protocol FBPermissionRequestDelegate;
@interface FBPermissionRequest : NSObject <FBRequestDelegate, FBDialogDelegate> {
FBSession* _session;
FBRequest* _permissionRequest;
FBPermissionDialog* _permissionDialog;
NSString* _permissionName;
id<FBPermissionRequestDelegate> _delegate;
BOOL attemptAcquisition;
}
@property (nonatomic, retain) FBSession* session;
@property (nonatomic, readonly) NSString* permissionName;
@property (nonatomic, assign) id<FBPermissionRequestDelegate> delegate;
+ (FBPermissionRequest*)checkForPermission:(NSString*)permissionName withSession:(FBSession*)session delegate:(id<FBPermissionRequestDelegate>)delegate;
+ (FBPermissionRequest*)checkForPermission:(NSString*)permissionName delegate:(id<FBPermissionRequestDelegate>)delegate;
+ (FBPermissionRequest*)askForPermission:(NSString*)permissionName withSession:(FBSession*)session delegate:(id<FBPermissionRequestDelegate>)delegate;
+ (FBPermissionRequest*)askForPermission:(NSString*)permissionName delegate:(id<FBPermissionRequestDelegate>)delegate;
+ (FBPermissionRequest*)acquirePermission:(NSString*)permissionName withSession:(FBSession*)session delegate:(id<FBPermissionRequestDelegate>)delegate;
+ (FBPermissionRequest*)acquirePermission:(NSString*)permissionName delegate:(id<FBPermissionRequestDelegate>)delegate;
- (id)initWithSession:(FBSession*)session;
- (void)checkForPermission:(NSString*)permissionName;
- (void)askForPermission:(NSString*)permissionName;
- (void)acquirePermission:(NSString*)permissionName;
@end
@protocol FBPermissionRequestDelegate <NSObject>
@optional
/**
* Called when the permission request succeeded in obtaining the permission.
*/
- (void)permissionRequestWasGranted:(FBPermissionRequest*)permissionRequest;
/**
* Called when the permission request failed to obtain the permission.
*/
- (void)permissionRequestWasDenied:(FBPermissionRequest*)permissionRequest;
/**
* Called when an error prevents the request from completing successfully.
*/
- (void)permissionRequest:(FBPermissionRequest*)permissionRequest didFailWithError:(NSError*)error;
@end