forked from mirrors/linphone-iphone
Merge branch 'new_ui' of git.linphone.org:linphone-iphone into new_ui
This commit is contained in:
commit
cbb787df8f
4 changed files with 33 additions and 2 deletions
|
|
@ -155,6 +155,9 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
}
|
||||
{
|
||||
[self setString: linphone_core_get_stun_server(lc) forKey:@"stun_preference"];
|
||||
[self
|
||||
setInteger:lp_config_get_int(linphone_core_get_config(lc),"app","ice_preference"
|
||||
, 0) forKey:@"ice_preference"];
|
||||
}
|
||||
|
||||
{
|
||||
|
|
@ -429,7 +432,12 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|
|||
NSString* stun_server = [self stringForKey:@"stun_preference"];
|
||||
if ([stun_server length] > 0){
|
||||
linphone_core_set_stun_server(lc,[stun_server cStringUsingEncoding:[NSString defaultCStringEncoding]]);
|
||||
linphone_core_set_firewall_policy(lc, LinphonePolicyUseStun);
|
||||
BOOL ice_preference = [self boolForKey:@"ice_preference"];
|
||||
if(ice_preference) {
|
||||
linphone_core_set_firewall_policy(lc, LinphonePolicyUseIce);
|
||||
} else {
|
||||
linphone_core_set_firewall_policy(lc, LinphonePolicyUseStun);
|
||||
}
|
||||
} else {
|
||||
linphone_core_set_stun_server(lc, NULL);
|
||||
linphone_core_set_firewall_policy(lc, LinphonePolicyNoFirewall);
|
||||
|
|
|
|||
|
|
@ -442,6 +442,15 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[hiddenKeys removeObject:@"start_at_boot_preference"];
|
||||
}
|
||||
[settingsController setHiddenKeys:hiddenKeys animated:TRUE];
|
||||
} else if ([@"stun_preference" compare: notif.object] == NSOrderedSame) {
|
||||
NSMutableSet *hiddenKeys = [NSMutableSet setWithSet:[settingsController hiddenKeys]];
|
||||
NSString *stun_server = [notif.userInfo objectForKey:@"stun_preference"];
|
||||
if (stun_server && ([stun_server length] > 0)) {
|
||||
[hiddenKeys removeObject:@"ice_preference"];
|
||||
} else {
|
||||
[hiddenKeys addObject:@"ice_preference"];
|
||||
}
|
||||
[settingsController setHiddenKeys:hiddenKeys animated:TRUE];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -490,6 +499,10 @@ static UICompositeViewDescription *compositeDescription = nil;
|
|||
[hiddenKeys addObject:@"port_preference"];
|
||||
}
|
||||
|
||||
if([[[[[LinphoneManager instance] settingsStore] objectForKey:@"stun_preference"] stringValue] length] == 0) {
|
||||
[hiddenKeys addObject:@"ice_preference"];
|
||||
}
|
||||
|
||||
return hiddenKeys;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -28,6 +28,16 @@
|
|||
<key>DefaultValue</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Title</key>
|
||||
<string>ICE</string>
|
||||
<key>Key</key>
|
||||
<string>ice_preference</string>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
<key>DefaultValue</key>
|
||||
<false/>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Type</key>
|
||||
<string>PSToggleSwitchSpecifier</string>
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit c97efee37aea1ccae3c476a108e988e47f38faa4
|
||||
Subproject commit 05601300f64c0f095ba0faeb9e2dd1c1e9483238
|
||||
Loading…
Add table
Reference in a new issue