Commit a4480b1f authored by Sylvain Berfini's avatar Sylvain Berfini

Merge branch 'master' of git.linphone.org:linphone-wp

parents e0a1deb5 7a6f8c32
......@@ -18,7 +18,7 @@ Platform::String^ Linphone::Core::LinphoneAddress::GetDomain()
int Linphone::Core::LinphoneAddress::GetPort()
{
return linphone_address_get_port_int(this->address);
return linphone_address_get_port(this->address);
}
void Linphone::Core::LinphoneAddress::SetDisplayName(Platform::String^ name)
......@@ -44,7 +44,7 @@ void Linphone::Core::LinphoneAddress::SetDomain(Platform::String^ domain)
void Linphone::Core::LinphoneAddress::SetPort(int port)
{
linphone_address_set_port_int(this->address, port);
linphone_address_set_port(this->address, port);
}
void Linphone::Core::LinphoneAddress::Clean()
......
......@@ -39,7 +39,7 @@ namespace Linphone.Model
Debug.WriteLine("[LinphoneManager] Network state changed:" + (lastNetworkState ? "Available" : "Unavailable"));
if (lastNetworkState)
{
NetworkSettingsManager.ConfigureTunnel();
ConfigureTunnel();
}
LinphoneCore.SetNetworkReachable(lastNetworkState);
}
......@@ -278,6 +278,7 @@ namespace Linphone.Model
lastNetworkState = DeviceNetworkInformation.IsNetworkAvailable;
server.LinphoneCore.SetNetworkReachable(lastNetworkState);
DeviceNetworkInformation.NetworkAvailabilityChanged += new EventHandler<NetworkNotificationEventArgs>(OnNetworkStatusChanged);
ConfigureTunnel();
isLinphoneRunning = true;
}
......@@ -331,6 +332,59 @@ namespace Linphone.Model
server.LinphoneCoreFactory.SetLogLevel(appSettings.LogLevel);
Logger.Instance.TraceListener = server.BackgroundModeLogger;
}
/// <summary>
/// Configures the Tunnel using the given mode
/// </summary>
/// <param name="mode">mode to apply</param>
public static void ConfigureTunnel(String mode)
{
if (LinphoneManager.Instance.LinphoneCore.IsTunnelAvailable())
{
Tunnel tunnel = LinphoneManager.Instance.LinphoneCore.GetTunnel();
if (tunnel != null)
{
if (mode == AppResources.TunnelModeDisabled)
{
tunnel.Enable(false);
}
else if (mode == AppResources.TunnelModeAlways)
{
tunnel.Enable(true);
}
else if (mode == AppResources.TunnelModeAuto)
{
tunnel.Enable(false);
tunnel.AutoDetect();
}
else if (mode == AppResources.TunnelMode3GOnly)
{
if (DeviceNetworkInformation.IsWiFiEnabled)
{
tunnel.Enable(false);
}
else if (DeviceNetworkInformation.IsCellularDataEnabled)
{
tunnel.Enable(true);
}
else
{
tunnel.Enable(false);
}
}
}
}
}
/// <summary>
/// Configures the Tunnel using the current setting value
/// </summary>
public void ConfigureTunnel()
{
NetworkSettingsManager settings = new NetworkSettingsManager();
settings.Load();
ConfigureTunnel(settings.TunnelMode);
}
#endregion
#region CallLogs
......
......@@ -996,56 +996,6 @@ namespace Linphone.Model
private const string TunnelModeKeyName = "TunnelMode";
#endregion
/// <summary>
/// Configures the Tunnel using the given mode
/// </summary>
/// <param name="mode">mode to apply</param>
public static void ConfigureTunnel(String mode)
{
if (LinphoneManager.Instance.LinphoneCore.IsTunnelAvailable()) {
Tunnel tunnel = LinphoneManager.Instance.LinphoneCore.GetTunnel();
if (tunnel != null)
{
if (mode == AppResources.TunnelModeDisabled)
{
tunnel.Enable(false);
}
else if (mode == AppResources.TunnelModeAlways)
{
tunnel.Enable(true);
}
else if (mode == AppResources.TunnelModeAuto)
{
tunnel.AutoDetect();
}
else if (mode == AppResources.TunnelMode3GOnly)
{
if (DeviceNetworkInformation.IsWiFiEnabled)
{
tunnel.Enable(false);
}
else if (DeviceNetworkInformation.IsCellularDataEnabled)
{
tunnel.Enable(true);
}
else
{
tunnel.Enable(false);
}
}
}
}
}
/// <summary>
/// Configures the Tunnel using the current setting value
/// </summary>
public static void ConfigureTunnel()
{
NetworkSettingsManager settings = new NetworkSettingsManager();
ConfigureTunnel(settings.TunnelMode);
}
/// <summary>
/// Public constructor.
/// </summary>
......@@ -1185,7 +1135,7 @@ namespace Linphone.Model
{
String mode = GetNew(TunnelModeKeyName);
Config.SetString(ApplicationSection, TunnelModeKeyName, TunnelModeToString[mode]);
ConfigureTunnel(mode);
LinphoneManager.Instance.ConfigureTunnel();
}
}
}
......
......@@ -28,6 +28,7 @@ In order to compile Linphone, you need:
* The Windows Phone 8 SDK
* wget, gawk, unzip, grep and sed from the GnuWin32 project and put them in your PATH (http://gnuwin32.sourceforge.net/) for belle-sip and some mediastreamer2 codecs
* The Java Runtime Environment (JRE). The 'java' command must be in the PATH.
* The sources of the project. /!\ You can't have a folder that contains a space character in the path of the sources. /!\
To import the solution, open the Linphone.sln file at the root of the project.
......
linphone @ 5e6693d3
Subproject commit 461baa0e2820334905b4b0c03fa7bb3ab6fac8dc
Subproject commit 5e6693d30ada71da175715ff147aab33452a1f24
mediastreamer2 @ e12faace
Subproject commit 0ce91ef37e349bcd27f9bbea604c24763fc3c56b
Subproject commit e12faacedc0d7ac45c050ee4899c578ec7895889
oRTP @ 890e2306
Subproject commit f3233fdc80dd6d193bbfcb64b0775f45ac6ee99a
Subproject commit 890e2306fca77146648f061ae754bec18304d4b7
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