Updated pithos-apple-common and dir appropriate changes.
authorMiltiadis Vasilakis <mvasilak@gmail.com>
Thu, 8 Sep 2011 12:35:32 +0000 (15:35 +0300)
committerMiltiadis Vasilakis <mvasilak@gmail.com>
Thu, 8 Sep 2011 12:35:32 +0000 (15:35 +0300)
pithos-apple-common
pithos-macos.xcodeproj/project.pbxproj
pithos-macos/PublicURLTransformer.m
pithos-macos/pithos_macosAppDelegate.m

index 662d5d9..f34ce56 160000 (submodule)
@@ -1 +1 @@
-Subproject commit 662d5d9ab7db48d7c987589b89194f7ae4807e4d
+Subproject commit f34ce56a43ae2f7fa268660a5912b0a69c72c815
index 45ecc24..5809d48 100644 (file)
@@ -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 */; };
                6121250813F033F400063041 /* PithosBrowserPreviewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = PithosBrowserPreviewController.xib; sourceTree = "<group>"; };
                6139836F13EFEECC004CE444 /* FileSystemBrowserCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FileSystemBrowserCell.h; path = "pithos-macos/FileSystemBrowserCell.h"; sourceTree = "<group>"; };
                6139837013EFEECC004CE444 /* FileSystemBrowserCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FileSystemBrowserCell.m; path = "pithos-macos/FileSystemBrowserCell.m"; sourceTree = "<group>"; };
+               614592BA1417CE70002E7A8C /* ASIPithosAccount.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ASIPithosAccount.h; sourceTree = "<group>"; };
+               614592BB1417CE70002E7A8C /* ASIPithosAccount.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ASIPithosAccount.m; sourceTree = "<group>"; };
                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 = "<group>"; };
                615A444D140F8A5700308614 /* MetadataKeyTransformer.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = MetadataKeyTransformer.m; path = "pithos-macos/MetadataKeyTransformer.m"; sourceTree = "<group>"; };
                                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";
                                61C24BBE1410E031007004DC /* SharingDictionaryTransformer.m in Sources */,
                                61C24BC114110BDB007004DC /* SharingNameFormatter.m in Sources */,
                                61C24BEC14161EC7007004DC /* PithosFileUtilities.m in Sources */,
+                               614592BC1417CE70002E7A8C /* ASIPithosAccount.m in Sources */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index 03823a6..189145b 100644 (file)
@@ -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 {
index 20f065c..bfb1f93 100644 (file)
@@ -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 
 - (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];
     }