mirror of
https://github.com/transmission/transmission
synced 2025-03-10 22:22:58 +00:00
#588: OSX interface missing support for IPC messages 'get-pex' and 'pex'
This commit is contained in:
parent
72fe8a3df5
commit
a2f82384ab
1 changed files with 8 additions and 6 deletions
|
@ -110,6 +110,7 @@ msg_default ( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg );
|
||||||
|
|
||||||
- (void) newclient: (NSNotification *) notification;
|
- (void) newclient: (NSNotification *) notification;
|
||||||
- (void) killclient: (IPCClient *) client;
|
- (void) killclient: (IPCClient *) client;
|
||||||
|
|
||||||
NSUserDefaults * fDefaults;
|
NSUserDefaults * fDefaults;
|
||||||
PrefsController * fPrefsController;
|
PrefsController * fPrefsController;
|
||||||
|
|
||||||
|
@ -792,8 +793,7 @@ void msg_getbool( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg
|
||||||
[client sendrespInt:IPC_MSG_AUTOSTART tag:tag val:[fDefaults boolForKey:@"AutoStartDownload"]];
|
[client sendrespInt:IPC_MSG_AUTOSTART tag:tag val:[fDefaults boolForKey:@"AutoStartDownload"]];
|
||||||
break;
|
break;
|
||||||
case IPC_MSG_GETPEX:
|
case IPC_MSG_GETPEX:
|
||||||
//warning we dont support this :(
|
[client sendrespInt:IPC_MSG_PEX tag:tag val:[fDefaults boolForKey:@"PEXGlobal"]];
|
||||||
[client sendrespEmpty: IPC_MSG_FAIL tag: tag];
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
assert( 0 );
|
assert( 0 );
|
||||||
|
@ -883,6 +883,7 @@ void msg_setbool( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg
|
||||||
{
|
{
|
||||||
case IPC_MSG_AUTOMAP:
|
case IPC_MSG_AUTOMAP:
|
||||||
[fDefaults setBool:(bool)val->val.i forKey:@"NatTraversal"];
|
[fDefaults setBool:(bool)val->val.i forKey:@"NatTraversal"];
|
||||||
|
[fPrefsController setNat:nil];
|
||||||
[client sendrespEmpty:IPC_MSG_OK tag:tag];
|
[client sendrespEmpty:IPC_MSG_OK tag:tag];
|
||||||
break;
|
break;
|
||||||
case IPC_MSG_AUTOSTART:
|
case IPC_MSG_AUTOSTART:
|
||||||
|
@ -890,8 +891,9 @@ void msg_setbool( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg
|
||||||
[client sendrespEmpty:IPC_MSG_OK tag:tag];
|
[client sendrespEmpty:IPC_MSG_OK tag:tag];
|
||||||
break;
|
break;
|
||||||
case IPC_MSG_PEX:
|
case IPC_MSG_PEX:
|
||||||
//warning we dont support this :(
|
[fDefaults setBool:(bool)val->val.i forKey:@"PEXGlobal"];
|
||||||
[client sendrespEmpty: IPC_MSG_FAIL tag: tag];
|
[fPrefsController setPEX:nil];
|
||||||
|
[client sendrespEmpty: IPC_MSG_OK tag: tag];
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
assert( 0 );
|
assert( 0 );
|
||||||
|
@ -963,7 +965,7 @@ void msg_setstr( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg )
|
||||||
{
|
{
|
||||||
case IPC_MSG_DIR:
|
case IPC_MSG_DIR:
|
||||||
[fDefaults setObject:[NSString stringWithCString: val->val.s.s] forKey:@"DownloadFolder"];
|
[fDefaults setObject:[NSString stringWithCString: val->val.s.s] forKey:@"DownloadFolder"];
|
||||||
[fDefaults setObject: @"Constant" forKey: @"DownloadChoice"]; //not sure about this line
|
[fDefaults setObject: @"Constant" forKey: @"DownloadChoice"];
|
||||||
[client sendrespEmpty: IPC_MSG_OK tag: tag];
|
[client sendrespEmpty: IPC_MSG_OK tag: tag];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
@ -985,7 +987,7 @@ void msg_setstr( enum ipc_msg msgid, benc_val_t * val, int64_t tag, void * arg )
|
||||||
[fDefaults setBool:NO forKey: @"EncryptionPrefer"];
|
[fDefaults setBool:NO forKey: @"EncryptionPrefer"];
|
||||||
[fDefaults setBool:NO forKey: @"EncryptionRequire"];
|
[fDefaults setBool:NO forKey: @"EncryptionRequire"];
|
||||||
}
|
}
|
||||||
|
[fPrefsController setEncryptionMode:nil];
|
||||||
[client sendrespEmpty: IPC_MSG_OK tag: tag];
|
[client sendrespEmpty: IPC_MSG_OK tag: tag];
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue