Commit 2f04c06d authored by Ghislain MARY's avatar Ghislain MARY

First compiling Linphone project with Core C++/CX wrapper (some WP8 specific...

First compiling Linphone project with Core C++/CX wrapper (some WP8 specific parts are commented out so that it builds).
parent f837f396
This diff is collapsed.
This diff is collapsed.
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|ARM">
<Configuration>Debug</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM">
<Configuration>Release</Configuration>
<Platform>ARM</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<ItemGroup>
<ClCompile Include="ApiLock.cpp" />
<ClCompile Include="BackgroundModeLogger.cpp" />
<ClCompile Include="CallController.cpp" />
<ClCompile Include="Globals.cpp" />
<ClCompile Include="LinphoneAddress.cpp" />
<ClCompile Include="LinphoneAuthInfo.cpp" />
<ClCompile Include="LinphoneCall.cpp" />
<ClCompile Include="LinphoneCallLog.cpp" />
<ClCompile Include="LinphoneCallParams.cpp" />
<ClCompile Include="LinphoneCallStats.cpp" />
<ClCompile Include="LinphoneChatMessage.cpp" />
<ClCompile Include="LinphoneChatRoom.cpp" />
<ClCompile Include="LinphoneCore.cpp" />
<ClCompile Include="LinphoneCoreFactory.cpp" />
<ClCompile Include="LinphoneProxyConfig.cpp" />
<ClCompile Include="LpConfig.cpp" />
<ClCompile Include="PayloadType.cpp" />
<ClCompile Include="Transports.cpp" />
<ClCompile Include="Tunnel.cpp" />
<ClCompile Include="Utils.cpp" />
<ClCompile Include="VideoPolicy.cpp" />
<ClCompile Include="VideoSize.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="ApiLock.h" />
<ClInclude Include="BackgroundModeLogger.h" />
<ClInclude Include="CallController.h" />
<ClInclude Include="Enums.h" />
<ClInclude Include="Globals.h" />
<ClInclude Include="LinphoneAddress.h" />
<ClInclude Include="LinphoneAuthInfo.h" />
<ClInclude Include="LinphoneCall.h" />
<ClInclude Include="LinphoneCallLog.h" />
<ClInclude Include="LinphoneCallParams.h" />
<ClInclude Include="LinphoneCallStats.h" />
<ClInclude Include="LinphoneChatMessage.h" />
<ClInclude Include="LinphoneChatMessageListener.h" />
<ClInclude Include="LinphoneChatRoom.h" />
<ClInclude Include="LinphoneCore.h" />
<ClInclude Include="LinphoneCoreFactory.h" />
<ClInclude Include="LinphoneCoreListener.h" />
<ClInclude Include="LinphoneProxyConfig.h" />
<ClInclude Include="LpConfig.h" />
<ClInclude Include="PayloadType.h" />
<ClInclude Include="Server.h" />
<ClInclude Include="Transports.h" />
<ClInclude Include="Tunnel.h" />
<ClInclude Include="Utils.h" />
<ClInclude Include="VideoPolicy.h" />
<ClInclude Include="VideoSize.h" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\submodules\bcg729\build\windows10\libmsbcg729\libmsbcg729.vcxproj">
<Project>{acf5ea95-d647-4d0c-8f97-2cd9aae8a2e0}</Project>
</ProjectReference>
<ProjectReference Include="..\submodules\belle-sip\build\windows10\belle-sip\belle-sip.vcxproj">
<Project>{b6cdf482-7da3-43d4-9b12-70150106c191}</Project>
</ProjectReference>
<ProjectReference Include="..\submodules\linphone\build\windows10\liblinphone\liblinphone.vcxproj">
<Project>{c7139899-d8bc-48a3-a437-6844a8baabef}</Project>
</ProjectReference>
<ProjectReference Include="..\submodules\linphone\mediastreamer2\build\windows10\mediastreamer2\mediastreamer2.vcxproj">
<Project>{88e3c241-eb6f-4c84-80dc-89b8961daf80}</Project>
</ProjectReference>
<ProjectReference Include="..\submodules\linphone\oRTP\build\windows10\ortp\ortp.vcxproj">
<Project>{2e56b851-9d8d-40e5-84bb-e4ee63b71d25}</Project>
</ProjectReference>
<ProjectReference Include="..\submodules\msamr\build\windows10\libmsamr\libmsamr.vcxproj">
<Project>{8c1bc968-c5c8-4d4b-9ef3-d6a065fc7c97}</Project>
</ProjectReference>
<ProjectReference Include="..\submodules\msilbc\build\windows10\libmsilbc\libmsilbc.vcxproj">
<Project>{6a18bbb9-08d1-41a8-be57-17fc992cc36f}</Project>
</ProjectReference>
<ProjectReference Include="..\submodules\mssilk\build\windows10\libmssilk\libmssilk.vcxproj">
<Project>{b84d5c3b-6de5-49c8-b3dd-5eb67b01a527}</Project>
</ProjectReference>
<ProjectReference Include="..\submodules\mswasapi\windows10\libmswasapi\libmswasapi.vcxproj">
<Project>{266b769a-c04e-424c-9033-7209f0425bc0}</Project>
</ProjectReference>
<ProjectReference Include="..\submodules\mswebrtc\build\windows10\libmswebrtc\libmswebrtc.vcxproj">
<Project>{878cf9d3-9761-479e-a715-a1de9f99cb78}</Project>
</ProjectReference>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{d30cbfe0-beff-4925-9bad-9380f9bfcf90}</ProjectGuid>
<Keyword>WindowsRuntimeComponent</Keyword>
<ProjectName>Linphone.Core</ProjectName>
<RootNamespace>Linphone.Core</RootNamespace>
<DefaultLanguage>en-US</DefaultLanguage>
<MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion>
<AppContainerApplication>true</AppContainerApplication>
<ApplicationType>Windows Store</ApplicationType>
<ApplicationTypeRevision>8.2</ApplicationTypeRevision>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<WholeProgramOptimization>true</WholeProgramOptimization>
<PlatformToolset>v140</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup>
<GenerateManifest>false</GenerateManifest>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Debug'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PreprocessorDefinitions>IN_LINPHONE;_WINRT_DLL;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>28204</DisableSpecificWarnings>
<AdditionalIncludeDirectories>$(ProjectDir)..\submodules\linphone;$(ProjectDir)..\submodules\linphone\mediastreamer2\include;$(ProjectDir)..\submodules\linphone\oRTP\include;$(ProjectDir)..\submodules\belle-sip\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='Release'">
<ClCompile>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PreprocessorDefinitions>IN_LINPHONE;_WINRT_DLL;NDEBUG;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalUsingDirectories>$(WindowsSDK_WindowsMetadata);$(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<AdditionalOptions>/bigobj %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>28204</DisableSpecificWarnings>
<AdditionalIncludeDirectories>$(ProjectDir)..\submodules\linphone;$(ProjectDir)..\submodules\linphone\mediastreamer2\include;$(ProjectDir)..\submodules\linphone\oRTP\include;$(ProjectDir)..\submodules\belle-sip\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<IgnoreAllDefaultLibraries>false</IgnoreAllDefaultLibraries>
</Link>
</ItemDefinitionGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
\ No newline at end of file
This diff is collapsed.
/*
Globals.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 <roapi.h>
namespace Linphone
{
namespace Core
{
ref class CallController;
ref class LinphoneCoreFactory;
ref class LinphoneCore;
ref class BackgroundModeLogger;
/// <summary>
/// Singleton container used to hold global singletons and background process-wide objects.
/// Also used to start out of process server, allowing the UI process managed code to instantiate WinRT objects in this process.
/// </summary>
public ref class Globals sealed
{
public:
/// <summary>
/// Starts the out of process server, allowing the UI process to instantiate WinRT objects in this process.
/// </summary>
void StartServer(const Platform::Array<Platform::String^>^ outOfProcServerClassNames);
/// <summary>
///Returns the id of the background process (HeadlessHost)
/// </summary>
static unsigned int GetCurrentProcessId();
static Platform::String^ GetUiDisconnectedEventName(unsigned int backgroundProcessId);
static Platform::String^ GetBackgroundProcessReadyEventName(unsigned int backgroundProcessId);
/// <summary>
/// Gets the instance of the Globals class, used to directly access any C++/CX objects from C#
/// </summary>
static property Globals^ Instance
{
Globals^ get();
}
/// <summary>
/// Gets the current instance of LinphoneCoreFactory
/// </summary>
property LinphoneCoreFactory^ LinphoneCoreFactory
{
Linphone::Core::LinphoneCoreFactory^ get();
}
/// <summary>
/// Gets the current instance of LinphoneCore from LinphoneCoreFactory
/// </summary>
property LinphoneCore^ LinphoneCore
{
Linphone::Core::LinphoneCore^ get();
}
/// <summary>
/// Gets the current instance of the logger
/// </summary>
property BackgroundModeLogger^ BackgroundModeLogger
{
Linphone::Core::BackgroundModeLogger^ get();
}
/// <summary>
/// Gets the current instance of the native call controller
/// </summary>
property CallController^ CallController
{
Linphone::Core::CallController^ get();
}
/// <summary>
/// Access the video renderer instance
/// </summary>
property Mediastreamer2::WP8Video::IVideoRenderer^ VideoRenderer
{
Mediastreamer2::WP8Video::IVideoRenderer^ get();
void set(Mediastreamer2::WP8Video::IVideoRenderer^ value);
}
private:
Globals();
~Globals();
static const LPCWSTR noOtherBackgroundProcessEventName;
static const LPCWSTR uiDisconnectedEventName;
static const LPCWSTR backgroundProcessReadyEventName;
static Globals^ singleton;
bool started;
// A cookie that is used to unregister remotely activatable objects in this process
RO_REGISTRATION_COOKIE serverRegistrationCookie;
HANDLE noOtherBackgroundProcessEvent;
HANDLE backgroundReadyEvent;
Linphone::Core::LinphoneCoreFactory^ linphoneCoreFactory;
Linphone::Core::BackgroundModeLogger^ backgroundModeLogger;
Linphone::Core::CallController^ callController;
Mediastreamer2::WP8Video::IVideoRenderer^ videoRenderer;
};
}
}
/*
Globals.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 <roapi.h>
namespace Linphone
{
namespace Core
{
ref class CallController;
ref class LinphoneCoreFactory;
ref class LinphoneCore;
ref class BackgroundModeLogger;
/// <summary>
/// Singleton container used to hold global singletons and background process-wide objects.
/// Also used to start out of process server, allowing the UI process managed code to instantiate WinRT objects in this process.
/// </summary>
public ref class Globals sealed
{
public:
/// <summary>
/// Starts the out of process server, allowing the UI process to instantiate WinRT objects in this process.
/// </summary>
void StartServer(const Platform::Array<Platform::String^>^ outOfProcServerClassNames);
/// <summary>
///Returns the id of the background process (HeadlessHost)
/// </summary>
static unsigned int GetCurrentProcessId();
static Platform::String^ GetUiDisconnectedEventName(unsigned int backgroundProcessId);
static Platform::String^ GetBackgroundProcessReadyEventName(unsigned int backgroundProcessId);
/// <summary>
/// Gets the instance of the Globals class, used to directly access any C++/CX objects from C#
/// </summary>
static property Globals^ Instance
{
Globals^ get();
}
/// <summary>
/// Gets the current instance of LinphoneCoreFactory
/// </summary>
property LinphoneCoreFactory^ LinphoneCoreFactory
{
Linphone::Core::LinphoneCoreFactory^ get();
}
/// <summary>
/// Gets the current instance of LinphoneCore from LinphoneCoreFactory
/// </summary>
property LinphoneCore^ LinphoneCore
{
Linphone::Core::LinphoneCore^ get();
}
/// <summary>
/// Gets the current instance of the logger
/// </summary>
property BackgroundModeLogger^ BackgroundModeLogger
{
Linphone::Core::BackgroundModeLogger^ get();
}
/// <summary>
/// Gets the current instance of the native call controller
/// </summary>
property CallController^ CallController
{
Linphone::Core::CallController^ get();
}
#if 0
/// <summary>
/// Access the video renderer instance
/// </summary>
property Mediastreamer2::WP8Video::IVideoRenderer^ VideoRenderer
{
Mediastreamer2::WP8Video::IVideoRenderer^ get();
void set(Mediastreamer2::WP8Video::IVideoRenderer^ value);
}
#endif
private:
Globals();
~Globals();
static const LPCWSTR noOtherBackgroundProcessEventName;
static const LPCWSTR uiDisconnectedEventName;
static const LPCWSTR backgroundProcessReadyEventName;
static Globals^ singleton;
bool started;
// A cookie that is used to unregister remotely activatable objects in this process
RO_REGISTRATION_COOKIE serverRegistrationCookie;
HANDLE noOtherBackgroundProcessEvent;
HANDLE backgroundReadyEvent;
Linphone::Core::LinphoneCoreFactory^ linphoneCoreFactory;
Linphone::Core::BackgroundModeLogger^ backgroundModeLogger;
Linphone::Core::CallController^ callController;
//Mediastreamer2::WP8Video::IVideoRenderer^ videoRenderer;
};
}
}
/*
LinphoneAddress.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 "ApiLock.h"
#include "LinphoneAddress.h"
#include "Server.h"
Platform::String^ Linphone::Core::LinphoneAddress::DisplayName::get()
{
API_LOCK;
return Linphone::Core::Utils::cctops(linphone_address_get_display_name(this->address));
}
Platform::String^ Linphone::Core::LinphoneAddress::UserName::get()
{
API_LOCK;
return Linphone::Core::Utils::cctops(linphone_address_get_username(this->address));
}
Platform::String^ Linphone::Core::LinphoneAddress::Domain::get()
{
API_LOCK;
return Linphone::Core::Utils::cctops(linphone_address_get_domain(this->address));
}
int Linphone::Core::LinphoneAddress::Port::get()
{
API_LOCK;
return linphone_address_get_port(this->address);
}
Linphone::Core::LinphoneTransport Linphone::Core::LinphoneAddress::Transport::get()
{
API_LOCK;
LinphoneTransportType transport = linphone_address_get_transport(this->address);
switch (transport)
{
case LinphoneTransportUdp:
return LinphoneTransport::LinphoneTransportUDP;
case LinphoneTransportTcp:
return LinphoneTransport::LinphoneTransportTCP;
case LinphoneTransportTls:
return LinphoneTransport::LinphoneTransportTLS;
case LinphoneTransportDtls:
return LinphoneTransport::LinphoneTransportDTLS;
default:
return LinphoneTransport::LinphoneTransportUDP;
}
}
Platform::String^ Linphone::Core::LinphoneAddress::Scheme::get()
{
API_LOCK;
return Linphone::Core::Utils::cctops(linphone_address_get_scheme(this->address));
}
void Linphone::Core::LinphoneAddress::DisplayName::set(Platform::String^ name)
{
API_LOCK;
const char *cc = Linphone::Core::Utils::pstoccs(name);
linphone_address_set_display_name(this->address, cc);
delete(cc);
}
void Linphone::Core::LinphoneAddress::UserName::set(Platform::String^ username)
{
API_LOCK;
const char *cc = Linphone::Core::Utils::pstoccs(username);
linphone_address_set_username(this->address, cc);
delete(cc);
}
void Linphone::Core::LinphoneAddress::Domain::set(Platform::String^ domain)
{
API_LOCK;
const char *cc = Linphone::Core::Utils::pstoccs(domain);
linphone_address_set_domain(this->address, cc);
delete(cc);
}
void Linphone::Core::LinphoneAddress::Port::set(int port)
{
API_LOCK;
linphone_address_set_port(this->address, port);
}
void Linphone::Core::LinphoneAddress::Transport::set(Linphone::Core::LinphoneTransport transport)
{
API_LOCK;
LinphoneTransportType transportType = LinphoneTransportUdp;
if (transport == LinphoneTransport::LinphoneTransportTCP)
{
transportType = LinphoneTransportTcp;
}
else if (transport == LinphoneTransport::LinphoneTransportTLS)
{
transportType = LinphoneTransportTls;
}
else if (transport == LinphoneTransport::LinphoneTransportDTLS)
{
transportType = LinphoneTransportDtls;
}
linphone_address_set_transport(this->address, transportType);
}
void Linphone::Core::LinphoneAddress::Clean()
{
API_LOCK;
linphone_address_clean(this->address);
}
Platform::String^ Linphone::Core::LinphoneAddress::AsString()
{
API_LOCK;
return Linphone::Core::Utils::cctops(linphone_address_as_string(this->address));
}
Platform::String^ Linphone::Core::LinphoneAddress::AsStringUriOnly()
{
API_LOCK;
return Linphone::Core::Utils::cctops(linphone_address_as_string_uri_only(this->address));
}
Platform::String^ Linphone::Core::LinphoneAddress::ToString()
{
return this->AsString();
}
Linphone::Core::LinphoneAddress::LinphoneAddress(::LinphoneAddress *addr) :
address(addr)
{
}
Linphone::Core::LinphoneAddress::LinphoneAddress(const char *uri)
{
this->address = linphone_address_new(uri);
}
Linphone::Core::LinphoneAddress::~LinphoneAddress()
{
/*
LinphoneAddress.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 "ApiLock.h"
#include "LinphoneAddress.h"
#include "Server.h"
Platform::String^ Linphone::Core::LinphoneAddress::DisplayName::get()
{
API_LOCK;
return Linphone::Core::Utils::cctops(linphone_address_get_display_name(this->address));
}
Platform::String^ Linphone::Core::LinphoneAddress::UserName::get()
{
API_LOCK;
return Linphone::Core::Utils::cctops(linphone_address_get_username(this->address));
}
Platform::String^ Linphone::Core::LinphoneAddress::Domain::get()
{
API_LOCK;
return Linphone::Core::Utils::cctops(linphone_address_get_domain(this->address));
}
int Linphone::Core::LinphoneAddress::Port::get()
{
API_LOCK;
return linphone_address_get_port(this->address);
}
Linphone::Core::LinphoneTransport Linphone::Core::LinphoneAddress::Transport::get()
{
API_LOCK;
LinphoneTransportType transport = linphone_address_get_transport(this->address);
switch (transport)
{
case LinphoneTransportUdp:
return LinphoneTransport::LinphoneTransportUDP;
case LinphoneTransportTcp:
return LinphoneTransport::LinphoneTransportTCP;
case LinphoneTransportTls:
return LinphoneTransport::LinphoneTransportTLS;
case LinphoneTransportDtls:
return LinphoneTransport::LinphoneTransportDTLS;
default:
return LinphoneTransport::LinphoneTransportUDP;
}
}
Platform::String^ Linphone::Core::LinphoneAddress::Scheme::get()
{
API_LOCK;
return Linphone::Core::Utils::cctops(linphone_address_get_scheme(this->address));
}
void Linphone::Core::LinphoneAddress::DisplayName::set(Platform::String^ name)
{
API_LOCK;
const char *cc = Linphone::Core::Utils::pstoccs(name);
linphone_address_set_display_name(this->address, cc);
delete(cc);
}
void Linphone::Core::LinphoneAddress::UserName::set(Platform::String^ username)
{
API_LOCK;
const char *cc = Linphone::Core::Utils::pstoccs(username);
linphone_address_set_username(this->address, cc);
delete(cc);
}
void Linphone::Core::LinphoneAddress::Domain::set(Platform::String^ domain)
{
API_LOCK;
const char *cc = Linphone::Core::Utils::pstoccs(domain);
linphone_address_set_domain(this->address, cc);
delete(cc);
}
void Linphone::Core::LinphoneAddress::Port::set(int port)
{
API_LOCK;
linphone_address_set_port(this->address, port);
}
void Linphone::Core::LinphoneAddress::Transport::set(Linphone::Core::LinphoneTransport transport)
{
API_LOCK;
LinphoneTransportType transportType = LinphoneTransportUdp;
if (transport == LinphoneTransport::LinphoneTransportTCP)
{
transportType = LinphoneTransportTcp;
}
else if (transport == LinphoneTransport::LinphoneTransportTLS)
{
transportType = LinphoneTransportTls;
}
else if (transport == LinphoneTransport::LinphoneTransportDTLS)
{
transportType = LinphoneTransportDtls;
}
linphone_address_set_transport(this->address, transportType);
}
void Linphone::Core::LinphoneAddress::Clean()
{
API_LOCK;
linphone_address_clean(this->address);
}
Platform::String^ Linphone::Core::LinphoneAddress::AsString()
{
API_LOCK;
return Linphone::Core::Utils::cctops(linphone_address_as_string(this->address));
}