39 lines
956 B
Objective-C
39 lines
956 B
Objective-C
//
|
|
// DropboxV2ObjC.h
|
|
// FMC Planner 2
|
|
//
|
|
// Created by Kilian Hofmann on 29.03.16.
|
|
// Copyright © 2016 Kilian Hofmann. All rights reserved.
|
|
//
|
|
|
|
#import "SharedDeclerations.h"
|
|
#import <Foundation/Foundation.h>
|
|
#import <Security/Security.h>
|
|
|
|
@interface DropboxV2ObjC : NSObject
|
|
|
|
#pragma mark Client fields
|
|
|
|
@property (strong, nonatomic) NSString *token;
|
|
/// No trailing slash
|
|
@property (strong, nonatomic) NSString *rootDirectory;
|
|
@property (strong, nonatomic) NSData *kJSONNullObject;
|
|
@property (strong, nonatomic) NSURLProtectionSpace *kDropboxProtectionSpace;
|
|
|
|
#pragma mark - Authorization methods
|
|
|
|
- (BOOL)authorizeUserWithToke:(NSURL *)token completion:(void (^)(void))handler;
|
|
- (void)deauthorizeUser;
|
|
|
|
#pragma mark - File and directory methods
|
|
|
|
- (void)downloadFromDropbox:(NSArray *)files;
|
|
- (void)uploadToDropbox:(NSData *)data;
|
|
- (NSArray *)contentsOfPath:(NSString *)path;
|
|
|
|
#pragma mark - Other methods
|
|
|
|
- (NSDictionary *)getUserInfo;
|
|
|
|
|
|
@end |