Commit 006ccb34 authored by Ghislain MARY's avatar Ghislain MARY

Fix compilation warnings.

parent 8894d814
#include "ApiLock.h"
// Do not treat doxygen documentation as XML
#pragma warning(push)
#pragma warning(disable : 4635)
#include "belle-sip/object.h"
#pragma warning(pop)
#include <mutex>
namespace Linphone
......
......@@ -80,7 +80,7 @@ void Linphone::Core::LinphoneCall::EnableEchoCancellation(Platform::Boolean enab
Platform::Boolean Linphone::Core::LinphoneCall::IsEchoCancellationEnabled()
{
gApiLock.Lock();
Platform::Boolean enabled = linphone_call_echo_cancellation_enabled(this->call);
Platform::Boolean enabled = (linphone_call_echo_cancellation_enabled(this->call) == TRUE);
gApiLock.Unlock();
return enabled;
}
......@@ -95,7 +95,7 @@ void Linphone::Core::LinphoneCall::EnableEchoLimiter(Platform::Boolean enable)
Platform::Boolean Linphone::Core::LinphoneCall::IsEchoLimiterEnabled()
{
gApiLock.Lock();
Platform::Boolean enabled = linphone_call_echo_limiter_enabled(this->call);
Platform::Boolean enabled = (linphone_call_echo_limiter_enabled(this->call) == TRUE);
gApiLock.Unlock();
return enabled;
}
......@@ -135,7 +135,7 @@ Platform::String^ Linphone::Core::LinphoneCall::GetAuthenticationToken()
Platform::Boolean Linphone::Core::LinphoneCall::IsAuthenticationTokenVerified()
{
gApiLock.Lock();
Platform::Boolean verified = linphone_call_get_authentication_token_verified(this->call);
Platform::Boolean verified = (linphone_call_get_authentication_token_verified(this->call) == TRUE);
gApiLock.Unlock();
return verified;
}
......@@ -150,7 +150,7 @@ void Linphone::Core::LinphoneCall::SetAuthenticationTokenVerified(Platform::Bool
Platform::Boolean Linphone::Core::LinphoneCall::IsInConference()
{
gApiLock.Lock();
Platform::Boolean inConference = linphone_call_is_in_conference(this->call);
Platform::Boolean inConference = (linphone_call_is_in_conference(this->call) == TRUE);
gApiLock.Unlock();
return inConference;
}
......
......@@ -43,7 +43,7 @@ void Linphone::Core::LinphoneCallParams::EnableLowBandwidth(Platform::Boolean en
Platform::Boolean Linphone::Core::LinphoneCallParams::IsLowBandwidthEnabled()
{
gApiLock.Lock();
Platform::Boolean enabled = linphone_call_params_low_bandwidth_enabled(this->params);
Platform::Boolean enabled = (linphone_call_params_low_bandwidth_enabled(this->params) == TRUE);
gApiLock.Unlock();
return enabled;
}
......
......@@ -2,7 +2,12 @@
#include "LinphoneCallStats.h"
#include "LinphoneCall.h"
#include "Server.h"
// Do not treat doxygen documentation as XML
#pragma warning(push)
#pragma warning(disable : 4635)
#include "coreapi\private.h"
#pragma warning(pop)
Linphone::Core::MediaType Linphone::Core::LinphoneCallStats::GetMediaType()
{
......
......@@ -283,7 +283,7 @@ Linphone::Core::LinphoneCall^ Linphone::Core::LinphoneCore::GetCurrentCall()
Platform::Boolean Linphone::Core::LinphoneCore::IsInCall()
{
gApiLock.Lock();
Platform::Boolean inCall = linphone_core_in_call(this->lc);
Platform::Boolean inCall = (linphone_core_in_call(this->lc) == TRUE);
gApiLock.Unlock();
return inCall;
}
......@@ -291,7 +291,7 @@ Platform::Boolean Linphone::Core::LinphoneCore::IsInCall()
Platform::Boolean Linphone::Core::LinphoneCore::IsIncomingInvitePending()
{
gApiLock.Lock();
Platform::Boolean invitePending = linphone_core_inc_invite_pending(this->lc);
Platform::Boolean invitePending = (linphone_core_inc_invite_pending(this->lc) == TRUE);
gApiLock.Unlock();
return invitePending;
}
......@@ -384,7 +384,7 @@ void Linphone::Core::LinphoneCore::SetNetworkReachable(Platform::Boolean isReach
Platform::Boolean Linphone::Core::LinphoneCore::IsNetworkReachable()
{
gApiLock.Lock();
Platform::Boolean networkReachable = linphone_core_is_network_reachable(this->lc);
Platform::Boolean networkReachable = (linphone_core_is_network_reachable(this->lc) == TRUE);
gApiLock.Unlock();
return networkReachable;
}
......@@ -436,7 +436,7 @@ void Linphone::Core::LinphoneCore::MuteMic(Platform::Boolean isMuted)
Platform::Boolean Linphone::Core::LinphoneCore::IsMicMuted()
{
gApiLock.Lock();
Platform::Boolean muted = linphone_core_is_mic_muted(this->lc);
Platform::Boolean muted = (linphone_core_is_mic_muted(this->lc) == TRUE);
gApiLock.Unlock();
return muted;
}
......@@ -444,14 +444,20 @@ Platform::Boolean Linphone::Core::LinphoneCore::IsMicMuted()
void Linphone::Core::LinphoneCore::SendDTMF(char16 number)
{
gApiLock.Lock();
linphone_core_send_dtmf(this->lc, number);
char conv[4];
if (wctomb(conv, number) == 1) {
linphone_core_send_dtmf(this->lc, conv[0]);
}
gApiLock.Unlock();
}
void Linphone::Core::LinphoneCore::PlayDTMF(char16 number, int duration)
{
gApiLock.Lock();
linphone_core_play_dtmf(this->lc, number, duration);
char conv[4];
if (wctomb(conv, number) == 1) {
linphone_core_play_dtmf(this->lc, conv[0], duration);
}
gApiLock.Unlock();
}
......@@ -488,7 +494,7 @@ bool Linphone::Core::LinphoneCore::PayloadTypeEnabled(PayloadType^ pt)
{
gApiLock.Lock();
::PayloadType *payload = pt->payload;
bool enabled = linphone_core_payload_type_enabled(this->lc, payload);
bool enabled = (linphone_core_payload_type_enabled(this->lc, payload) == TRUE);
gApiLock.Unlock();
return enabled;
}
......@@ -532,7 +538,7 @@ void Linphone::Core::LinphoneCore::EnableEchoCancellation(Platform::Boolean enab
Platform::Boolean Linphone::Core::LinphoneCore::IsEchoCancellationEnabled()
{
gApiLock.Lock();
Platform::Boolean enabled = linphone_core_echo_cancellation_enabled(this->lc);
Platform::Boolean enabled = (linphone_core_echo_cancellation_enabled(this->lc) == TRUE);
gApiLock.Unlock();
return enabled;
}
......@@ -540,7 +546,7 @@ Platform::Boolean Linphone::Core::LinphoneCore::IsEchoCancellationEnabled()
Platform::Boolean Linphone::Core::LinphoneCore::IsEchoLimiterEnabled()
{
gApiLock.Lock();
Platform::Boolean enabled = linphone_core_echo_limiter_enabled(this->lc);
Platform::Boolean enabled = (linphone_core_echo_limiter_enabled(this->lc) == TRUE);
gApiLock.Unlock();
return enabled;
}
......@@ -699,7 +705,7 @@ void Linphone::Core::LinphoneCore::EnableKeepAlive(Platform::Boolean enable)
Platform::Boolean Linphone::Core::LinphoneCore::IsKeepAliveEnabled()
{
gApiLock.Lock();
Platform::Boolean enabled = linphone_core_keep_alive_enabled(this->lc);
Platform::Boolean enabled = (linphone_core_keep_alive_enabled(this->lc) == TRUE);
gApiLock.Unlock();
return enabled;
}
......@@ -716,7 +722,7 @@ void Linphone::Core::LinphoneCore::SetPlayFile(Platform::String^ path)
Platform::Boolean Linphone::Core::LinphoneCore::PauseCall(LinphoneCall^ call)
{
gApiLock.Lock();
Platform::Boolean ok = linphone_core_pause_call(this->lc, call->call);
Platform::Boolean ok = (linphone_core_pause_call(this->lc, call->call) == 0);
gApiLock.Unlock();
return ok;
}
......@@ -724,7 +730,7 @@ Platform::Boolean Linphone::Core::LinphoneCore::PauseCall(LinphoneCall^ call)
Platform::Boolean Linphone::Core::LinphoneCore::ResumeCall(LinphoneCall^ call)
{
gApiLock.Lock();
Platform::Boolean ok = linphone_core_resume_call(this->lc, call->call);
Platform::Boolean ok = (linphone_core_resume_call(this->lc, call->call) == 0);
gApiLock.Unlock();
return ok;
}
......@@ -732,7 +738,7 @@ Platform::Boolean Linphone::Core::LinphoneCore::ResumeCall(LinphoneCall^ call)
Platform::Boolean Linphone::Core::LinphoneCore::PauseAllCalls()
{
gApiLock.Lock();
Platform::Boolean ok = linphone_core_pause_all_calls(this->lc);
Platform::Boolean ok = (linphone_core_pause_all_calls(this->lc) == 0);
gApiLock.Unlock();
return ok;
}
......@@ -740,7 +746,7 @@ Platform::Boolean Linphone::Core::LinphoneCore::PauseAllCalls()
Platform::Boolean Linphone::Core::LinphoneCore::IsInConference()
{
gApiLock.Lock();
Platform::Boolean inConference = linphone_core_is_in_conference(this->lc);
Platform::Boolean inConference = (linphone_core_is_in_conference(this->lc) == TRUE);
gApiLock.Unlock();
return inConference;
}
......@@ -748,7 +754,7 @@ Platform::Boolean Linphone::Core::LinphoneCore::IsInConference()
Platform::Boolean Linphone::Core::LinphoneCore::EnterConference()
{
gApiLock.Lock();
Platform::Boolean ok = linphone_core_enter_conference(this->lc);
Platform::Boolean ok = (linphone_core_enter_conference(this->lc) == 0);
gApiLock.Unlock();
return ok;
}
......@@ -878,7 +884,7 @@ Platform::Boolean Linphone::Core::LinphoneCore::IsMyself(Platform::String^ uri)
Platform::Boolean Linphone::Core::LinphoneCore::IsSoundResourcesLocked()
{
gApiLock.Lock();
Platform::Boolean locked = linphone_core_sound_resources_locked(this->lc);
Platform::Boolean locked = (linphone_core_sound_resources_locked(this->lc) == TRUE);
gApiLock.Unlock();
return locked;
}
......@@ -886,7 +892,7 @@ Platform::Boolean Linphone::Core::LinphoneCore::IsSoundResourcesLocked()
Platform::Boolean Linphone::Core::LinphoneCore::IsMediaEncryptionSupported(MediaEncryption menc)
{
gApiLock.Lock();
Platform::Boolean supported = linphone_core_media_encryption_supported(this->lc, (LinphoneMediaEncryption) menc);
Platform::Boolean supported = (linphone_core_media_encryption_supported(this->lc, (LinphoneMediaEncryption) menc) == TRUE);
gApiLock.Unlock();
return supported;
}
......@@ -916,7 +922,7 @@ void Linphone::Core::LinphoneCore::SetMediaEncryptionMandatory(Platform::Boolean
Platform::Boolean Linphone::Core::LinphoneCore::IsMediaEncryptionMandatory()
{
gApiLock.Lock();
Platform::Boolean mandatory = linphone_core_is_media_encryption_mandatory(this->lc);
Platform::Boolean mandatory = (linphone_core_is_media_encryption_mandatory(this->lc) == TRUE);
gApiLock.Unlock();
return mandatory;
}
......@@ -924,7 +930,7 @@ Platform::Boolean Linphone::Core::LinphoneCore::IsMediaEncryptionMandatory()
Platform::Boolean Linphone::Core::LinphoneCore::IsTunnelAvailable()
{
gApiLock.Lock();
Platform::Boolean available = linphone_core_tunnel_available();
Platform::Boolean available = (linphone_core_tunnel_available() == TRUE);
gApiLock.Unlock();
return available;
}
......@@ -1037,7 +1043,7 @@ void Linphone::Core::LinphoneCore::SetPrimaryContact(Platform::String^ displayNa
Platform::Boolean Linphone::Core::LinphoneCore::GetUseSipInfoForDTMFs()
{
gApiLock.Lock();
Platform::Boolean use = linphone_core_get_use_info_for_dtmf(this->lc);
Platform::Boolean use = (linphone_core_get_use_info_for_dtmf(this->lc) == TRUE);
gApiLock.Unlock();
return use;
}
......@@ -1045,7 +1051,7 @@ Platform::Boolean Linphone::Core::LinphoneCore::GetUseSipInfoForDTMFs()
Platform::Boolean Linphone::Core::LinphoneCore::GetUseRFC2833ForDTMFs()
{
gApiLock.Lock();
Platform::Boolean use = linphone_core_get_use_rfc2833_for_dtmf(this->lc);
Platform::Boolean use = (linphone_core_get_use_rfc2833_for_dtmf(this->lc) == TRUE);
gApiLock.Unlock();
return use;
}
......
......@@ -3,10 +3,15 @@
#include "Enums.h"
#include "LinphoneCoreListener.h"
#include "Utils.h"
// Do not treat doxygen documentation as XML
#pragma warning(push)
#pragma warning(disable : 4635)
#include "coreapi\linphonecore.h"
#include "coreapi\linphonecore_utils.h"
#include "coreapi\linphone_tunnel.h"
#include "coreapi\lpconfig.h"
#pragma warning(pop)
namespace Linphone
{
......
......@@ -66,7 +66,7 @@ void Linphone::Core::LinphoneProxyConfig::EnableRegister(Platform::Boolean enabl
Platform::Boolean Linphone::Core::LinphoneProxyConfig::IsRegisterEnabled()
{
gApiLock.Lock();
Platform::Boolean enabled = linphone_proxy_config_register_enabled(this->proxy_config);
Platform::Boolean enabled = (linphone_proxy_config_register_enabled(this->proxy_config) == TRUE);
gApiLock.Unlock();
return enabled;
}
......@@ -120,7 +120,7 @@ Platform::String^ Linphone::Core::LinphoneProxyConfig::GetDomain()
Platform::Boolean Linphone::Core::LinphoneProxyConfig::IsRegistered()
{
gApiLock.Lock();
Platform::Boolean registered = linphone_proxy_config_is_registered(this->proxy_config);
Platform::Boolean registered = (linphone_proxy_config_is_registered(this->proxy_config) == TRUE);
gApiLock.Unlock();
return registered;
}
......@@ -152,7 +152,7 @@ void Linphone::Core::LinphoneProxyConfig::EnablePublish(Platform::Boolean enable
Platform::Boolean Linphone::Core::LinphoneProxyConfig::IsPublishEnabled()
{
gApiLock.Lock();
Platform::Boolean enabled = linphone_proxy_config_publish_enabled(this->proxy_config);
Platform::Boolean enabled = (linphone_proxy_config_publish_enabled(this->proxy_config) == TRUE);
gApiLock.Unlock();
return enabled;
}
......
......@@ -4,7 +4,7 @@
bool Linphone::Core::LpConfig::GetBool(Platform::String^ section, Platform::String^ key, bool defaultValue)
{
return GetInt(section, key, defaultValue);
return (GetInt(section, key, defaultValue) == TRUE);
}
void Linphone::Core::LpConfig::SetBool(Platform::String^ section, Platform::String^ key, bool value)
......@@ -35,7 +35,7 @@ void Linphone::Core::LpConfig::SetInt(Platform::String^ section, Platform::Strin
gApiLock.Unlock();
}
int Linphone::Core::LpConfig::GetInt64(Platform::String^ section, Platform::String^ key, int64 defaultValue)
int64 Linphone::Core::LpConfig::GetInt64(Platform::String^ section, Platform::String^ key, int64 defaultValue)
{
gApiLock.Lock();
const char *ccSection = Linphone::Core::Utils::pstoccs(section);
......
......@@ -48,7 +48,7 @@ namespace Linphone
/// <summary>
/// Gets a 64 bit integer configuration item.
/// </summary>
int GetInt64(Platform::String^ section, Platform::String^ key, int64 defaultValue);
int64 GetInt64(Platform::String^ section, Platform::String^ key, int64 defaultValue);
/// <summary>
/// Sets a 64 bit integer configuration item.
......
......@@ -78,7 +78,7 @@ Linphone::Core::Tunnel::~Tunnel()
Platform::Boolean Linphone::Core::Tunnel::IsEnabled()
{
gApiLock.Lock();
Platform::Boolean enabled = linphone_tunnel_enabled(this->lt);
Platform::Boolean enabled = (linphone_tunnel_enabled(this->lt) == TRUE);
gApiLock.Unlock();
return enabled;
}
......
......@@ -2,7 +2,12 @@
#include "Enums.h"
#include "Utils.h"
// Do not treat doxygen documentation as XML
#pragma warning(push)
#pragma warning(disable : 4635)
#include "coreapi\linphone_tunnel.h"
#pragma warning(pop)
namespace Linphone
{
......
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