Use service catalog
[pithos-macos] / pithos-macos / PithosAccount.h
index 7300c8a..2972271 100644 (file)
@@ -1,8 +1,8 @@
 //
-//  PithosNode.h
+//  PithosAccount.h
 //  pithos-macos
 //
-// Copyright 2011 GRNET S.A. All rights reserved.
+// Copyright 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
 // interpreted as representing official policies, either expressed
 // or implied, of GRNET S.A.
 
-#import "PithosNode.h"
+#import <Foundation/Foundation.h>
+@class PithosSyncDaemon;
+@class ASIPithos;
+@class ASIPithosRequest;
+@class PithosAccountNode;
+@class PithosSharingAccountsNode;
 
-@interface PithosAccount : PithosNode {
-    NSMutableArray *containers;
+@interface PithosAccount : NSObject <NSCoding> {
+    NSString *uniqueName;
+    BOOL active;
+    NSString *name;
+    NSString *clientVersion;
     
-    BOOL refreshing;
+    BOOL syncActive;
+    NSString *syncDirectoryPath;
+    NSMutableDictionary *syncAccountsDictionary;
+    BOOL syncSkipHidden;
+    NSDate *syncLastCompleted;
+    PithosSyncDaemon *syncDaemon;
+    
+    NSString *authURLString;
+    NSString *pithosObjectStoreURLString;
+    NSString *astakosAccountURLString;
+    NSString *astakosWebloginURLString;
+    BOOL manual;
+    
+    NSString *authToken;
+    NSString *authUser;
+    NSMutableDictionary *userCatalog;
+    
+    BOOL ignoreSSLErrors;
+    
+    ASIPithos *pithos;
+    PithosAccountNode *accountNode;
+    PithosSharingAccountsNode *sharingAccountsNode;
+    
+    BOOL updatePithos;
+    BOOL resetSyncDaemonLocalState;
 }
 
+@property (nonatomic, strong) NSString *uniqueName;
+@property (assign) BOOL active;
+@property (nonatomic, strong) NSString *name;
+@property (nonatomic, strong) NSString *clientVersion;
+
+@property (nonatomic, assign) BOOL syncActive;
+@property (nonatomic, strong) NSString *syncDirectoryPath;
+@property (nonatomic, strong) NSMutableDictionary *syncAccountsDictionary;
+@property (nonatomic, assign) BOOL syncSkipHidden;
+@property (nonatomic, strong) NSDate *syncLastCompleted;
+@property (nonatomic, strong) PithosSyncDaemon *syncDaemon;
+
+@property (nonatomic, strong) NSString *authURLString;
+@property (nonatomic, strong) NSString *pithosObjectStoreURLString;
+@property (nonatomic, strong) NSString *astakosAccountURLString;
+@property (nonatomic, strong) NSString *astakosWebloginURLString;
+@property (nonatomic, assign) BOOL manual;
+
+@property (nonatomic, strong) NSString *authToken;
+@property (nonatomic, strong) NSString *authUser;
+@property (nonatomic, strong) NSMutableDictionary *userCatalog;
+
+@property (nonatomic, assign) BOOL ignoreSSLErrors;
+
+@property (strong, readonly) ASIPithos *pithos;
+@property (readonly) PithosAccountNode *accountNode;
+@property (readonly) PithosSharingAccountsNode *sharingAccountsNode;
+
+@property (nonatomic, readonly) NSString *tokensURL;
+@property (nonatomic, readonly) NSString *storageURLPrefix;
+@property (nonatomic, readonly) NSString *loginURL;
+@property (nonatomic, readonly) NSString *userCatalogURL;
+@property (nonatomic, readonly) NSString *publicURLPrefix;
+
++ (id)pithosAccount;
+
+- (void)updateWithAuthURLString:(NSString *)anAuthURLString
+     pithosObjectStoreURLString:(NSString *)aPithosObjectStoreURLString
+        astakosAccountURLString:(NSString *)anAstakosAccountURLString
+       astakosWebloginURLString:(NSString *)anAstakosWebloginURLString
+                         manual:(BOOL)aManual
+                      authToken:(NSString *)anAuthToken
+                       authUser:(NSString *)anAuthUser
+                ignoreSSLErrors:(BOOL)anIgnoreSSLErrors;
+- (void)updateSyncWithSyncActive:(BOOL)aSyncActive
+               syncDirectoryPath:(NSString *)aSyncDirectoryPath 
+          syncAccountsDictionary:(NSMutableDictionary *)aSyncAccountsDictionary 
+                  syncSkipHidden:(BOOL)aSyncSkipHidden;
+- (NSMutableDictionary *)servicesFromServiceCatalogRequest:(ASIPithosRequest *)serviceCatalogRequest;
+- (void)updateServicesFromServiceCatalogRequest:(ASIPithosRequest *)serviceCatalogRequest;
+- (ASIPithosRequest *)updateUserCatalogForDisplaynames:(NSArray *)displaynames UUIDs:(NSArray *)UUIDs;
+- (NSString *)displaynameForUUID:(NSString *)UUID safe:(BOOL)safe;
+- (NSString *)displaynameForUUID:(NSString *)UUID;
+
 @end