until:nil] retain];
if (sharingAccount)
[accountRequest setRequestUserFromDefaultTo:sharingAccount withPithos:pithos];
+ else if (!forcedRefresh)
+ accountRequest.downloadCache = [ASIDownloadCache sharedCache];
accountRequest.delegate = self;
accountRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
accountRequest.didFailSelector = @selector(performRequestFailedDelegateInBackground:);
NSStringFromSelector(@selector(accountRequestFinished:)), @"didFinishSelector",
NSStringFromSelector(@selector(accountRequestFailed:)), @"didFailSelector",
nil];
- if (!forcedRefresh)
- accountRequest.downloadCache = [ASIDownloadCache sharedCache];
[[PithosUtilities prepareRequest:accountRequest priority:NSOperationQueuePriorityVeryHigh] startAsynchronous];
break;
case PithosNodeStateRefreshing:
until:nil] retain];
if (sharingAccount)
[accountRequest setRequestUserFromDefaultTo:sharingAccount withPithos:pithos];
+ else if (!forcedRefresh)
+ accountRequest.downloadCache = [ASIDownloadCache sharedCache];
accountRequest.delegate = self;
accountRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
accountRequest.didFailSelector = @selector(performRequestFailedDelegateInBackground:);
NSStringFromSelector(@selector(accountRequestFinished:)), @"didFinishSelector",
NSStringFromSelector(@selector(accountRequestFailed:)), @"didFailSelector",
nil];
- if (!forcedRefresh)
- accountRequest.downloadCache = [ASIDownloadCache sharedCache];
[[PithosUtilities prepareRequest:accountRequest priority:NSOperationQueuePriorityVeryHigh] startAsynchronous];
}
} else if (accountRequest.responseStatusCode == 304) {
NSStringFromSelector(@selector(accountMetadataRequestFinished:)), @"didFinishSelector",
NSStringFromSelector(@selector(accountMetadataRequestFailed:)), @"didFailSelector",
nil];
- refreshMetadataAccountRequest.downloadCache = [ASIDownloadCache sharedCache];
+ if (!sharingAccount)
+ refreshMetadataAccountRequest.downloadCache = [ASIDownloadCache sharedCache];
[[PithosUtilities prepareRequest:refreshMetadataAccountRequest priority:NSOperationQueuePriorityHigh] startAsynchronous];
}
}
until:nil] retain];
if (sharingAccount)
[containerRequest setRequestUserFromDefaultTo:sharingAccount withPithos:pithos];
+ else if (!forcedRefresh)
+ containerRequest.downloadCache = [ASIDownloadCache sharedCache];
containerRequest.delegate = self;
containerRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
containerRequest.didFailSelector = @selector(performRequestFailedDelegateInBackground:);
NSStringFromSelector(@selector(containerRequestFinished:)), @"didFinishSelector",
NSStringFromSelector(@selector(containerRequestFailed:)), @"didFailSelector",
nil];
- if (!forcedRefresh)
- containerRequest.downloadCache = [ASIDownloadCache sharedCache];
[[PithosUtilities prepareRequest:containerRequest priority:NSOperationQueuePriorityVeryHigh] startAsynchronous];
break;
case PithosNodeStateRefreshing:
until:nil] retain];
if (sharingAccount)
[containerRequest setRequestUserFromDefaultTo:sharingAccount withPithos:pithos];
+ else if (!forcedRefresh)
+ containerRequest.downloadCache = [ASIDownloadCache sharedCache];
containerRequest.delegate = self;
containerRequest.didFinishSelector = @selector(performRequestFinishedDelegateInBackground:);
containerRequest.didFailSelector = @selector(performRequestFailedDelegateInBackground:);
NSStringFromSelector(@selector(containerRequestFinished:)), @"didFinishSelector",
NSStringFromSelector(@selector(containerRequestFailed:)), @"didFailSelector",
nil];
- if (!forcedRefresh)
- containerRequest.downloadCache = [ASIDownloadCache sharedCache];
[[PithosUtilities prepareRequest:containerRequest priority:NSOperationQueuePriorityVeryHigh] startAsynchronous];
}
} else if (containerRequest.responseStatusCode == 304) {
NSStringFromSelector(@selector(containerMetadataRequestFinished:)), @"didFinishSelector",
NSStringFromSelector(@selector(containerMetadataRequestFailed:)), @"didFailSelector",
nil];
- refreshMetadataContainerRequest.downloadCache = [ASIDownloadCache sharedCache];
+ if (!sharingAccount)
+ refreshMetadataContainerRequest.downloadCache = [ASIDownloadCache sharedCache];
[[PithosUtilities prepareRequest:refreshMetadataContainerRequest priority:NSOperationQueuePriorityHigh] startAsynchronous];
}
}
- (void)refresh;
- (void)forceRefresh;
-- (void) postChildrenUpdatedNotificationName;
+- (void)postChildrenUpdatedNotificationName;
- (void)showPithosNodeInfo:(id)sender;
- (void)pithosNodeInfoWillClose:(id)sender;
#import "PithosNode.h"
#import "PithosNodeInfoController.h"
-#import "ASIDownloadCache.h"
#import "ASIPithosRequest.h"
@implementation PithosNode
NSStringFromSelector(@selector(objectRequestFinished:)), @"didFinishSelector",
NSStringFromSelector(@selector(objectRequestFailed:)), @"didFailSelector",
nil];
- refreshMetadataObjectRequest.downloadCache = [ASIDownloadCache sharedCache];
+ if (!sharingAccount)
+ refreshMetadataObjectRequest.downloadCache = [ASIDownloadCache sharedCache];
[[PithosUtilities prepareRequest:refreshMetadataObjectRequest priority:NSOperationQueuePriorityHigh] startAsynchronous];
}
}
NSStringFromSelector(@selector(objectRequestFinished:)), @"didFinishSelector",
NSStringFromSelector(@selector(objectRequestFailed:)), @"didFailSelector",
nil];
- refreshVersionsObjectRequest.downloadCache = [ASIDownloadCache sharedCache];
+ if (!sharingAccount)
+ refreshVersionsObjectRequest.downloadCache = [ASIDownloadCache sharedCache];
[[PithosUtilities prepareRequest:refreshVersionsObjectRequest priority:NSOperationQueuePriorityHigh] startAsynchronous];
}
}
NSStringFromSelector(@selector(sharingAccountsRequestFinished:)), @"didFinishSelector",
NSStringFromSelector(@selector(sharingAccountsRequestFailed:)), @"didFailSelector",
nil];
- if (!forcedRefresh)
- sharingAccountsRequest.downloadCache = [ASIDownloadCache sharedCache];
+// if (!forcedRefresh)
+// sharingAccountsRequest.downloadCache = [ASIDownloadCache sharedCache];
[[PithosUtilities prepareRequest:sharingAccountsRequest priority:NSOperationQueuePriorityVeryHigh] startAsynchronous];
break;
case PithosNodeStateRefreshing:
NSStringFromSelector(@selector(sharingAccountsRequestFinished:)), @"didFinishSelector",
NSStringFromSelector(@selector(sharingAccountsRequestFailed:)), @"didFailSelector",
nil];
- if (!forcedRefresh)
- sharingAccountsRequest.downloadCache = [ASIDownloadCache sharedCache];
+// if (!forcedRefresh)
+// sharingAccountsRequest.downloadCache = [ASIDownloadCache sharedCache];
[[PithosUtilities prepareRequest:sharingAccountsRequest priority:NSOperationQueuePriorityVeryHigh] startAsynchronous];
}
} else {
NSStringFromSelector(@selector(objectRequestFinished:)), @"didFinishSelector",
NSStringFromSelector(@selector(objectRequestFailed:)), @"didFailSelector",
nil];
- refreshMetadataObjectRequest.downloadCache = [ASIDownloadCache sharedCache];
+ if (!sharingAccount)
+ refreshMetadataObjectRequest.downloadCache = [ASIDownloadCache sharedCache];
[[PithosUtilities prepareRequest:refreshMetadataObjectRequest priority:NSOperationQueuePriorityHigh] startAsynchronous];
}
}
NSStringFromSelector(@selector(objectRequestFinished:)), @"didFinishSelector",
NSStringFromSelector(@selector(objectRequestFailed:)), @"didFailSelector",
nil];
- refreshVersionsObjectRequest.downloadCache = [ASIDownloadCache sharedCache];
+ if (!sharingAccount)
+ refreshVersionsObjectRequest.downloadCache = [ASIDownloadCache sharedCache];
[[PithosUtilities prepareRequest:refreshVersionsObjectRequest priority:NSOperationQueuePriorityHigh] startAsynchronous];
}
}
#import "PithosSyncDaemon.h"
#import "ASIPithosRequest.h"
#import "ASIPithos.h"
-#import "ASIDownloadCache.h"
#import "LastCompletedSyncTransformer.h"
@implementation pithos_macosAppDelegate