Merge branch 'master' of https://code.grnet.gr/git/pithos-ios
[pithos-ios] / Classes / StorageObjectViewController.h
1 //
2 //  StorageObjectViewController.h
3 //  OpenStack
4 //
5 //  Created by Mike Mayo on 12/19/10.
6 //  The OpenStack project is provided under the Apache 2.0 license.
7 //
8
9 #import "ASIProgressDelegate.h"
10 #import <MessageUI/MFMailComposeViewController.h>
11
12 enum {
13     StorageObjectActionOpenFile = 0,
14     StorageObjectActionMailFile = 1,
15 };
16 typedef NSInteger StorageObjectAction;
17
18 @class OpenStackAccount, Container, Folder, StorageObject, AnimatedProgressView, FolderViewController;
19
20 @interface StorageObjectViewController : UITableViewController <UIDocumentInteractionControllerDelegate, ASIProgressDelegate, UIActionSheetDelegate, MFMailComposeViewControllerDelegate> {
21     OpenStackAccount *account;
22     Container *container;
23     Folder *folder;
24     StorageObject *object;
25     BOOL fileDownloaded;
26     AnimatedProgressView *downloadProgressView;
27     BOOL fileDownloading;
28     UIActionSheet *cdnURLActionSheet;
29
30     FolderViewController *folderViewController;
31     UISwitch *objectIsPublicSwitch;
32     BOOL objectIsPublic;
33     BOOL objectIsReadOnly;
34     
35     UIDocumentInteractionController *documentInteractionController;
36     
37     NSInteger publicLinkSection;
38     NSInteger permissionsSection;
39     NSInteger versionsSection;
40     NSInteger deleteSection;
41     
42     NSString *oldObjectSharingString;
43     NSString *oldPublicURI;
44     NSMutableDictionary *permissions;
45     NSString *versionID;
46 }
47
48 @property (nonatomic, retain) OpenStackAccount *account;
49 @property (nonatomic, retain) Container *container;
50 @property (nonatomic, retain) Folder *folder;
51 @property (nonatomic, retain) StorageObject *object;
52 @property (nonatomic, retain) FolderViewController *folderViewController;
53 @property (nonatomic, retain) NSString *oldPubicURI;
54 @property (nonatomic, retain) UIDocumentInteractionController *documentInteractionController;
55 @property (nonatomic, assign) BOOL objectIsReadOnly;
56 @property (nonatomic, retain) NSString *versionID;
57
58 - (void)setProgress:(float)newProgress;
59 - (void)reloadMetadataSection;
60 - (void)downloadFileForAction:(StorageObjectAction)action;
61
62 @end