-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDBSession.h
More file actions
44 lines (30 loc) · 1.18 KB
/
DBSession.h
File metadata and controls
44 lines (30 loc) · 1.18 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
//
// DBSession.h
// DropboxSDK
//
// Created by Brian Smith on 4/8/10.
// Copyright 2010 Dropbox, Inc. All rights reserved.
//
#import "MPOAuthCredentialConcreteStore.h"
extern NSString* kDBDropboxAPIHost;
extern NSString* kDBDropboxAPIContentHost;
extern NSString* kDBDropboxAPIVersion;
@protocol DBSessionDelegate;
/* Creating and setting the shared DBSession should be done before any other Dropbox objects are
used, perferrably in the UIApplication delegate. */
@interface DBSession : NSObject {
MPOAuthCredentialConcreteStore* credentialStore;
id<DBSessionDelegate> delegate;
}
+ (DBSession*)sharedSession;
+ (void)setSharedSession:(DBSession*)session;
- (id)initWithConsumerKey:(NSString*)key consumerSecret:(NSString*)secret;
- (BOOL)isLinked; // If not linked, you can only call loginWithEmail:password from the DBRestClient
- (void)updateAccessToken:(NSString*)token accessTokenSecret:(NSString*)secret;
- (void)unlink;
@property (nonatomic, readonly) MPOAuthCredentialConcreteStore* credentialStore;
@property (nonatomic, assign) id<DBSessionDelegate> delegate;
@end
@protocol DBSessionDelegate
- (void)sessionDidReceiveAuthorizationFailure:(DBSession*)session;
@end