Skip to content

Commit

Permalink
shell_i: Use an NSConnection instead of a local socket owncloud#2340
Browse files Browse the repository at this point in the history
This prepares the switch to the official FinderSync API on Yosemite
which requires the extension to run in a sandbox. This complicates
the usage of a local socket to communicate with a non-sandboxed GUI
client. An NSConnection is easier to use in this case, which we can
use as long as the server name (i.e. Mach port registered name) is
prefixed with the code signing Team Identifier.

A placeholder server implementation is also added to the client's
SocketApi which basically reproduces the interface of a QLocalSocket.
Most of the references to individual sockets we're only using
QIODevice methods so the type was simply reduced. A typedef to
replace the QLocalServer was the only other part needed.
  • Loading branch information
jturcotte committed Jun 15, 2015
1 parent 758a820 commit bfcfdee
Show file tree
Hide file tree
Showing 13 changed files with 581 additions and 9,296 deletions.
4 changes: 2 additions & 2 deletions shell_integration/MacOSX/OwnCloudFinder/ContentManager.m
Original file line number Diff line number Diff line change
Expand Up @@ -149,11 +149,11 @@ - (NSNumber*)iconByPath:(NSString*)path isDirectory:(BOOL)isDir
// NSLog(@"XXXXXXX Asking for icon for path %@ = %d",normalizedPath, [result intValue]);

if( result == nil ) {
// start the async call
[[RequestManager sharedInstance] askForIcon:normalizedPath isDirectory:isDir];
result = [NSNumber numberWithInt:0];
// Set 0 into the cache, meaning "don't have an icon, but already requested it"
[_fileNamesCache setObject:result forKey:normalizedPath];
// start the async call
[[RequestManager sharedInstance] askForIcon:normalizedPath isDirectory:isDir];
}
if ([result intValue] == 0) {
// Show the old state while we wait for the new one
Expand Down
1,094 changes: 0 additions & 1,094 deletions shell_integration/MacOSX/OwnCloudFinder/GCDAsyncSocket.h

This file was deleted.

Loading

0 comments on commit bfcfdee

Please sign in to comment.