-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWebDAV.h
More file actions
67 lines (47 loc) · 1.52 KB
/
WebDAV.h
File metadata and controls
67 lines (47 loc) · 1.52 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
66
67
//
// WebDAV.h
// MobileMe
//
// Created by Ryan Detzel on 1/12/09.
// Copyright 2009 Fifth Floor Media. All rights reserved.
//
#import <Foundation/Foundation.h>
enum ConnectionState {
kConnectionState_listDir,
kConnectionState_makeDir,
kConnectionState_uploadFile,
kConnectionState_uploadData,
};
typedef enum ConnectionState ConnectionState;
@interface WebDAV : NSObject {
id delegate;
NSString *username;
NSString *password;
NSInteger globalTimeout;
ConnectionState connectionState;
NSURLConnection *connection;
NSMutableData *incomingData;
NSURLAuthenticationChallenge *pendingChallenge;
NSURL *documentURL;
NSMutableString *_xmlChars;
NSUInteger _uriLength;
NSMutableArray *directoryList;
}
@property (nonatomic, copy) NSString *username;
@property (nonatomic, copy) NSString *password;
@property (nonatomic, assign) NSInteger globalTimeout;
@property (nonatomic, retain) NSURLConnection *connection;
@property (nonatomic, retain) NSMutableData *incomingData;
@property (nonatomic, retain) NSURLAuthenticationChallenge *pendingChallenge;
@property (nonatomic, readonly) NSURL *documentURL;
-(id)initWithUsername:(NSString *)u password:(NSString *)p;
-(void)setup:(NSString *)u password:(NSString *)p;
-(id)delegate;
-(void)setDelegate:(id)val;
-(NSString *)buildURL;
-(void)listDir:(NSString *)path;
-(void)throwError:(NSString *)error;
-(void)makeDir:(NSString *)path;
-(void)uploadData:(NSData *)data destination:(NSString *)path;
-(void)uploadFile:(NSString *)local destination:(NSString *)path;
@end