Commit cd9a0124 authored by Ghislain MARY's avatar Ghislain MARY

Use properties for LinphoneAuthInfo and LinphoneCall objects.

parent 4ee9a302
......@@ -2,13 +2,13 @@
#include "Server.h"
#include "Utils.h"
Platform::String^ Linphone::Core::LinphoneAuthInfo::GetUsername()
Platform::String^ Linphone::Core::LinphoneAuthInfo::Username::get()
{
API_LOCK;
return Utils::cctops(linphone_auth_info_get_username(this->auth_info));
}
void Linphone::Core::LinphoneAuthInfo::SetUsername(Platform::String^ username)
void Linphone::Core::LinphoneAuthInfo::Username::set(Platform::String^ username)
{
API_LOCK;
const char *cc = Linphone::Core::Utils::pstoccs(username);
......@@ -16,13 +16,13 @@ void Linphone::Core::LinphoneAuthInfo::SetUsername(Platform::String^ username)
delete(cc);
}
Platform::String^ Linphone::Core::LinphoneAuthInfo::GetUserId()
Platform::String^ Linphone::Core::LinphoneAuthInfo::UserId::get()
{
API_LOCK;
return Utils::cctops(linphone_auth_info_get_userid(this->auth_info));
}
void Linphone::Core::LinphoneAuthInfo::SetUserId(Platform::String^ userid)
void Linphone::Core::LinphoneAuthInfo::UserId::set(Platform::String^ userid)
{
API_LOCK;
const char *cc = Linphone::Core::Utils::pstoccs(userid);
......@@ -30,13 +30,13 @@ void Linphone::Core::LinphoneAuthInfo::SetUserId(Platform::String^ userid)
delete(cc);
}
Platform::String^ Linphone::Core::LinphoneAuthInfo::GetPassword()
Platform::String^ Linphone::Core::LinphoneAuthInfo::Password::get()
{
API_LOCK;
return Utils::cctops(linphone_auth_info_get_passwd(this->auth_info));
}
void Linphone::Core::LinphoneAuthInfo::SetPassword(Platform::String^ password)
void Linphone::Core::LinphoneAuthInfo::Password::set(Platform::String^ password)
{
API_LOCK;
const char *cc = Linphone::Core::Utils::pstoccs(password);
......@@ -44,13 +44,13 @@ void Linphone::Core::LinphoneAuthInfo::SetPassword(Platform::String^ password)
delete(cc);
}
Platform::String^ Linphone::Core::LinphoneAuthInfo::GetRealm()
Platform::String^ Linphone::Core::LinphoneAuthInfo::Realm::get()
{
API_LOCK;
return Utils::cctops(linphone_auth_info_get_realm(this->auth_info));
}
void Linphone::Core::LinphoneAuthInfo::SetRealm(Platform::String^ realm)
void Linphone::Core::LinphoneAuthInfo::Realm::set(Platform::String^ realm)
{
API_LOCK;
const char *cc = Linphone::Core::Utils::pstoccs(realm);
......@@ -58,13 +58,13 @@ void Linphone::Core::LinphoneAuthInfo::SetRealm(Platform::String^ realm)
delete(cc);
}
Platform::String^ Linphone::Core::LinphoneAuthInfo::GetHa1()
Platform::String^ Linphone::Core::LinphoneAuthInfo::Ha1::get()
{
API_LOCK;
return Utils::cctops(linphone_auth_info_get_ha1(this->auth_info));
}
void Linphone::Core::LinphoneAuthInfo::SetHa1(Platform::String^ ha1)
void Linphone::Core::LinphoneAuthInfo::Ha1::set(Platform::String^ ha1)
{
API_LOCK;
const char *cc = Linphone::Core::Utils::pstoccs(ha1);
......
......@@ -21,64 +21,49 @@ namespace Linphone
{
public:
/// <summary>
/// Gets the authentication username.
/// The authentication username.
/// </summary>
/// <returns>The authentication username</returns>
Platform::String^ GetUsername();
property Platform::String^ Username
{
Platform::String^ get();
void set(Platform::String^ value);
}
/// <summary>
/// Sets the authentication username.
/// The authentication userid.
/// </summary>
/// <param name="username">The authentication username</param>
void SetUsername(Platform::String^ username);
property Platform::String^ UserId
{
Platform::String^ get();
void set(Platform::String^ value);
}
/// <summary>
/// Gets the authentication userid.
/// The authentication password.
/// </summary>
/// <returns>The authentication userid</returns>
Platform::String^ GetUserId();
property Platform::String^ Password
{
Platform::String^ get();
void set(Platform::String^ value);
}
/// <summary>
/// Sets the authentication userid.
/// The authentication realm.
/// </summary>
/// <param name="userid">The authentication userid</param>
void SetUserId(Platform::String^ userid);
property Platform::String^ Realm
{
Platform::String^ get();
void set(Platform::String^ value);
}
/// <summary>
/// Gets the authentication password.
/// The authentication ha1.
/// </summary>
/// <returns>The authentication password</returns>
Platform::String^ GetPassword();
/// <summary>
/// Sets the authentication password.
/// </summary>
/// <param name="password">The authentication password</param>
void SetPassword(Platform::String^ password);
/// <summary>
/// Gets the authentication realm.
/// </summary>
/// <returns>The authentication realm</returns>
Platform::String^ GetRealm();
/// <summary>
/// Sets the authentication realm.
/// </summary>
/// <param name="realm">The authentication realm</param>
void SetRealm(Platform::String^ realm);
/// <summary>
/// Gets the authentication ha1.
/// </summary>
/// <returns>The authentication ha1</returns>
Platform::String^ GetHa1();
/// <summary>
/// Sets the authentication ha1.
/// </summary>
/// <param name="ha1">The authentication ha1</param>
void SetHa1(Platform::String^ ha1);
property Platform::String^ Ha1
{
Platform::String^ get();
void set(Platform::String^ value);
}
private:
friend class Linphone::Core::Utils;
......
......@@ -10,38 +10,38 @@
using namespace Windows::Phone::Networking::Voip;
Linphone::Core::LinphoneCallState Linphone::Core::LinphoneCall::GetState()
Linphone::Core::LinphoneCallState Linphone::Core::LinphoneCall::State::get()
{
API_LOCK;
return (Linphone::Core::LinphoneCallState)linphone_call_get_state(this->call);
}
Linphone::Core::LinphoneAddress^ Linphone::Core::LinphoneCall::GetRemoteAddress()
Linphone::Core::LinphoneAddress^ Linphone::Core::LinphoneCall::RemoteAddress::get()
{
API_LOCK;
const ::LinphoneAddress *addr = linphone_call_get_remote_address(this->call);
return (Linphone::Core::LinphoneAddress^)Linphone::Core::Utils::CreateLinphoneAddress((void*)addr);
}
Linphone::Core::CallDirection Linphone::Core::LinphoneCall::GetDirection()
Linphone::Core::CallDirection Linphone::Core::LinphoneCall::Direction::get()
{
API_LOCK;
return (Linphone::Core::CallDirection)linphone_call_get_dir(this->call);
}
Linphone::Core::LinphoneCallLog^ Linphone::Core::LinphoneCall::GetCallLog()
Linphone::Core::LinphoneCallLog^ Linphone::Core::LinphoneCall::CallLog::get()
{
API_LOCK;
return (Linphone::Core::LinphoneCallLog^) Linphone::Core::Utils::CreateLinphoneCallLog(linphone_call_get_call_log(this->call));
}
Linphone::Core::LinphoneCallStats^ Linphone::Core::LinphoneCall::GetAudioStats()
Linphone::Core::LinphoneCallStats^ Linphone::Core::LinphoneCall::AudioStats::get()
{
API_LOCK;
return (Linphone::Core::LinphoneCallStats^) Linphone::Core::Utils::CreateLinphoneCallStats(this->call, (int)Linphone::Core::MediaType::Audio);
}
Linphone::Core::LinphoneCallParams^ Linphone::Core::LinphoneCall::GetRemoteParams()
Linphone::Core::LinphoneCallParams^ Linphone::Core::LinphoneCall::RemoteParams::get()
{
API_LOCK;
Linphone::Core::LinphoneCallParams^ params = nullptr;
......@@ -57,85 +57,85 @@ Linphone::Core::LinphoneCallParams^ Linphone::Core::LinphoneCall::GetCurrentPara
return (Linphone::Core::LinphoneCallParams^) Linphone::Core::Utils::CreateLinphoneCallParams(linphone_call_params_copy(linphone_call_get_current_params(this->call)));
}
void Linphone::Core::LinphoneCall::EnableEchoCancellation(Platform::Boolean enable)
void Linphone::Core::LinphoneCall::EchoCancellationEnabled::set(Platform::Boolean enable)
{
API_LOCK;
linphone_call_enable_echo_cancellation(this->call, enable);
}
Platform::Boolean Linphone::Core::LinphoneCall::IsEchoCancellationEnabled()
Platform::Boolean Linphone::Core::LinphoneCall::EchoCancellationEnabled::get()
{
API_LOCK;
return (linphone_call_echo_cancellation_enabled(this->call) == TRUE);
}
void Linphone::Core::LinphoneCall::EnableEchoLimiter(Platform::Boolean enable)
void Linphone::Core::LinphoneCall::EchoLimiterEnabled::set(Platform::Boolean enable)
{
API_LOCK;
linphone_call_enable_echo_limiter(this->call, enable);
}
Platform::Boolean Linphone::Core::LinphoneCall::IsEchoLimiterEnabled()
Platform::Boolean Linphone::Core::LinphoneCall::EchoLimiterEnabled::get()
{
API_LOCK;
return (linphone_call_echo_limiter_enabled(this->call) == TRUE);
}
int Linphone::Core::LinphoneCall::GetDuration()
int Linphone::Core::LinphoneCall::Duration::get()
{
API_LOCK;
return linphone_call_get_duration(this->call);
}
float Linphone::Core::LinphoneCall::GetCurrentQuality()
float Linphone::Core::LinphoneCall::CurrentQuality::get()
{
API_LOCK;
return linphone_call_get_current_quality(this->call);
}
float Linphone::Core::LinphoneCall::GetAverageQuality()
float Linphone::Core::LinphoneCall::AverageQuality::get()
{
API_LOCK;
return linphone_call_get_average_quality(this->call);
}
Platform::String^ Linphone::Core::LinphoneCall::GetAuthenticationToken()
Platform::String^ Linphone::Core::LinphoneCall::AuthenticationToken::get()
{
API_LOCK;
return Linphone::Core::Utils::cctops(linphone_call_get_authentication_token(this->call));
}
Platform::Boolean Linphone::Core::LinphoneCall::IsAuthenticationTokenVerified()
Platform::Boolean Linphone::Core::LinphoneCall::AuthenticationTokenVerified::get()
{
API_LOCK;
return (linphone_call_get_authentication_token_verified(this->call) == TRUE);
}
void Linphone::Core::LinphoneCall::SetAuthenticationTokenVerified(Platform::Boolean verified)
void Linphone::Core::LinphoneCall::AuthenticationTokenVerified::set(Platform::Boolean verified)
{
API_LOCK;
linphone_call_set_authentication_token_verified(this->call, verified);
}
Platform::Boolean Linphone::Core::LinphoneCall::IsInConference()
Platform::Boolean Linphone::Core::LinphoneCall::InConference::get()
{
API_LOCK;
return (linphone_call_is_in_conference(this->call) == TRUE);
}
float Linphone::Core::LinphoneCall::GetPlayVolume()
float Linphone::Core::LinphoneCall::PlayVolume::get()
{
API_LOCK;
return linphone_call_get_play_volume(this->call);
}
Platform::String^ Linphone::Core::LinphoneCall::GetRemoteUserAgent()
Platform::String^ Linphone::Core::LinphoneCall::RemoteUserAgent::get()
{
API_LOCK;
return Linphone::Core::Utils::cctops(linphone_call_get_remote_user_agent(this->call));
}
Platform::String^ Linphone::Core::LinphoneCall::GetRemoteContact()
Platform::String^ Linphone::Core::LinphoneCall::RemoteContact::get()
{
API_LOCK;
return Linphone::Core::Utils::cctops(linphone_call_get_remote_contact(this->call));
......@@ -146,7 +146,7 @@ void Linphone::Core::LinphoneCall::CallContext::set(Windows::Phone::Networking::
this->callContext = cc;
}
Platform::Object^ Linphone::Core::LinphoneCall::GetCallStartTimeFromContext()
Platform::Object^ Linphone::Core::LinphoneCall::CallStartTimeFromContext::get()
{
Platform::Object^ result = nullptr;
try {
......@@ -160,19 +160,19 @@ Platform::Object^ Linphone::Core::LinphoneCall::GetCallStartTimeFromContext()
return result;
}
Platform::Boolean Linphone::Core::LinphoneCall::IsCameraEnabled()
Platform::Boolean Linphone::Core::LinphoneCall::CameraEnabled::get()
{
API_LOCK;
return (linphone_call_camera_enabled(this->call) == TRUE);
}
void Linphone::Core::LinphoneCall::EnableCamera(Platform::Boolean enable)
void Linphone::Core::LinphoneCall::CameraEnabled::set(Platform::Boolean enable)
{
API_LOCK;
linphone_call_enable_camera(this->call, enable);
}
Linphone::Core::LinphoneCallStats^ Linphone::Core::LinphoneCall::GetVideoStats()
Linphone::Core::LinphoneCallStats^ Linphone::Core::LinphoneCall::VideoStats::get()
{
API_LOCK;
return (Linphone::Core::LinphoneCallStats^) Linphone::Core::Utils::CreateLinphoneCallStats(this->call, (int)Linphone::Core::MediaType::Video);
......
......@@ -20,42 +20,54 @@ namespace Linphone
public ref class LinphoneCall sealed
{
public:
/// <summary>
/// Gets the LinphoneCallState of the call (StreamRunning, IncomingReceived, OutgoingProgress, ...).
/// <summary>
/// Gets the LinphoneCallState of the call (StreamRunning, IncomingReceived, OutgoingProgress, ...).
/// </summary>
/// <returns>The LinphoneCallState of the call</returns>
LinphoneCallState GetState();
property LinphoneCallState State
{
LinphoneCallState get();
}
/// <summary>
/// Gets the remote LinphoneAddress.
/// <summary>
/// Gets the remote LinphoneAddress.
/// </summary>
/// <returns>The remote address of the call</returns>
LinphoneAddress^ GetRemoteAddress();
property LinphoneAddress^ RemoteAddress
{
LinphoneAddress^ get();
}
/// <summary>
/// Returns the CallDirection (Outgoing or incoming).
/// <summary>
/// Returns the CallDirection (Outgoing or incoming).
/// </summary>
/// <returns>The direction of the call</returns>
CallDirection GetDirection();
property CallDirection Direction
{
CallDirection get();
}
/// <summary>
/// Gets the LinphoneCallLog associated with this call.
/// <summary>
/// Gets the LinphoneCallLog associated with this call.
/// </summary>
/// <returns>The LinphoneCallLog associated with the call</returns>
LinphoneCallLog^ GetCallLog();
property LinphoneCallLog^ CallLog
{
LinphoneCallLog^ get();
}
/// <summary>
/// Gets the audio statistics associated with this call.
/// <summary>
/// Gets the audio statistics associated with this call.
/// </summary>
/// <returns>The audio statistics associated with the call</returns>
LinphoneCallStats^ GetAudioStats();
property LinphoneCallStats^ AudioStats
{
LinphoneCallStats^ get();
}
/// <summary>
/// Gets the call parameters given by the remote peer.
/// This is useful for example to know if far end supports video or encryption.
/// </summary>
/// <returns>The call parameters given by the remote peer</returns>
LinphoneCallParams^ GetRemoteParams();
property LinphoneCallParams^ RemoteParams
{
LinphoneCallParams^ get();
}
/// <summary>
/// Gets a copy of the current local call parameters.
......@@ -66,32 +78,28 @@ namespace Linphone
/// <summary>
/// Enable or disable the echo cancellation.
/// </summary>
/// <param name="enable">A boolean value telling whether to enable or to disable the echo cancellation</param>
void EnableEchoCancellation(Platform::Boolean enable);
/// <summary>
/// Tells whether echo cancellation is enabled or not.
/// </summary>
/// <returns>true if echo cancellation is enabled, false otherwise</returns>
Platform::Boolean IsEchoCancellationEnabled();
property Platform::Boolean EchoCancellationEnabled
{
Platform::Boolean get();
void set(Platform::Boolean value);
}
/// <summary>
/// Enable or disable the echo limiter.
/// </summary>
/// <param name="enable">A boolean value telling whether to enable or to disable the echo limiter</param>
void EnableEchoLimiter(Platform::Boolean enable);
/// <summary>
/// Tells whether echo limitation is enabled or not.
/// </summary>
/// <returns>true if echo limitation is enabled, false otherwise</returns>
Platform::Boolean IsEchoLimiterEnabled();
property Platform::Boolean EchoLimiterEnabled
{
Platform::Boolean get();
void set(Platform::Boolean value);
}
/// <summary>
/// Gets the current duration of the call in seconds.
/// </summary>
/// <returns>The current duration of the call in seconds</returns>
int GetDuration();
property int Duration
{
int get();
}
/// <summary>
/// Obtain real time quality rating of the call.
......@@ -108,81 +116,96 @@ namespace Linphone
/// <returns>
/// -1 if no quality mesurement is available, for example if no active audio stream exists. Otherwise returns the quality rating.
/// </returns>
float GetCurrentQuality();
property float CurrentQuality
{
float get();
}
/// <summary>
/// Returns call quality averaged over all the duration of the call.
/// See GetCurrentQuality for more details about quality mesurement.
/// </summary>
/// <returns>Average quality over all the duration of the call</returns>
float GetAverageQuality();
property float AverageQuality
{
float get();
}
/// <summary>
/// Used by ZRTP encryption mechanism.
/// </summary>
/// <returns>SAS associated to the main stream [voice]</returns>
Platform::String^ GetAuthenticationToken();
property Platform::String^ AuthenticationToken
{
Platform::String^ get();
}
/// <summary>
/// Used by ZRTP mechanism.
/// SAS can verified manually by the user or automatically using a previously shared secret.
/// </summary>
/// <returns>true if the main stream [voice] SAS was verified</returns>
Platform::Boolean IsAuthenticationTokenVerified();
/// <summary>
/// Used by ZRTP mechanism.
/// </summary>
/// <param name="verified">true when displayed SAS is correct</param>
void SetAuthenticationTokenVerified(Platform::Boolean verified);
property Platform::Boolean AuthenticationTokenVerified
{
Platform::Boolean get();
void set(Platform::Boolean value);
}
/// <summary>
/// Tells whether the call is in conference or not.
/// </summary>
/// <returns>A boolean value telling whether the call is in conference</returns>
Platform::Boolean IsInConference();
property Platform::Boolean InConference
{
Platform::Boolean get();
}
/// <summary>
/// Gets the measured sound volume played locally (received from remote).
/// It is expressed in dbm0.
/// </summary>
/// <returns>The play volume in dbm0.</returns>
float GetPlayVolume();
property float PlayVolume
{
float get();
}
/// <summary>
/// Gets the far end's user agent description string, if available.
/// </summary>
/// <returns>The remote user agent as a string</returns>
Platform::String^ GetRemoteUserAgent();
property Platform::String^ RemoteUserAgent
{
Platform::String^ get();
}
/// <summary>
/// Gets the far end's sip contact as a string, if available.
/// </summary>
/// <returns>The remote sip contact as a string</returns>
Platform::String^ GetRemoteContact();
property Platform::String^ RemoteContact
{
Platform::String^ get();
}
/// <summary>
/// Uses the CallContext object (native VoipPhoneCall) to get the DateTimeOffset at which the call started
/// </summary>
Platform::Object^ GetCallStartTimeFromContext();
property Platform::Object^ CallStartTimeFromContext
{
Platform::Object^ get();
}
/// <summary>
/// Tells whether video captured from the camera is sent to the remote party.
/// </summary>
/// <returns>true if video capture from the camera is sent to the remote party, false otherwise</returns>
Platform::Boolean IsCameraEnabled();
property Platform::Boolean CameraEnabled
{
Platform::Boolean get();
void set(Platform::Boolean value);
}
/// <summary>
/// Enable or disable sending video captured from the camera to the remote party.
/// </summary>
/// <param name="enable">A boolean value telling whether to enable or disable sending video captured from the camera</param>
void EnableCamera(Platform::Boolean enable);
/// <summary>
/// Gets the video statistics associated with this call.
/// Gets the video statistics associated with this call.
/// </summary>
/// <returns>The video statistics associated with the call</returns>
LinphoneCallStats^ GetVideoStats();
property LinphoneCallStats^ VideoStats
{
LinphoneCallStats^ get();
}
/// <summary>
/// Requests remote side to send us a Video Fast Update.
......@@ -192,12 +215,15 @@ namespace Linphone
/// <summary>
/// Gets the CallContext object (native VoipPhoneCall)
/// </summary>
property Windows::Phone::Networking::Voip::VoipPhoneCall^ CallContext
{
Windows::Phone::Networking::Voip::VoipPhoneCall^ get();
void set(Windows::Phone::Networking::Voip::VoipPhoneCall^ cc);
property Windows::Phone::Networking::Voip::VoipPhoneCall^ CallContext
{
Windows::Phone::Networking::Voip::VoipPhoneCall^ get();
void set(Windows::Phone::Networking::Voip::VoipPhoneCall^ cc);
}
/// <summary>
/// Gets the reason for a call termination (either error or normal termination)
/// </summary>
property Linphone::Core::Reason Reason
{
Linphone::Core::Reason get();
......
......@@ -1365,16 +1365,16 @@ void call_state_changed(::LinphoneCore *lc, ::LinphoneCall *call, ::LinphoneCall
Linphone::Core::CallController^ callController = Linphone::Core::Globals::Instance->CallController;
if (state == Linphone::Core::LinphoneCallState::IncomingReceived) {
Platform::String^ name = lCall->GetRemoteAddress()->DisplayName;
Platform::String^ name = lCall->RemoteAddress->DisplayName;
if (name == nullptr || name->Length() <= 0)
{
name = lCall->GetRemoteAddress()->UserName;
name = lCall->RemoteAddress->UserName;
}
Windows::Phone::Networking::Voip::VoipPhoneCall^ platformCall = callController->OnIncomingCallReceived(lCall, name, lCall->GetRemoteAddress()->AsStringUriOnly(), callController->IncomingCallViewDismissed);
Windows::Phone::Networking::Voip::VoipPhoneCall^ platformCall = callController->OnIncomingCallReceived(lCall, name, lCall->RemoteAddress->AsStringUriOnly(), callController->IncomingCallViewDismissed);
lCall->CallContext = platformCall;
}
else if (state == Linphone::Core::LinphoneCallState::OutgoingProgress) {
Windows::Phone::Networking::Voip::VoipPhoneCall^ platformCall = callController->NewOutgoingCall(lCall->GetRemoteAddress()->AsStringUriOnly());
Windows::Phone::Networking::Voip::VoipPhoneCall^ platformCall = callController->NewOutgoingCall(lCall->RemoteAddress->AsStringUriOnly());
lCall->CallContext = platformCall;
}
else if (state == Linphone::Core::LinphoneCallState::CallEnd || state == Linphone::Core::LinphoneCallState::Error) {
......@@ -1396,10 +1396,10 @@ void call_state_changed(::LinphoneCore *lc, ::LinphoneCall *call, ::LinphoneCall
Windows::Phone::Networking::Voip::VoipPhoneCall^ platformCall = (Windows::Phone::Networking::Voip::VoipPhoneCall^) lCall->CallContext;
if (platformCall == nullptr) {
// If CallContext is null here, it is because we have an incoming call using the custom incoming call view so create the VoipPhoneCall now
platformCall = callController->NewIncomingCallForCustomIncomingCallView(lCall->GetRemoteAddress()->DisplayName);
platformCall = callController->NewIncomingCallForCustomIncomingCallView(lCall->RemoteAddress->DisplayName);
lCall->CallContext = platformCall;
}
if (lCall->IsCameraEnabled()) {
if (lCall->CameraEnabled) {
platformCall->CallMedia = VoipCallMedia::Audio | VoipCallMedia::Video;
} else {
platformCall->CallMedia = VoipCallMedia::Audio;
......
......@@ -533,7 +533,7 @@ namespace Linphone.Model
{
foreach (LinphoneCall lCall in LinphoneCore.GetCalls())
{
if (lCall.GetState() == LinphoneCallState.Paused)
if (lCall.State == LinphoneCallState.Paused)
{
LinphoneCore.TerminateCall(lCall);
}
......@@ -588,7 +588,7 @@ namespace Linphone.Model
public void ResumeCurrentCall()
{
foreach (LinphoneCall call in LinphoneCore.GetCalls()) {
if (call.GetState() == LinphoneCallState.Paused)
if (call.State == LinphoneCallState.Paused)
{
LinphoneCore.ResumeCall(call);
}
......@@ -819,7 +819,7 @@ namespace Linphone.Model
if (CallListener != null)
{
string sipAddress = call.GetRemoteAddress().AsStringUriOnly();
string sipAddress = call.RemoteAddress.AsStringUriOnly();
CallListener.NewCallStarted(sipAddress);
}
});
......@@ -831,7 +831,7 @@ namespace Linphone.Model
Logger.Msg("[LinphoneManager] Incoming received\r\n");
if (false) //TODO: Find a proper way to let the user choose between the two.
{
BaseModel.CurrentPage.NavigationService.Navigate(new Uri("/Views/IncomingCall.xaml?sip=" + call.GetRemoteAddress().AsStringUriOnly(), UriKind.RelativeOrAbsolute));
BaseModel.CurrentPage.NavigationService.Navigate(new Uri("/Views/IncomingCall.xaml?sip=" + call.RemoteAddress.AsStringUriOnly(), UriKind.RelativeOrAbsolute));
//Remove the current page from the back stack to avoid duplicating him after
BaseModel.CurrentPage.NavigationService.RemoveBackEntry();
}
......@@ -846,7 +846,7 @@ namespace Linphone.Model
Logger.Msg("[LinphoneManager] Connected\r\n");
if (CallListener != null)
{
string sipAddress = call.GetRemoteAddress().AsStringUriOnly();
string sipAddress = call.RemoteAddress.AsStringUriOnly();
CallListener.NewCallStarted(sipAddress);
}
});
......@@ -865,19 +865,19 @@ namespace Linphone.Model
case Reason.LinphoneReasonNotAnswered:
break;
case Reason.LinphoneReasonDeclined:
if (call.GetDirection() == CallDirection.Outgoing)
if (call.Direction == CallDirection.Outgoing)
{
text = ResourceManager.GetString("CallErrorDeclined", CultureInfo.CurrentCulture);
ShowCallError(text.Replace("#address#", call.GetRemoteAddress().UserName));
ShowCallError(text.Replace("#address#", call.RemoteAddress.UserName));
}
break;
case Reason.LinphoneReasonNotFound:
text = ResourceManager.GetString("CallErrorNotFound", CultureInfo.CurrentCulture);
ShowCallError(text.Replace("#address#", call.GetRemoteAddress().UserName));
ShowCallError(text.Replace("#address#", call.RemoteAddress.UserName));
break;
case Reason.LinphoneReasonBusy:
text = ResourceManager.GetString("CallErrorBusy", CultureInfo.CurrentCulture);
ShowCallError(text.Replace("#address#", call.GetRemoteAddress().UserName));
ShowCallError(text.Replace("#address#", call.RemoteAddress.UserName));
break;
case Reason.LinphoneReasonNotAcceptable:
ShowCallError(ResourceManager.GetString("CallErrorNotAcceptable", CultureInfo.CurrentCulture));
......@@ -920,7 +920,7 @@ namespace Linphone.Model
{
Boolean videoAdded = false;
VideoPolicy policy = LinphoneManager.Instance.LinphoneCore.GetVideoPolicy();
LinphoneCallParams remoteParams = call.GetRemoteParams();
LinphoneCallParams remoteParams = call.RemoteParams;
LinphoneCallParams localParams = call.GetCurrentParamsCopy();
if (!policy.AutomaticallyAccept && remoteParams.VideoEnabled && !localParams.VideoEnabled && !LinphoneManager.Instance.LinphoneCore.IsInConference())
{
......@@ -1193,7 +1193,7 @@ namespace Linphone.Model
{
try
{