Commit 7984b8a6 authored by Erwan Croze's avatar Erwan Croze 👋🏻

Adding Ipv6 setting

parent 5f09f1b3
......@@ -992,6 +992,7 @@ namespace Linphone.Model {
private Dictionary<string, FirewallPolicy> FirewallPolicyToEnum;
private Dictionary<string, MediaEncryption> MediaEncryptionToEnum;
private Dictionary<string, string> StringToTunnelMode;
private Boolean IPV6Enabled;
public Dictionary<FirewallPolicy, string> EnumToFirewallPolicy;
public Dictionary<MediaEncryption, string> EnumToMediaEncryption;
......@@ -1066,7 +1067,7 @@ namespace Linphone.Model {
dict[StunServerKeyName] = LinphoneManager.Instance.Core.StunServer;
dict[FirewallPolicyKeyName] = EnumToFirewallPolicy[LinphoneManager.Instance.Core.FirewallPolicy];
dict[MediaEncryptionKeyName] = EnumToMediaEncryption[LinphoneManager.Instance.Core.MediaEncryption];
IPV6Enabled = LinphoneManager.Instance.Core.IsIpv6Enabled;
// Load tunnel configuration
// dict[TunnelModeKeyName] = AppResources.TunnelModeDisabled;
dict[TunnelServerKeyName] = "";
......@@ -1106,6 +1107,8 @@ namespace Linphone.Model {
LinphoneManager.Instance.Core.MediaEncryption = MediaEncryptionToEnum[mediaEncryption];
}
LinphoneManager.Instance.Core.IsIpv6Enabled = IPV6Enabled;
// Save tunnel configuration
/* if (LinphoneManager.Instance.Core.TunnelAvailable && Customs.IsTunnelEnabled)
{
......@@ -1214,6 +1217,15 @@ namespace Linphone.Model {
Set(TunnelModeKeyName, value);
}
}
public Boolean IPV6 {
get {
return IPV6Enabled;
}
set {
IPV6Enabled = value;
}
}
#endregion
}
......
......@@ -26,6 +26,13 @@
Header="FirewallPolicySetting">
</ComboBox>
<ToggleSwitch
Margin="0,10,0,0"
x:Name="IPV6"
x:Uid="IPV6Setting"
Header="IPV6">
</ToggleSwitch>
<TextBox
x:Name="Stun"
Margin="0,10,0,0"
......
......@@ -75,6 +75,7 @@ namespace Linphone.Views {
tunnelMode.SelectedItem = _networkSettings.TunnelMode;
tunnelPort.Text = _networkSettings.TunnelPort;
tunnelServer.Text = _networkSettings.TunnelServer;
IPV6.IsOn = LinphoneManager.Instance.Core.IsIpv6Enabled;
TunnelPanel.Visibility = LinphoneManager.Instance.Core.Tunnel != null ? Visibility.Visible : Visibility.Collapsed; //Hidden properties for now
......@@ -91,6 +92,7 @@ namespace Linphone.Views {
_networkSettings.MEncryption = mediaEncryption.SelectedItem.ToString();
_networkSettings.FWPolicy = firewallPolicy.SelectedItem.ToString();
_networkSettings.StunServer = Stun.Text;
_networkSettings.IPV6 = IPV6.IsOn;
if (TunnelPanel.Visibility == Visibility.Visible) {
_networkSettings.TunnelMode = tunnelMode.SelectedItem.ToString();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment