X-Git-Url: https://code.grnet.gr/git/pithos-macos/blobdiff_plain/8aa8e10c814559deee44735d37da80d685481af8..fb27f36872b58b7d74ac693639072daeebfd120b:/pithos-macos/PithosAccount.h diff --git a/pithos-macos/PithosAccount.h b/pithos-macos/PithosAccount.h index 9a4e188..d24aba9 100644 --- a/pithos-macos/PithosAccount.h +++ b/pithos-macos/PithosAccount.h @@ -2,7 +2,7 @@ // PithosAccount.h // pithos-macos // -// Copyright 2012 GRNET S.A. All rights reserved. +// Copyright 2012-2013 GRNET S.A. All rights reserved. // // Redistribution and use in source and binary forms, with or // without modification, are permitted provided that the following @@ -46,6 +46,7 @@ NSString *uniqueName; BOOL active; NSString *name; + NSString *clientVersion; BOOL syncActive; NSString *syncDirectoryPath; @@ -53,31 +54,19 @@ BOOL syncSkipHidden; NSDate *syncLastCompleted; PithosSyncDaemon *syncDaemon; - - // Base for all necessary URLs, default "https://pithos.okeanos.grnet.gr" - NSString *serverURL; - // Appended to serverURL to get storageURLPrefix and authURL, default "v1" - // Can be overriden by setting directly storageURLPrefix and authURL - NSString *versionResource; - // Appended to serverURL to get loginURLPrefix, default "login" - // Can be overriden by setting directly loginURLPrefix - NSString *loginResource; - // Appended to serverURL to get publicURLPrefix, default nil - // Can be overriden by setting directly publicURLPrefix - NSString *publicResource; - // Appended to serverURL to get userCatalogURL, default "user_catalogs" - // Can be overriden by setting directly userCatalogURL - NSString *userCatalogResource; - - NSString *authUser; + + NSString *authURLString; + NSString *pithosObjectStoreURLString; + NSString *astakosAccountURLString; + NSString *astakosWebloginURLString; + BOOL manual; + NSString *authToken; - NSString *storageURLPrefix; - NSString *authURL; - NSString *publicURLPrefix; - NSString *loginURLPrefix; - NSString *userCatalogURL; + NSString *authUser; NSMutableDictionary *userCatalog; + BOOL ignoreSSLErrors; + ASIPithos *pithos; PithosAccountNode *accountNode; PithosSharingAccountsNode *sharingAccountsNode; @@ -89,6 +78,7 @@ @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; @@ -97,35 +87,45 @@ @property (nonatomic, strong) NSDate *syncLastCompleted; @property (nonatomic, strong) PithosSyncDaemon *syncDaemon; -@property (nonatomic, strong) NSString *serverURL; -@property (nonatomic, strong) NSString *versionResource; -@property (nonatomic, strong) NSString *loginResource; -@property (strong) NSString *publicResource; -@property (nonatomic, strong) NSString *userCatalogResource; +@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 *authUser; @property (nonatomic, strong) NSString *authToken; -@property (nonatomic, strong) NSString *storageURLPrefix; -@property (nonatomic, strong) NSString *authURL; -@property (nonatomic, strong) NSString *publicURLPrefix; -@property (nonatomic, strong) NSString *loginURLPrefix; -@property (nonatomic, strong) NSString *userCatalogURL; +@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; -- (BOOL)urlIsValid:(NSString *)urlString; -- (void)authenticateWithServerURL:(NSString *)aServerURL authUser:(NSString *)anAuthUser authToken:(NSString *)anAuthToken; -- (void)loginWithServerURL:(NSString *)aServerURL; -- (void)updateSyncWithSyncActive:(BOOL)aSyncActive +- (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; -- (ASIPithosRequest *)updateUserCatalogForForDisplaynames:(NSArray *)displaynames UUIDs:(NSArray *)UUIDs; +- (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;