LinkBack* ret = [keyedLinkBacks objectForKey: aKey] ;
if(nil==ret) {
- BOOL ok ;
- NSString* serverName = nil ;
- NSString* serverId = nil ;
- NSString* appName = nil ;
- NSURL* url = nil ;
+ BOOL ok = [data isKindOfClass: [NSDictionary class]] ;
- // collect server contact information from data.
- ok = [data isKindOfClass: [NSDictionary class]] ;
if (ok) {
- serverName = [data objectForKey: LinkBackServerNameKey] ;
- serverId = [data objectForKey: LinkBackServerBundleIdentifierKey];
- appName = [data linkBackSourceApplicationName] ;
- url = [data linkBackApplicationURL] ;
- }
-
- if (!ok || !serverName || !serverId)
- [NSException raise: NSInvalidArgumentException format: @"LinkBackData is not of the correct format: %@", data] ;
+ // collect server contact information from data.
+ NSString* serverName = [data objectForKey: LinkBackServerNameKey] ;
+ NSString* serverId = [data objectForKey: LinkBackServerBundleIdentifierKey];
+ NSString* appName = [data linkBackSourceApplicationName] ;
+ NSURL* url = [data linkBackApplicationURL] ;
- // create the live link object and try to connect to the server.
- ret = [[LinkBack alloc] initClientWithSourceName: aName delegate: del itemKey: aKey] ;
+ if ( !serverName || !serverId)
+ [NSException raise: NSInvalidArgumentException format: @"LinkBackData is not of the correct format: %@", data] ;
+
+ // create the live link object and try to connect to the server.
+ ret = [[LinkBack alloc] initClientWithSourceName: aName delegate: del itemKey: aKey] ;
- if (![ret connectToServerWithName: serverName inApplication: serverId fallbackURL: url appName: appName]) {
- [ret release] ;
- ret = nil ;
+ if (![ret connectToServerWithName: serverName inApplication: serverId fallbackURL: url appName: appName]) {
+ [ret release] ;
+ ret = nil ;
+ }
+ } else {
+ [NSException raise: NSInvalidArgumentException format: @"LinkBackData is not of the correct format: %@", data] ;
}
}
[ret requestEdit] ;
// if connection to server failed, return nil.
- } else {
- [ret release] ;
- ret = nil ;
}
return ret ;
/**
- * \file LinkBackProxy.mm
+ * \file LinkBackProxy.m
* This file is part of LyX, the document processor.
* Licence details can be found in the file COPYING.
*
}
}
-
+
void getLinkBackData(void const * * buf, unsigned * len)
{
checkAutoReleasePool() ;
}
}
+
int editLinkBackFile(char const * docName)
{
// setup Obj-C and our client