From: Miltiadis Vasilakis Date: Thu, 8 Sep 2011 12:35:32 +0000 (+0300) Subject: Updated pithos-apple-common and dir appropriate changes. X-Git-Tag: v0.1~74 X-Git-Url: https://code.grnet.gr/git/pithos-macos/commitdiff_plain/e5096d8a551ac87aa54f09014858a145c8ca7357?hp=6dc7e931a9a22ca8b4e46ade115af365eeb0dab9 Updated pithos-apple-common and dir appropriate changes. --- diff --git a/pithos-apple-common b/pithos-apple-common index 662d5d9..f34ce56 160000 --- a/pithos-apple-common +++ b/pithos-apple-common @@ -1 +1 @@ -Subproject commit 662d5d9ab7db48d7c987589b89194f7ae4807e4d +Subproject commit f34ce56a43ae2f7fa268660a5912b0a69c72c815 diff --git a/pithos-macos.xcodeproj/project.pbxproj b/pithos-macos.xcodeproj/project.pbxproj index 45ecc24..5809d48 100644 --- a/pithos-macos.xcodeproj/project.pbxproj +++ b/pithos-macos.xcodeproj/project.pbxproj @@ -41,6 +41,7 @@ 611FFCB313EBF40900E43E18 /* ImageAndTextCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 611FFCB213EBF40900E43E18 /* ImageAndTextCell.m */; }; 6121250913F033F500063041 /* PithosBrowserPreviewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6121250813F033F400063041 /* PithosBrowserPreviewController.xib */; }; 6139837113EFEECC004CE444 /* FileSystemBrowserCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 6139837013EFEECC004CE444 /* FileSystemBrowserCell.m */; }; + 614592BC1417CE70002E7A8C /* ASIPithosAccount.m in Sources */ = {isa = PBXBuildFile; fileRef = 614592BB1417CE70002E7A8C /* ASIPithosAccount.m */; }; 615615DD140CECDB00017BD4 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 615615DC140CECDB00017BD4 /* libz.dylib */; }; 615A444E140F8A5700308614 /* MetadataKeyTransformer.m in Sources */ = {isa = PBXBuildFile; fileRef = 615A444D140F8A5700308614 /* MetadataKeyTransformer.m */; }; 615A4451140F8A7F00308614 /* MetadataKeyFormatter.m in Sources */ = {isa = PBXBuildFile; fileRef = 615A4450140F8A7F00308614 /* MetadataKeyFormatter.m */; }; @@ -127,6 +128,8 @@ 6121250813F033F400063041 /* PithosBrowserPreviewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PithosBrowserPreviewController.xib; sourceTree = ""; }; 6139836F13EFEECC004CE444 /* FileSystemBrowserCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileSystemBrowserCell.h; path = "pithos-macos/FileSystemBrowserCell.h"; sourceTree = ""; }; 6139837013EFEECC004CE444 /* FileSystemBrowserCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FileSystemBrowserCell.m; path = "pithos-macos/FileSystemBrowserCell.m"; sourceTree = ""; }; + 614592BA1417CE70002E7A8C /* ASIPithosAccount.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASIPithosAccount.h; sourceTree = ""; }; + 614592BB1417CE70002E7A8C /* ASIPithosAccount.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASIPithosAccount.m; sourceTree = ""; }; 615615DC140CECDB00017BD4 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; 615A444C140F8A5700308614 /* MetadataKeyTransformer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MetadataKeyTransformer.h; path = "pithos-macos/MetadataKeyTransformer.h"; sourceTree = ""; }; 615A444D140F8A5700308614 /* MetadataKeyTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MetadataKeyTransformer.m; path = "pithos-macos/MetadataKeyTransformer.m"; sourceTree = ""; }; @@ -301,6 +304,8 @@ 610DD33A13E6BD8B00ED982F /* ASIPithosObjectRequest.m */, 610DD33B13E6BD8B00ED982F /* ASIPithosRequest.h */, 610DD33C13E6BD8B00ED982F /* ASIPithosRequest.m */, + 614592BA1417CE70002E7A8C /* ASIPithosAccount.h */, + 614592BB1417CE70002E7A8C /* ASIPithosAccount.m */, ); name = Pithos; path = "pithos-apple-common/asi-http-request-with-pithos/Classes/Pithos"; @@ -472,6 +477,7 @@ 61C24BBE1410E031007004DC /* SharingDictionaryTransformer.m in Sources */, 61C24BC114110BDB007004DC /* SharingNameFormatter.m in Sources */, 61C24BEC14161EC7007004DC /* PithosFileUtilities.m in Sources */, + 614592BC1417CE70002E7A8C /* ASIPithosAccount.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; diff --git a/pithos-macos/PublicURLTransformer.m b/pithos-macos/PublicURLTransformer.m index 03823a6..189145b 100644 --- a/pithos-macos/PublicURLTransformer.m +++ b/pithos-macos/PublicURLTransformer.m @@ -36,7 +36,7 @@ // or implied, of GRNET S.A. #import "PublicURLTransformer.h" -#import "pithos_macosAppDelegate.h" +#import "ASIPithosRequest.h" @implementation PublicURLTransformer @@ -51,8 +51,7 @@ - (id)transformedValue:(id)value { if (value == nil) return nil; - return [[(pithos_macosAppDelegate *)[[NSApplication sharedApplication] delegate] publicURLPrefix] - stringByAppendingString:(NSString *)value]; + return [[ASIPithosRequest publicURLPrefix] stringByAppendingString:(NSString *)value]; } + (void)initialize { diff --git a/pithos-macos/pithos_macosAppDelegate.m b/pithos-macos/pithos_macosAppDelegate.m index 20f065c..bfb1f93 100644 --- a/pithos-macos/pithos_macosAppDelegate.m +++ b/pithos-macos/pithos_macosAppDelegate.m @@ -45,7 +45,7 @@ - (void)applicationDidFinishLaunching:(NSNotification *)aNotification { // XXX hardcoded for now - storageURLPrefix = @"https://pithos.dev.grnet.gr/v1/"; + storageURLPrefix = @"https://pithos.dev.grnet.gr/v1"; publicURLPrefix = @"https://pithos.dev.grnet.gr"; [[NSAppleEventManager sharedAppleEventManager] setEventHandler:self @@ -154,8 +154,10 @@ - (void)authenticateWithAuthUser:(NSString *)authUser authToken:(NSString *)authToken { NSLog(@"Authentication - storageURLPrefix:%@, authUser:%@, authToken:%@", storageURLPrefix, authUser, authToken); if ([authUser length] && [authToken length]) { - [ASIPithosRequest setStorageURL:[storageURLPrefix stringByAppendingString:[authUser stringByAddingPercentEscapesUsingEncoding:NSUTF8StringEncoding]]]; + [ASIPithosRequest setStorageURLPrefix:storageURLPrefix]; + [ASIPithosRequest setAuthUser:authUser]; [ASIPithosRequest setAuthToken:authToken]; + [ASIPithosRequest setPublicURLPrefix:publicURLPrefix]; [[NSNotificationCenter defaultCenter] postNotificationName:@"PithosAuthenticationCredentialsUpdated" object:self]; }