Add "enable ipv6" setting in Network

Conflicts:
	Classes/LinphoneCoreSettingsStore.m
This commit is contained in:
Guillaume BIENKOWSKI 2014-01-29 17:11:18 +01:00
parent 3447642258
commit b5fbabd64b
4 changed files with 28 additions and 1 deletions

View file

@ -219,6 +219,8 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
[self setBool: lp_config_get_int(linphone_core_get_config(lc), LINPHONERC_APPLICATION_KEY, "animations_preference", 1) forKey:@"animations_preference"];
[self setBool: lp_config_get_int(linphone_core_get_config(lc), LINPHONERC_APPLICATION_KEY, "wifi_only_preference", 0) forKey:@"wifi_only_preference"];
[self setString: lp_config_get_string(linphone_core_get_config(lc), LINPHONERC_APPLICATION_KEY, "sharing_server_preference", NULL) forKey:@"sharing_server_preference"];
[self setBool:lp_config_get_int(linphone_core_get_config(lc), "sip", "use_ipv6", 0) forKey:@"use_ipv6"];
/*keep this one also in the standardUserDefaults so that it can be read before starting liblinphone*/
BOOL start_at_boot = TRUE;
@ -347,7 +349,15 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
[LinphoneLogger logc:LinphoneLoggerError format:"cannot set transport"];
}
}
BOOL enable_ipv6 = [self boolForKey:@"use_ipv6"];
lp_config_set_int(linphone_core_get_config(lc), "sip", "use_ipv6", enable_ipv6);
if( linphone_core_ipv6_enabled(lc) != enable_ipv6){
[LinphoneLogger logc:LinphoneLoggerDebug format:"%@ IPV6", enable_ipv6?@"ENABLING":@"DISABLING"];
linphone_core_enable_ipv6(lc, enable_ipv6);
}
//configure sip account
//mandatory parameters
@ -496,6 +506,7 @@ extern void linphone_iphone_log_handler(int lev, const char *fmt, va_list args);
|| [self valueChangedForKey:@"random_port_preference"]
|| [self valueChangedForKey:@"prefix_preference"]
|| [self valueChangedForKey:@"substitute_+_by_00_preference"]
|| [self valueChangedForKey:@"use_ipv6"]
|| [self valueChangedForKey:@"pushnotification_preference"];
if (account_changed)

View file

@ -124,6 +124,16 @@
<string>tls</string>
</array>
</dict>
<dict>
<key>Title</key>
<string>Use IPv6</string>
<key>Key</key>
<string>use_ipv6</string>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>DefaultValue</key>
<false/>
</dict>
<dict>
<key>DefaultValue</key>
<string>None</string>

View file

@ -60,3 +60,6 @@
/* Download bandwidth */
"Download bandwidth" = "Download bandwidth";
/* IPv6 */
"Use IPv6" = "Use IPv6";

View file

@ -60,3 +60,6 @@
/* Download bandwidth */
"Download bandwidth" = "Débit descendant";
/* IPv6 */
"Use IPv6" = "Utiliser IPv6";