Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
linphone-windows10
Commits
4afab377
Commit
4afab377
authored
Jul 09, 2015
by
Ghislain MARY
Browse files
Stabilize API of C++/CX wrapper.
parent
dd6ec7a0
Changes
26
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1214 additions
and
1767 deletions
+1214
-1767
Linphone/MainPage.xaml.cs
Linphone/MainPage.xaml.cs
+2
-2
Native/AuthInfo.cpp
Native/AuthInfo.cpp
+2
-2
Native/AuthInfo.h
Native/AuthInfo.h
+1
-1
Native/Call.cpp
Native/Call.cpp
+11
-15
Native/Call.h
Native/Call.h
+12
-7
Native/CallController.cpp
Native/CallController.cpp
+0
-228
Native/CallController.h
Native/CallController.h
+0
-134
Native/CallLog.cpp
Native/CallLog.cpp
+16
-12
Native/CallLog.h
Native/CallLog.h
+10
-10
Native/CallParams.cpp
Native/CallParams.cpp
+31
-21
Native/CallParams.h
Native/CallParams.h
+16
-11
Native/ChatMessage.cpp
Native/ChatMessage.cpp
+5
-10
Native/ChatMessage.h
Native/ChatMessage.h
+2
-2
Native/ChatRoom.cpp
Native/ChatRoom.cpp
+11
-11
Native/ChatRoom.h
Native/ChatRoom.h
+2
-2
Native/Core.cpp
Native/Core.cpp
+580
-737
Native/Core.h
Native/Core.h
+507
-558
Native/LpConfig.cpp
Native/LpConfig.cpp
+4
-0
Native/Native.vcxproj
Native/Native.vcxproj
+0
-2
Native/PayloadType.cpp
Native/PayloadType.cpp
+2
-2
No files found.
Linphone/MainPage.xaml.cs
View file @
4afab377
...
...
@@ -21,7 +21,7 @@ namespace Linphone
{
base
.
OnNavigatedTo
(
e
);
LinphoneManager
.
Instance
.
Dispatcher
=
Dispatcher
;
LinphoneManager
.
Instance
.
Core
.
IterateEnabled
=
true
;
LinphoneManager
.
Instance
.
Core
.
Is
IterateEnabled
=
true
;
}
private
void
CallButton_Click
(
object
sender
,
Windows
.
UI
.
Xaml
.
RoutedEventArgs
e
)
...
...
@@ -52,7 +52,7 @@ namespace Linphone
core
.
AddAuthInfo
(
authInfo
);
proxy
.
Identity
=
string
.
Format
(
"sip:{0}@{1}"
,
UsernameTextBox
.
Text
,
ServerTextBox
.
Text
);
proxy
.
ServerAddr
=
ServerTextBox
.
Text
;
proxy
.
RegisterEnabled
=
true
;
proxy
.
Is
RegisterEnabled
=
true
;
core
.
AddProxyConfig
(
proxy
);
core
.
DefaultProxyConfig
=
proxy
;
}
...
...
Native/AuthInfo.cpp
View file @
4afab377
...
...
@@ -32,13 +32,13 @@ void Linphone::Native::AuthInfo::Ha1::set(Platform::String^ ha1)
delete
(
cc
);
}
Platform
::
String
^
Linphone
::
Native
::
AuthInfo
::
Passw
or
d
::
get
()
Platform
::
String
^
Linphone
::
Native
::
AuthInfo
::
Passwd
::
get
()
{
API_LOCK
;
return
Utils
::
cctops
(
linphone_auth_info_get_passwd
(
this
->
auth_info
));
}
void
Linphone
::
Native
::
AuthInfo
::
Passw
or
d
::
set
(
Platform
::
String
^
password
)
void
Linphone
::
Native
::
AuthInfo
::
Passwd
::
set
(
Platform
::
String
^
password
)
{
API_LOCK
;
const
char
*
cc
=
Linphone
::
Native
::
Utils
::
pstoccs
(
password
);
...
...
Native/AuthInfo.h
View file @
4afab377
...
...
@@ -48,7 +48,7 @@ namespace Linphone
/// <summary>
/// The authentication password.
/// </summary>
property
Platform
::
String
^
Passw
or
d
property
Platform
::
String
^
Passwd
{
Platform
::
String
^
get
();
void
set
(
Platform
::
String
^
value
);
...
...
Native/Call.cpp
View file @
4afab377
...
...
@@ -28,7 +28,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
Linphone
::
Native
::
CallStats
^
Linphone
::
Native
::
Call
::
AudioStats
::
get
()
{
API_LOCK
;
return
(
Linphone
::
Native
::
CallStats
^
)
Linphone
::
Native
::
Utils
::
Create
Linphone
CallStats
(
this
->
call
,
(
int
)
Linphone
::
Native
::
MediaType
::
Audio
);
return
(
Linphone
::
Native
::
CallStats
^
)
Linphone
::
Native
::
Utils
::
CreateCallStats
(
this
->
call
,
(
int
)
Linphone
::
Native
::
MediaType
::
Audio
);
}
Platform
::
String
^
Linphone
::
Native
::
Call
::
AuthenticationToken
::
get
()
...
...
@@ -58,7 +58,7 @@ float Linphone::Native::Call::AverageQuality::get()
Linphone
::
Native
::
CallLog
^
Linphone
::
Native
::
Call
::
CallLog
::
get
()
{
API_LOCK
;
return
(
Linphone
::
Native
::
CallLog
^
)
Linphone
::
Native
::
Utils
::
CreateLinphone
CallLog
(
linphone_call_get_call_log
(
this
->
call
));
return
(
Linphone
::
Native
::
CallLog
^
)
Linphone
::
Native
::
Utils
::
Get
CallLog
(
linphone_call_get_call_log
(
this
->
call
));
}
Platform
::
Boolean
Linphone
::
Native
::
Call
::
CameraEnabled
::
get
()
...
...
@@ -73,6 +73,12 @@ void Linphone::Native::Call::CameraEnabled::set(Platform::Boolean enable)
linphone_call_enable_camera
(
this
->
call
,
enable
);
}
Linphone
::
Native
::
CallParams
^
Linphone
::
Native
::
Call
::
CurrentParams
::
get
()
{
API_LOCK
;
return
(
Linphone
::
Native
::
CallParams
^
)
Linphone
::
Native
::
Utils
::
GetCallParams
((
void
*
)
linphone_call_get_current_params
(
this
->
call
));
}
float
Linphone
::
Native
::
Call
::
CurrentQuality
::
get
()
{
API_LOCK
;
...
...
@@ -115,7 +121,7 @@ void Linphone::Native::Call::EchoLimiterEnabled::set(Platform::Boolean enable)
linphone_call_enable_echo_limiter
(
this
->
call
,
enable
);
}
Platform
::
Boolean
Linphone
::
Native
::
Call
::
InConference
::
get
()
Platform
::
Boolean
Linphone
::
Native
::
Call
::
Is
InConference
::
get
()
{
API_LOCK
;
return
(
linphone_call_is_in_conference
(
this
->
call
)
==
TRUE
);
...
...
@@ -149,11 +155,7 @@ Linphone::Native::Address^ Linphone::Native::Call::RemoteAddress::get()
Linphone
::
Native
::
CallParams
^
Linphone
::
Native
::
Call
::
RemoteParams
::
get
()
{
API_LOCK
;
Linphone
::
Native
::
CallParams
^
params
=
nullptr
;
if
(
linphone_call_get_remote_params
(
this
->
call
)
!=
nullptr
)
{
params
=
(
Linphone
::
Native
::
CallParams
^
)
Linphone
::
Native
::
Utils
::
CreateLinphoneCallParams
(
linphone_call_params_copy
(
linphone_call_get_remote_params
(
this
->
call
)));
}
return
params
;
return
(
Linphone
::
Native
::
CallParams
^
)
Linphone
::
Native
::
Utils
::
GetCallParams
((
void
*
)
linphone_call_get_remote_params
(
this
->
call
));
}
Platform
::
String
^
Linphone
::
Native
::
Call
::
RemoteUserAgent
::
get
()
...
...
@@ -171,13 +173,7 @@ Linphone::Native::CallState Linphone::Native::Call::State::get()
Linphone
::
Native
::
CallStats
^
Linphone
::
Native
::
Call
::
VideoStats
::
get
()
{
API_LOCK
;
return
(
Linphone
::
Native
::
CallStats
^
)
Linphone
::
Native
::
Utils
::
CreateLinphoneCallStats
(
this
->
call
,
(
int
)
Linphone
::
Native
::
MediaType
::
Video
);
}
Linphone
::
Native
::
CallParams
^
Linphone
::
Native
::
Call
::
GetCurrentParamsCopy
()
{
API_LOCK
;
return
(
Linphone
::
Native
::
CallParams
^
)
Linphone
::
Native
::
Utils
::
CreateLinphoneCallParams
(
linphone_call_params_copy
(
linphone_call_get_current_params
(
this
->
call
)));
return
(
Linphone
::
Native
::
CallStats
^
)
Linphone
::
Native
::
Utils
::
CreateCallStats
(
this
->
call
,
(
int
)
Linphone
::
Native
::
MediaType
::
Video
);
}
void
Linphone
::
Native
::
Call
::
SendVFURequest
()
...
...
Native/Call.h
View file @
4afab377
...
...
@@ -89,6 +89,16 @@ namespace Linphone
void
set
(
Platform
::
Boolean
value
);
}
/// <summary>
/// Gets the current local call parameters.
/// Do not change this params directly, make a copy with CallParams::Copy to do that.
/// </summary>
/// <returns>The current local call parameters</returns>
property
CallParams
^
CurrentParams
{
CallParams
^
get
();
}
/// <summary>
/// Obtain real time quality rating of the call.
/// Based on local RTP statistics and RTCP feedback, a quality rating is computed and updated during all the duration of the call.
...
...
@@ -146,7 +156,7 @@ namespace Linphone
/// <summary>
/// Tells whether the call is in conference or not.
/// </summary>
property
Platform
::
Boolean
InConference
property
Platform
::
Boolean
Is
InConference
{
Platform
::
Boolean
get
();
}
...
...
@@ -187,6 +197,7 @@ namespace Linphone
/// <summary>
/// Gets the call parameters given by the remote peer.
/// This is useful for example to know if far end supports video or encryption.
/// Do not change this params directly, make a copy with CallParams::Copy to do that.
/// </summary>
property
CallParams
^
RemoteParams
{
...
...
@@ -217,12 +228,6 @@ namespace Linphone
CallStats
^
get
();
}
/// <summary>
/// Gets a copy of the current local call parameters.
/// </summary>
/// <returns>A copy of the current local call parameters</returns>
CallParams
^
GetCurrentParamsCopy
();
/// <summary>
/// Requests remote side to send us a Video Fast Update.
/// </summary>
...
...
Native/CallController.cpp
deleted
100644 → 0
View file @
dd6ec7a0
/*
CallController.cpp
Copyright (C) 2015 Belledonne Communications, Grenoble, France
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "Call.h"
#include "CallController.h"
#include "CallParams.h"
#include "Core.h"
#include "VideoPolicy.h"
using
namespace
Linphone
::
Native
;
using
namespace
Platform
;
using
namespace
Windows
::
Foundation
;
//using namespace Windows::Phone::Networking::Voip;
//#define ACCEPT_WITH_VIDEO_OR_WITH_AUDIO_ONLY
#if 0
VoipPhoneCall^ CallController::OnIncomingCallReceived(Linphone::Native::Call^ call, Platform::String^ contactName, Platform::String^ contactNumber, IncomingCallViewDismissedCallback^ incomingCallViewDismissedCallback)
{
VoipPhoneCall^ incomingCall = nullptr;
this->call = call;
VoipCallMedia media = VoipCallMedia::Audio;
#ifdef ACCEPT_WITH_VIDEO_OR_WITH_AUDIO_ONLY
if (Globals::Instance->LinphoneCore->IsVideoSupported() && Globals::Instance->LinphoneCore->IsVideoEnabled()) {
bool automatically_accept = false;
CallParams^ remoteParams = call->GetRemoteParams();
VideoPolicy^ policy = Globals::Instance->LinphoneCore->GetVideoPolicy();
if (policy != nullptr) {
automatically_accept = policy->AutomaticallyAccept;
}
if ((remoteParams != nullptr) && remoteParams->IsVideoEnabled() && automatically_accept) {
media = VoipCallMedia::Audio | VoipCallMedia::Video;
}
}
#endif
if (!this->customIncomingCallView) {
TimeSpan ringingTimeout;
ringingTimeout.Duration = 90 * 10 * 1000 * 1000; // in 100ns units
try {
if (incomingCallViewDismissedCallback != nullptr)
this->onIncomingCallViewDismissed = incomingCallViewDismissedCallback;
// Ask the Phone Service to start a new incoming call
this->callCoordinator->RequestNewIncomingCall(
this->callInProgressPageUri + "?sip=" + contactNumber,
contactName,
contactNumber,
this->defaultContactImageUri,
this->voipServiceName,
this->linphoneImageUri,
"",
this->ringtoneUri,
media,
ringingTimeout,
&incomingCall);
}
catch(...) {
return nullptr;
}
incomingCall->AnswerRequested += this->acceptCallRequestedHandler;
incomingCall->RejectRequested += this->rejectCallRequestedHandler;
} else {
// When using the custom incoming call view, the VoipPhoneCall will be created when getting in the
// StreamsRunning state by calling NewIncomingCallForCustomIncomingCallView()
}
return incomingCall;
}
void CallController::OnAcceptCallRequested(VoipPhoneCall^ incomingCall, CallAnswerEventArgs^ args)
{
incomingCall->NotifyCallActive();
if (this->onIncomingCallViewDismissed != nullptr) {
this->onIncomingCallViewDismissed();
this->onIncomingCallViewDismissed = nullptr;
}
if (this->call != nullptr) {
#ifdef ACCEPT_WITH_VIDEO_OR_WITH_AUDIO_ONLY
CallParams^ params = call->GetCurrentParamsCopy();
if ((args->AcceptedMedia & VoipCallMedia::Video) == VoipCallMedia::Video) {
params->EnableVideo(true);
} else {
params->EnableVideo(false);
}
Globals::Instance->LinphoneCore->AcceptCallWithParams(this->call, params);
#else
Globals::Instance->LinphoneCore->AcceptCall(this->call);
#endif
}
}
void
CallController
::
OnRejectCallRequested
(
VoipPhoneCall
^
incomingCall
,
CallRejectEventArgs
^
args
)
{
if
(
this
->
onIncomingCallViewDismissed
!=
nullptr
)
{
this
->
onIncomingCallViewDismissed
();
this
->
onIncomingCallViewDismissed
=
nullptr
;
}
//This will call notifyCallEnded on the call state changed callback
if
(
this
->
call
!=
nullptr
)
Globals
::
Instance
->
LinphoneCore
->
DeclineCall
(
this
->
call
,
this
->
declineReason
);
}
VoipPhoneCall
^
CallController
::
NewOutgoingCall
(
Platform
::
String
^
number
)
{
VoipPhoneCall
^
outgoingCall
=
nullptr
;
this
->
call
=
call
;
VoipCallMedia
media
=
VoipCallMedia
::
Audio
;
if
(
Globals
::
Instance
->
LinphoneCore
->
VideoSupported
&&
Globals
::
Instance
->
LinphoneCore
->
VideoEnabled
)
{
VideoPolicy
^
policy
=
Globals
::
Instance
->
LinphoneCore
->
VideoPolicy
;
if
((
policy
!=
nullptr
)
&&
policy
->
AutomaticallyInitiate
)
{
media
=
VoipCallMedia
::
Audio
|
VoipCallMedia
::
Video
;
}
}
this
->
callCoordinator
->
RequestNewOutgoingCall
(
this
->
callInProgressPageUri
+
"?sip="
+
number
,
number
,
this
->
voipServiceName
,
media
,
&
outgoingCall
);
outgoingCall
->
NotifyCallActive
();
return
outgoingCall
;
}
VoipPhoneCall
^
CallController
::
NewIncomingCallForCustomIncomingCallView
(
Platform
::
String
^
contactNumber
)
{
VoipPhoneCall
^
incomingCall
=
nullptr
;
VoipCallMedia
media
=
VoipCallMedia
::
Audio
;
this
->
callCoordinator
->
RequestNewOutgoingCall
(
this
->
callInProgressPageUri
+
"?sip="
+
contactNumber
,
contactNumber
,
this
->
voipServiceName
,
media
,
&
incomingCall
);
return
incomingCall
;
}
#endif
void
CallController
::
NotifyMute
(
bool
isMuted
)
{
#if 0
if (isMuted)
this->callCoordinator->NotifyMuted();
else
this->callCoordinator->NotifyUnmuted();
#endif
}
IncomingCallViewDismissedCallback
^
CallController
::
IncomingCallViewDismissed
::
get
()
{
return
this
->
onIncomingCallViewDismissed
;
}
void
CallController
::
IncomingCallViewDismissed
::
set
(
IncomingCallViewDismissedCallback
^
cb
)
{
API_LOCK
;
this
->
onIncomingCallViewDismissed
=
cb
;
}
Platform
::
Boolean
CallController
::
CustomIncomingCallView
::
get
()
{
return
this
->
customIncomingCallView
;
}
void
CallController
::
CustomIncomingCallView
::
set
(
Platform
::
Boolean
value
)
{
API_LOCK
;
this
->
customIncomingCallView
=
value
;
}
Reason
CallController
::
DeclineReason
::
get
()
{
return
this
->
declineReason
;
}
void
CallController
::
DeclineReason
::
set
(
Linphone
::
Native
::
Reason
value
)
{
API_LOCK
;
this
->
declineReason
=
value
;
}
CallController
::
CallController
()
:
callInProgressPageUri
(
L"/Views/InCall.xaml"
),
voipServiceName
(
nullptr
),
defaultContactImageUri
(
nullptr
),
linphoneImageUri
(
nullptr
),
ringtoneUri
(
nullptr
),
declineReason
(
Linphone
::
Native
::
Reason
::
Declined
)
//,
//callCoordinator(VoipCallCoordinator::GetDefault())
{
// URIs required for interactions with the VoipCallCoordinator
String
^
installFolder
=
String
::
Concat
(
Windows
::
ApplicationModel
::
Package
::
Current
->
InstalledLocation
->
Path
,
"
\\
"
);
this
->
defaultContactImageUri
=
ref
new
Uri
(
installFolder
,
"Assets
\\
unknown.png"
);
this
->
voipServiceName
=
ref
new
String
(
L"Linphone"
);
this
->
linphoneImageUri
=
ref
new
Uri
(
installFolder
,
"Assets
\\
pnicon.png"
);
this
->
ringtoneUri
=
ref
new
Uri
(
installFolder
,
"Assets
\\
Sounds
\\
oldphone.wma"
);
//this->acceptCallRequestedHandler = ref new TypedEventHandler<VoipPhoneCall^, CallAnswerEventArgs^>(this, &CallController::OnAcceptCallRequested);
//this->rejectCallRequestedHandler = ref new TypedEventHandler<VoipPhoneCall^, CallRejectEventArgs^>(this, &CallController::OnRejectCallRequested);
}
CallController
::~
CallController
()
{
}
Native/CallController.h
deleted
100644 → 0
View file @
dd6ec7a0
/*
CallController.h
Copyright (C) 2015 Belledonne Communications, Grenoble, France
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#pragma once
//#include <windows.phone.networking.voip.h>
#include "Enums.h"
#include "ApiLock.h"
namespace
Linphone
{
namespace
Native
{
ref
class
Globals
;
ref
class
LinphoneCall
;
/// <summary>
/// Callback to be called when the PushNotification Agent has to be dismissed, i.e. after a call has been accepted, denied or stopped by the caller.
/// </summary>
public
delegate
void
IncomingCallViewDismissedCallback
();
/// <summary>
/// Provides methods and properties related to Windows.Phone.Networking.Voip.VoipPhoneCall calls.
/// </summary>
public
ref
class
CallController
sealed
{
public:
/// <summary>
/// Starts the system incoming call view.
/// </summary>
/// <param name="call">The incoming LinphoneCall to notify</param>
/// <param name="contactName">The display name of the caller</param>
/// <param name="contactNumber">The number or SIP URI of the caller</param>
/// <param name="incomingCallViewDismissedCallback">The callback to be called if the notified incoming call is dismissed by the user</param>
/// <returns>The system VoipPhoneCall that has been notified</returns>
//Windows::Phone::Networking::Voip::VoipPhoneCall^ OnIncomingCallReceived(LinphoneCall^ call, Platform::String^ contactName, Platform::String^ contactNumber, IncomingCallViewDismissedCallback^ incomingCallViewDismissedCallback);
/// <summary>
/// Starts an outgoing call using native VoipPhoneCall.
/// </summary>
/// <param name="number">The number of SIP URI to call</param>
/// <returns>The system VoipPhoneCall that has been initiated</returns>
//Windows::Phone::Networking::Voip::VoipPhoneCall^ NewOutgoingCall(Platform::String^ number);
/// <summary>
/// Starts an incoming call for custom incoming call view.
/// </summary>
/// <param name="contactNumber">The number or SIP URI of the caller</param>
/// <returns>The system VoipPhoneCall that has been created</returns>
//Windows::Phone::Networking::Voip::VoipPhoneCall^ NewIncomingCallForCustomIncomingCallView(Platform::String^ contactNumber);
/// <summary>
/// Notifies the system that the call needs to be muted/unmuted.
/// </summary>
/// <param name="isMuted">The new mute state</param>
void
NotifyMute
(
bool
isMuted
);
/// <summary>
/// Changes the reason used when declining an incoming call.
/// </summary>
property
Linphone
::
Native
::
Reason
DeclineReason
{
Linphone
::
Native
::
Reason
get
();
void
set
(
Linphone
::
Native
::
Reason
cb
);
}
/// <summary>
/// Callback to be called when the PushNotification Agent has to be dismissed, i.e. after a call has been accepted, denied or stopped by the caller.
/// </summary>
property
IncomingCallViewDismissedCallback
^
IncomingCallViewDismissed
{
IncomingCallViewDismissedCallback
^
get
();
void
set
(
IncomingCallViewDismissedCallback
^
cb
);
}
/// <summary>
/// Property to tell that we will use our custom incoming call view instead of the one provided by the OS.
/// </summary>
property
Platform
::
Boolean
CustomIncomingCallView
{
Platform
::
Boolean
get
();
void
set
(
Platform
::
Boolean
value
);
}
private:
friend
ref
class
Linphone
::
Native
::
Globals
;
Platform
::
String
^
voipServiceName
;
Platform
::
String
^
callInProgressPageUri
;
Linphone
::
Native
::
Reason
declineReason
;
// The URI to the contact image, jpg or png, 1mb max !
Windows
::
Foundation
::
Uri
^
defaultContactImageUri
;
// The URI to the linphone icon, 128kb max !
Windows
::
Foundation
::
Uri
^
linphoneImageUri
;
Windows
::
Foundation
::
Uri
^
ringtoneUri
;
//Windows::Phone::Networking::Voip::VoipCallCoordinator^ callCoordinator;
Linphone
::
Native
::
LinphoneCall
^
call
;
IncomingCallViewDismissedCallback
^
onIncomingCallViewDismissed
;
Platform
::
Boolean
customIncomingCallView
;
//void OnAcceptCallRequested(Windows::Phone::Networking::Voip::VoipPhoneCall^ sender, Windows::Phone::Networking::Voip::CallAnswerEventArgs^ args);
//void OnRejectCallRequested(Windows::Phone::Networking::Voip::VoipPhoneCall^ sender, Windows::Phone::Networking::Voip::CallRejectEventArgs^ args);
//Windows::Foundation::TypedEventHandler<Windows::Phone::Networking::Voip::VoipPhoneCall^, Windows::Phone::Networking::Voip::CallAnswerEventArgs^>^ acceptCallRequestedHandler;
//Windows::Foundation::TypedEventHandler<Windows::Phone::Networking::Voip::VoipPhoneCall^, Windows::Phone::Networking::Voip::CallRejectEventArgs^>^ rejectCallRequestedHandler;
CallController
();
~
CallController
();
};
}
}
Native/CallLog.cpp
View file @
4afab377
...
...
@@ -38,34 +38,34 @@ int Linphone::Native::CallLog::Duration::get()
return
linphone_call_log_get_duration
(
this
->
callLog
);
}
Linphone
::
Native
::
Address
^
Linphone
::
Native
::
CallLog
::
From
::
get
()
Linphone
::
Native
::
Address
^
Linphone
::
Native
::
CallLog
::
From
Address
::
get
()
{
API_LOCK
;
return
(
Linphone
::
Native
::
Address
^
)
Linphone
::
Native
::
Utils
::
CreateAddress
((
void
*
)
linphone_call_log_get_from
(
this
->
callLog
));
return
(
Linphone
::
Native
::
Address
^
)
Linphone
::
Native
::
Utils
::
CreateAddress
((
void
*
)
linphone_call_log_get_from
_address
(
this
->
callLog
));
}
int64
Linphone
::
Native
::
CallLog
::
StartDate
::
get
()
Platform
::
Boolean
Linphone
::
Native
::
CallLog
::
IsVideoEnabled
::
get
()
{
API_LOCK
;
return
linphone_call_log_
get_start_date
(
this
->
callLog
);
return
(
linphone_call_log_
video_enabled
(
this
->
callLog
)
==
TRUE
)
;
}
L
in
phone
::
Native
::
CallStatus
Linphone
::
Native
::
CallLog
::
Sta
tus
::
get
()
in
t64
Linphone
::
Native
::
CallLog
::
Sta
rtDate
::
get
()
{
API_LOCK
;
return
(
Linphone
::
Native
::
CallStatus
)
linphone_call_log_get_sta
tus
(
this
->
callLog
);
return
linphone_call_log_get_sta
rt_date
(
this
->
callLog
);
}
Linphone
::
Native
::
Address
^
Linphone
::
Native
::
CallLog
::
To
::
get
()
Linphone
::
Native
::
CallStatus
Linphone
::
Native
::
CallLog
::
Status
::
get
()
{
API_LOCK
;
return
(
Linphone
::
Native
::
Address
^
)
Linphone
::
Native
::
Utils
::
CreateAddress
((
void
*
)
linphone_call_log_get_
to
(
this
->
callLog
)
)
;
return
(
Linphone
::
Native
::
CallStatus
)
linphone_call_log_get_
status
(
this
->
callLog
);
}
Platform
::
Boolean
Linphone
::
Native
::
CallLog
::
VideoEnabled
::
get
()
Linphone
::
Native
::
Address
^
Linphone
::
Native
::
CallLog
::
ToAddress
::
get
()
{
API_LOCK
;
return
(
linphone_call_log_
video_enabled
(
this
->
callLog
)
==
TRUE
);
return
(
Linphone
::
Native
::
Address
^
)
Linphone
::
Native
::
Utils
::
CreateAddress
((
void
*
)
linphone_call_log_
get_to_address
(
this
->
callLog
));
}
Linphone
::
Native
::
CallLog
::
CallLog
(
::
LinphoneCallLog
*
cl
)
...
...
@@ -73,12 +73,16 @@ Linphone::Native::CallLog::CallLog(::LinphoneCallLog *cl)
{
API_LOCK
;
RefToPtrProxy
<
CallLog
^>
*
log
=
new
RefToPtrProxy
<
CallLog
^>
(
this
);
linphone_call_log_set_user_pointer
(
this
->
callLog
,
log
);
linphone_call_log_ref
(
this
->
callLog
);
linphone_call_log_set_user_data
(
this
->
callLog
,
log
);
}
Linphone
::
Native
::
CallLog
::~
CallLog
()
{
API_LOCK
;
RefToPtrProxy
<
CallLog
^>
*
log
=
reinterpret_cast
<
RefToPtrProxy
<
CallLog
^>
*>
(
linphone_call_log_get_user_pointer
(
this
->
callLog
));
if
(
this
->
callLog
!=
nullptr
)
{
linphone_call_log_unref
(
this
->
callLog
);
}
RefToPtrProxy
<
CallLog
^>
*
log
=
reinterpret_cast
<
RefToPtrProxy
<
CallLog
^>
*>
(
linphone_call_log_get_user_data
(
this
->
callLog
));
delete
log
;
}
Native/CallLog.h
View file @
4afab377
...
...
@@ -60,11 +60,19 @@ namespace Linphone
/// <summary>
/// Gets the Address of the caller.
/// </summary>
property
Address
^
From
property
Address
^
From
Address
{
Address
^
get
();
}
/// <summary>
/// Tells whether video was enabled at the end of the call.
/// </summary>
property
Platform
::
Boolean
IsVideoEnabled
{
Platform
::
Boolean
get
();
}
/// <summary>
/// Returns the start date/time of the call in seconds elpsed since January first 1970.
/// </summary>
...
...
@@ -84,19 +92,11 @@ namespace Linphone
/// <summary>
/// Gets the Address of the callee.