// pithos_macosAppDelegate.h
// pithos-macos
//
-// Copyright 2011 GRNET S.A. 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
#import <Cocoa/Cocoa.h>
@class PithosBrowserController;
@class PithosPreferencesController;
+@class PithosAccount;
@interface pithos_macosAppDelegate : NSObject <NSApplicationDelegate> {
- IBOutlet PithosBrowserController *pithosBrowserController;
- IBOutlet PithosPreferencesController *pithosPreferencesController;
-
+ PithosBrowserController *pithosBrowserController;
+ PithosPreferencesController *pithosPreferencesController;
+
+ BOOL alwaysNo;
+
IBOutlet NSMenu *statusMenu;
+ IBOutlet NSMenu *accountsMenu;
+ IBOutlet NSMenu *lastSyncMenu;
NSStatusItem *statusItem;
- IBOutlet NSUserDefaultsController *userDefaultsController;
+ LSSharedFileListRef loginItems;
+ BOOL openAtLoginEnabled;
+ BOOL openAtLogin;
+
+ NSUserDefaults *userDefaults;
+
+ BOOL activated;
+ PithosAccount *currentPithosAccount;
+ NSMutableArray *pithosAccounts;
+ NSMutableDictionary *pithosAccountsDictionary;
- NSString *storageURLPrefix;
- NSString *publicURLPrefix;
- NSString *loginURLPrefix;
- NSString *aboutURL;
+ NSTimeInterval syncTimeInterval;
+ NSTimer *syncTimer;
+ PithosAccount *syncPithosAccount;
+
+ NSTimeInterval activityFacilityTimeInterval;
+
+ BOOL checkForUpdatesNotRunning;
+ BOOL checkForUpdatesCalledFromMenu;
}
+@property (nonatomic, readonly) PithosBrowserController *pithosBrowserController;
+@property (nonatomic, readonly) PithosPreferencesController *pithosPreferencesController;
+@property (nonatomic, assign) BOOL alwaysNo;
+@property (nonatomic, assign) BOOL openAtLoginEnabled;
+@property (nonatomic, assign) BOOL openAtLogin;
+@property (nonatomic, assign) BOOL activated;
+@property (nonatomic, strong) PithosAccount *currentPithosAccount;
+@property (nonatomic, strong) NSMutableArray *pithosAccounts;
+@property (nonatomic, readonly) NSMutableDictionary *pithosAccountsDictionary;
+@property (nonatomic, strong) PithosAccount *syncPithosAccount;
+@property (nonatomic, readonly) NSTimeInterval activityFacilityTimeInterval;
+@property (nonatomic, assign) BOOL checkForUpdatesNotRunning;
+
- (void)handleAppleEvent:(NSAppleEventDescriptor *)event withReplyEvent: (NSAppleEventDescriptor *)replyEvent;
- (IBAction)showPithosBrowser:(id)sender;
- (IBAction)showPithosPreferences:(id)sender;
-- (IBAction)aboutPithos:(id)sender;
-
-- (void)authenticateWithAuthUser:(NSString *)authUser authToken:(NSString *)authToken;
-
-@property (nonatomic, readonly) NSString *storageURLPrefix;
-@property (nonatomic, readonly) NSString *publicURLPrefix;
-@property (nonatomic, readonly) NSString *loginURLPrefix;
-@property (nonatomic, readonly) NSString *aboutURL;
+- (IBAction)showPithosAbout:(id)sender;
+- (void)sync;
+- (void)savePithosAccounts:(id)sender;
+- (void)removedPithosAccount:(PithosAccount *)removedPithosAccount;
+- (IBAction)menuCheckForUpdates:(NSMenuItem *)sender;
@end