// PithosBrowserController.h
// pithos-macos
//
-// Created by Miltiadis Vasilakis on 01/08/11.
-// Copyright 2011 koomasi. All rights reserved.
+// Copyright 2011-2012 GRNET S.A. All rights reserved.
//
+// Redistribution and use in source and binary forms, with or
+// without modification, are permitted provided that the following
+// conditions are met:
+//
+// 1. Redistributions of source code must retain the above
+// copyright notice, this list of conditions and the following
+// disclaimer.
+//
+// 2. Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following
+// disclaimer in the documentation and/or other materials
+// provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY GRNET S.A. ``AS IS'' AND ANY EXPRESS
+// OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL GRNET S.A OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
+// USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
+// AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+// LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
+// ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+// POSSIBILITY OF SUCH DAMAGE.
+//
+// The views and conclusions contained in the software and
+// documentation are those of the authors and should not be
+// interpreted as representing official policies, either expressed
+// or implied, of GRNET S.A.
#import <Cocoa/Cocoa.h>
+#import "PithosActivityFacility.h"
+@class ASIPithos;
+@class PithosNode;
+@class PithosAccountNode;
+@class PithosSharingAccountsNode;
+@class PithosEmptyNode;
+@class PithosActivityFacility;
+@class ASINetworkQueue;
-
-@interface PithosBrowserController : NSWindowController {
-@private
+@interface PithosBrowserController : NSWindowController <NSBrowserDelegate, NSSplitViewDelegate, NSOutlineViewDelegate, NSOutlineViewDataSource, NSMenuDelegate, PithosActivityFacilityDelegate> {
+ BOOL browserInitialized;
+ BOOL browserActive;
+
+ ASIPithos *pithos;
+
+ PithosNode *rootNode;
+ PithosAccountNode *accountNode;
+ PithosEmptyNode *containersNode;
+ NSMutableArray *containersNodeChildren;
+ PithosEmptyNode *sharedNode;
+ PithosAccountNode *mySharedNode;
+ PithosSharingAccountsNode *othersSharedNode;
+
+ NSViewController *sharedPreviewController;
+
+ NSSplitView *verticalSplitView;
+ NSSplitView *horizontalSplitView;
+ NSView *leftTopView;
+ NSView *leftBottomView;
+ NSOutlineView *outlineView;
+ NSBrowser *browser;
+ NSMenu *outlineViewMenu;
+ NSMenu *browserMenu;
+
+ NSArray *draggedNodes;
+ PithosNode *draggedParentNode;
+
+ NSArray *clipboardNodes;
+ PithosNode *clipboardParentNode;
+ BOOL clipboardCopy;
+
+ NSTextField *activityTextField;
+ NSProgressIndicator *activityProgressIndicator;
+ PithosActivityFacility *activityFacility;
+ NSTimer *refreshTimer;
+
+ ASINetworkQueue *moveNetworkQueue;
+ ASINetworkQueue *copyNetworkQueue;
+ ASINetworkQueue *deleteNetworkQueue;
+ ASINetworkQueue *uploadNetworkQueue;
+ ASINetworkQueue *downloadNetworkQueue;
+ NSOperationQueue *moveQueue;
+ NSOperationQueue *copyQueue;
+ NSOperationQueue *deleteQueue;
+ NSOperationQueue *uploadQueue;
+ NSOperationQueue *downloadQueue;
+ NSOperationQueue *moveCallbackQueue;
+ NSOperationQueue *copyCallbackQueue;
+ NSOperationQueue *deleteCallbackQueue;
+ NSOperationQueue *uploadCallbackQueue;
+ NSOperationQueue *downloadCallbackQueue;
}
+@property (nonatomic, retain) ASIPithos *pithos;
+
+@property (nonatomic, retain) PithosAccountNode *accountNode;
+
+@property (nonatomic, assign) IBOutlet NSSplitView *verticalSplitView;
+@property (nonatomic, assign) IBOutlet NSSplitView *horizontalSplitView;
+@property (nonatomic, assign) IBOutlet NSView *leftTopView;
+@property (nonatomic, assign) IBOutlet NSView *leftBottomView;
+@property (nonatomic, assign) IBOutlet NSOutlineView *outlineView;
+@property (nonatomic, assign) IBOutlet NSBrowser *browser;
+@property (nonatomic, assign) IBOutlet NSMenu *outlineViewMenu;
+@property (nonatomic, assign) IBOutlet NSMenu *browserMenu;
+
+@property (nonatomic, retain) NSArray *draggedNodes;
+@property (nonatomic, retain) PithosNode *draggedParentNode;
+
+@property (nonatomic, retain) NSArray *clipboardNodes;
+@property (nonatomic, retain) PithosNode *clipboardParentNode;
+@property (nonatomic, assign) BOOL clipboardCopy;
+
+@property (nonatomic, assign) IBOutlet NSTextField *activityTextField;
+@property (nonatomic, assign) IBOutlet NSProgressIndicator *activityProgressIndicator;
+
+- (IBAction)forceRefresh:(id)sender;
+- (IBAction)refresh:(id)sender;
+- (void)resetBrowser;
+- (void)startBrowser;
+- (BOOL)operationsPending;
+
@end