Statistics
| Branch: | Revision:

root / asi-http-request-with-pithos / Classes / CloudFiles / ASICloudFilesCDNRequest.h @ be116d22

History | View | Annotate | Download (1.8 kB)

1
//
2
//  ASICloudFilesCDNRequest.h
3
//
4
//  Created by Michael Mayo on 1/6/10.
5
//
6

    
7
#import "ASICloudFilesRequest.h"
8

    
9
@class ASICloudFilesContainerXMLParserDelegate;
10

    
11
@interface ASICloudFilesCDNRequest : ASICloudFilesRequest {
12
        NSString *accountName;
13
        NSString *containerName;
14
        ASICloudFilesContainerXMLParserDelegate *xmlParserDelegate;
15
        
16
}
17

    
18
@property (retain) NSString *accountName;
19
@property (retain) NSString *containerName;
20
@property (retain) ASICloudFilesContainerXMLParserDelegate *xmlParserDelegate;
21

    
22

    
23
// HEAD /<api version>/<account>/<container>
24
// Response:
25
// X-CDN-Enabled: True
26
// X-CDN-URI: http://cdn.cloudfiles.mosso.com/c1234
27
// X-CDN-TTL: 86400
28
+ (id)containerInfoRequest:(NSString *)containerName;
29
- (BOOL)cdnEnabled;
30
- (NSString *)cdnURI;
31
- (NSUInteger)cdnTTL;
32

    
33

    
34
// GET /<api version>/<account>
35
// limit, marker, format, enabled_only=true
36
+ (id)listRequest;
37
+ (id)listRequestWithLimit:(NSUInteger)limit marker:(NSString *)marker enabledOnly:(BOOL)enabledOnly;
38
- (NSArray *)containers;
39

    
40

    
41
// PUT /<api version>/<account>/<container>
42
// PUT operations against a Container are used to CDN-enable that Container.
43
// Include an HTTP header of X-TTL to specify a custom TTL.
44
+ (id)putRequestWithContainer:(NSString *)containerName;
45
+ (id)putRequestWithContainer:(NSString *)containerName ttl:(NSUInteger)ttl;
46
// returns: - (NSString *)cdnURI;
47

    
48
// POST /<api version>/<account>/<container>
49
// POST operations against a CDN-enabled Container are used to adjust CDN attributes.
50
// The POST operation can be used to set a new TTL cache expiration or to enable/disable public sharing over the CDN.
51
// X-TTL: 86400
52
// X-CDN-Enabled: True
53
+ (id)postRequestWithContainer:(NSString *)containerName;
54
+ (id)postRequestWithContainer:(NSString *)containerName cdnEnabled:(BOOL)cdnEnabled ttl:(NSUInteger)ttl;
55
// returns: - (NSString *)cdnURI;
56

    
57

    
58
@end