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;
};
// or implied, of GRNET S.A.
#import "PublicURLTransformer.h"
-#import "pithos_macosAppDelegate.h"
+#import "ASIPithosRequest.h"
@implementation PublicURLTransformer
- (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 {
- (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];
}