root / asi-http-request-with-pithos / Classes / Pithos / ASIPithosAccountRequest.h @ 78355da3
History | View | Annotate | Download (4.2 kB)
1 |
// ASIPithosAccountRequest.h
|
---|---|
2 |
// Based on ASICloudFilesContainerRequest.h
|
3 |
//
|
4 |
// Copyright 2011 GRNET S.A. All rights reserved.
|
5 |
//
|
6 |
// Redistribution and use in source and binary forms, with or
|
7 |
// without modification, are permitted provided that the following
|
8 |
// conditions are met:
|
9 |
//
|
10 |
// 1. Redistributions of source code must retain the above
|
11 |
// copyright notice, this list of conditions and the following
|
12 |
// disclaimer.
|
13 |
//
|
14 |
// 2. Redistributions in binary form must reproduce the above
|
15 |
// copyright notice, this list of conditions and the following
|
16 |
// disclaimer in the documentation and/or other materials
|
17 |
// provided with the distribution.
|
18 |
//
|
19 |
// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
|
20 |
// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
21 |
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
22 |
// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
|
23 |
// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
24 |
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
25 |
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
|
26 |
// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
|
27 |
// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
28 |
// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
|
29 |
// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
30 |
// POSSIBILITY OF SUCH DAMAGE.
|
31 |
//
|
32 |
// The views and conclusions contained in the software and
|
33 |
// documentation are those of the authors and should not be
|
34 |
// interpreted as representing official policies, either expressed
|
35 |
// or implied, of GRNET S.A.
|
36 |
|
37 |
#import "ASIPithosRequest.h" |
38 |
|
39 |
#if !TARGET_OS_IPHONE || (TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MAX_ALLOWED < __IPHONE_4_0)
|
40 |
#import "ASINSXMLParserCompat.h" |
41 |
#endif
|
42 |
|
43 |
@class ASIPithosContainer;
|
44 |
|
45 |
@interface ASIPithosAccountRequest : ASIPithosRequest <NSXMLParserDelegate> {
|
46 |
NSMutableDictionary *groups; |
47 |
NSMutableDictionary *metadata; |
48 |
|
49 |
NSMutableArray *containers; |
50 |
|
51 |
// Internally used while parsing the response
|
52 |
ASIPithosContainer *currentContainer; |
53 |
} |
54 |
|
55 |
@property (retain) ASIPithosContainer *currentContainer;
|
56 |
|
57 |
// HEAD storageURL
|
58 |
+ (id)accountMetadataRequest; |
59 |
// HEAD storageURL?[until=untilTimestamp]
|
60 |
+ (id)accountMetadataRequestUntil:(NSDate *)untilTimestamp; |
61 |
// HEAD storageURL?[until=untilTimestamp] [If-Modified-Since]
|
62 |
+ (id)accountMetadataRequestUntil:(NSDate *)untilTimestamp ifModifiedSince:(NSDate *)sinceTimestamp; |
63 |
// HEAD storageURL?[until=untilTimestamp] [If-Unmodified-Since]
|
64 |
+ (id)accountMetadataRequestUntil:(NSDate *)untilTimestamp ifUnmodifiedSince:(NSDate *)sinceTimestamp; |
65 |
|
66 |
- (NSUInteger)containerCount; |
67 |
- (NSUInteger)bytesUsed; |
68 |
- (NSDate *)untilTimestamp; |
69 |
- (NSDictionary *)groups; |
70 |
- (NSDictionary *)metadata; |
71 |
- (NSDate *)lastModified; |
72 |
|
73 |
- (ASIPithosAccount *)account; |
74 |
|
75 |
// GET storageURL
|
76 |
+ (id)listContainersRequest; |
77 |
// GET storageURL?[limit=limit]&[marker=marker]&[shared=]&[until=untilTimestamp]
|
78 |
+ (id)listContainersRequestWithLimit:(NSUInteger)limit |
79 |
marker:(NSString *)marker |
80 |
shared:(BOOL)shared |
81 |
until:(NSDate *)untilTimestamp; |
82 |
// GET storageURL?[limit=limit]&[marker=marker]&[shared=]&[until=untilTimestamp] [If-Modified-Since]
|
83 |
+ (id)listContainersRequestWithLimit:(NSUInteger)limit |
84 |
marker:(NSString *)marker |
85 |
shared:(BOOL)shared |
86 |
until:(NSDate *)untilTimestamp |
87 |
ifModifiedSince:(NSDate *)sinceTimestamp; |
88 |
// GET storageURL?[limit=limit]&[marker=marker]&[shared=]&[until=untilTimestamp] [If-Unmodified-Since]
|
89 |
+ (id)listContainersRequestWithLimit:(NSUInteger)limit |
90 |
marker:(NSString *)marker |
91 |
shared:(BOOL)shared |
92 |
until:(NSDate *)untilTimestamp |
93 |
ifUnmodifiedSince:(NSDate *)sinceTimestamp; |
94 |
|
95 |
- (NSArray *)containers; |
96 |
|
97 |
// POST storageURL
|
98 |
+ (id)updateAccountMetadataRequest; |
99 |
// POST storageURL?[update=] [X-Account-Group-*] [X-Account-Meta-*]
|
100 |
+ (id)updateAccountMetadataRequestWithGroups:(NSDictionary *)groups metadata:(NSDictionary *)metadata update:(BOOL)update; |
101 |
|
102 |
@end
|