Fix bugs and improve folder filter UI
[pithos-ios] / Classes / FolderViewController.h
1 //
2 //  FolderViewController.h
3 //  OpenStack
4 //
5 //  Created by Mike Mayo on 12/15/10.
6 //  The OpenStack project is provided under the Apache 2.0 license.
7 //
8
9 #import "OpenStackViewController.h"
10
11 @class OpenStackAccount, Container, Folder, StorageObject, ActivityIndicatorView, ContainersViewController, FolderDetailViewController, StorageObjectViewController;
12
13 @interface FolderViewController : OpenStackViewController <UITableViewDelegate, UITableViewDataSource, UISearchDisplayDelegate, UIActionSheetDelegate> {
14     OpenStackAccount *account;
15     Container *container;
16     Folder *folder;
17     NSString *name;
18     ActivityIndicatorView *activityIndicatorView;
19     id successObserver;
20     id failureObserver;
21     
22     ContainersViewController *containersViewController;
23     FolderViewController *parentFolderViewController;
24     NSIndexPath *selectedContainerIndexPath;
25     NSIndexPath *selectedFolderIndexPath;
26     BOOL contentsLoaded;
27     BOOL needsRefreshing;
28     BOOL folderHasBeenRemoved;
29     BOOL refreshWhenAppeared;
30     
31     IBOutlet UITableView *tableView;
32     IBOutlet UIBarButtonItem *homeButton;
33     IBOutlet UIBarButtonItem *refreshButton;
34     IBOutlet UISearchBar *searchBar;
35     IBOutlet UISearchDisplayController *searchDisplayController;
36     NSString *searchFilter;
37
38     FolderDetailViewController *folderDetailVC;
39     StorageObjectViewController *selectedObjectViewController;
40 }
41
42 @property (nonatomic, retain) OpenStackAccount *account;
43 @property (nonatomic, retain) Container *container;
44 @property (nonatomic, retain) Folder *folder;
45 @property (nonatomic, retain) NSString *name;
46 @property (nonatomic, retain) ContainersViewController *containersViewController;
47 @property (nonatomic, retain) NSIndexPath *selectedContainerIndexPath;
48 @property (nonatomic, retain) FolderViewController *parentFolderViewController;
49 @property (nonatomic, retain) NSIndexPath *selectedFolderIndexPath;
50 @property (nonatomic, assign) BOOL contentsLoaded;
51 @property (nonatomic, assign) BOOL needsRefreshing;
52 @property (nonatomic, assign) BOOL folderHasBeenRemoved;
53 @property (nonatomic, assign) BOOL refreshWhenAppeared;
54 @property (nonatomic, retain) IBOutlet UITableView *tableView;
55 @property (nonatomic, retain) IBOutlet UIBarButtonItem *refreshButton;
56 @property (nonatomic, retain) IBOutlet UISearchBar *searchBar;
57 @property (nonatomic, retain) IBOutlet UISearchDisplayController *searchDisplayController;
58 @property (nonatomic, retain) NSString *searchFilter;
59 @property (nonatomic, assign) FolderDetailViewController *folderDetailVC;
60 @property (nonatomic, assign) StorageObjectViewController *selectedObjectViewController;
61
62 - (IBAction)homeButtonPressed:(id)sender;
63 - (IBAction)refreshButtonPressed:(id)sender;
64 - (void)reloadData;
65 - (void)setDetailViewController;
66 - (void)deleteAnimatedObject:(StorageObject *)object;
67
68 @end