Commit 436bc777 authored by Ghislain MARY's avatar Ghislain MARY

Put Transports, VideoPolicy and VideoSize classes in their own files.

parent 1c22828c
......@@ -3,6 +3,7 @@
#include "LinphoneCallParams.h"
#include "LinphoneCore.h"
#include "Server.h"
#include "VideoPolicy.h"
using namespace Linphone::Core;
using namespace Platform;
......
......@@ -153,8 +153,11 @@
<ClInclude Include="Enums.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>
<ClCompile Include="ApiLock.cpp" />
......@@ -174,8 +177,11 @@
<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>
<None Include="OopServerRegistrationHelper.exe">
......
......@@ -12,6 +12,9 @@
#include "CallController.h"
#include "Tunnel.h"
#include "Server.h"
#include "Transports.h"
#include "VideoPolicy.h"
#include "VideoSize.h"
#include "Enums.h"
#include "ApiLock.h"
#include <collection.h>
......@@ -25,143 +28,6 @@ using namespace Windows::Phone::Media::Devices;
using namespace Windows::Phone::Networking::Voip;
using namespace Windows::System::Threading;
Linphone::Core::Transports::Transports() :
udp(5060),
tcp(0),
tls(0)
{
}
Linphone::Core::Transports::Transports(int udp_port, int tcp_port, int tls_port) :
udp(udp_port),
tcp(tcp_port),
tls(tls_port)
{
}
Linphone::Core::Transports::Transports(Linphone::Core::Transports^ t) :
udp(t->UDP),
tcp(t->TCP),
tls(t->TLS)
{
}
int Linphone::Core::Transports::UDP::get()
{
return udp;
}
void Linphone::Core::Transports::UDP::set(int value)
{
this->udp = value;
this->tcp = 0;
this->tls = 0;
}
int Linphone::Core::Transports::TCP::get()
{
return tcp;
}
void Linphone::Core::Transports::TCP::set(int value)
{
this->udp = 0;
this->tcp = value;
this->tls = 0;
}
int Linphone::Core::Transports::TLS::get()
{
return tls;
}
void Linphone::Core::Transports::TLS::set(int value)
{
this->udp = 0;
this->tcp = 0;
this->tls = value;
}
Platform::String^ Linphone::Core::Transports::ToString()
{
return "udp[" + udp + "] tcp[" + tcp + "] tls[" + tls + "]";
}
Linphone::Core::VideoPolicy::VideoPolicy() :
automaticallyInitiate(true), automaticallyAccept(true)
{
}
Linphone::Core::VideoPolicy::VideoPolicy(bool automaticallyInitiate, bool automaticallyAccept) :
automaticallyInitiate(automaticallyInitiate), automaticallyAccept(automaticallyAccept)
{
}
bool Linphone::Core::VideoPolicy::AutomaticallyInitiate::get()
{
return automaticallyInitiate;
}
void Linphone::Core::VideoPolicy::AutomaticallyInitiate::set(bool value)
{
automaticallyInitiate = value;
}
bool Linphone::Core::VideoPolicy::AutomaticallyAccept::get()
{
return automaticallyAccept;
}
void Linphone::Core::VideoPolicy::AutomaticallyAccept::set(bool value)
{
automaticallyAccept = value;
}
Linphone::Core::VideoSize::VideoSize(int width, int height) :
width(width), height(height), name("")
{
}
Linphone::Core::VideoSize::VideoSize(int width, int height, Platform::String^ name) :
width(width), height(height), name(name)
{
}
int Linphone::Core::VideoSize::Width::get()
{
return width;
}
void Linphone::Core::VideoSize::Width::set(int value)
{
width = value;
}
int Linphone::Core::VideoSize::Height::get()
{
return height;
}
void Linphone::Core::VideoSize::Height::set(int value)
{
height = value;
}
Platform::String^ Linphone::Core::VideoSize::Name::get()
{
return name;
}
void Linphone::Core::VideoSize::Name::set(Platform::String^ value)
{
name = value;
}
void Linphone::Core::LinphoneCore::SetLogLevel(OutputTraceLevel logLevel)
{
......
......@@ -29,141 +29,10 @@ namespace Linphone
ref class LinphoneChatRoom;
ref class PayloadType;
ref class LpConfig;
ref class Transports;
ref class Tunnel;
/// <summary>
/// Signaling transports ports
/// </summary>
public ref class Transports sealed
{
public:
/// <summary>
/// Gets a string representation of the Transports object.
/// </summary>
/// <returns>A string representation of the Transports object</returns>
Platform::String^ ToString();
/// <summary>
/// UDP port of the Transports object.
/// </summary>
property int UDP
{
int get();
void set(int value);
}
/// <summary>
/// TCP port of the Transports object.
/// </summary>
property int TCP
{
int get();
void set(int value);
}
/// <summary>
/// TLS port of the Transports object.
/// </summary>
property int TLS
{
int get();
void set(int value);
}
private:
friend class Linphone::Core::Utils;
friend ref class Linphone::Core::LinphoneCoreFactory;
friend ref class Linphone::Core::LinphoneCore;
Transports();
Transports(int udp_port, int tcp_port, int tls_port);
Transports(Transports^ t);
int udp;
int tcp;
int tls;
};
/// <summary>
/// Class describing policy regarding video streams establishments.
/// </summary>
public ref class VideoPolicy sealed
{
public:
/// <summary>
/// Whether video shall be automatically proposed for outgoing calls.
/// </summary>
property bool AutomaticallyInitiate
{
bool get();
void set(bool value);
}
/// <summary>
/// Whether video shall be automatically accepted for incoming calls.
/// </summary>
property bool AutomaticallyAccept
{
bool get();
void set(bool value);
}
private:
friend class Linphone::Core::Utils;
friend ref class Linphone::Core::LinphoneCoreFactory;
friend ref class Linphone::Core::LinphoneCore;
VideoPolicy();
VideoPolicy(bool automaticallyInitiate, bool automaticallyAccept);
bool automaticallyInitiate;
bool automaticallyAccept;
};
/// <summary>
/// Class describing a video size.
/// </summary>
public ref class VideoSize sealed
{
public:
/// <summary>
/// The video size width (eg. 640).
/// </summary>
property int Width
{
int get();
void set(int value);
}
/// <summary>
/// The video size height (eg. 480).
/// </summary>
property int Height
{
int get();
void set(int value);
}
/// <summary>
/// The video size name (eg. vga).
/// </summary>
property Platform::String^ Name
{
Platform::String^ get();
void set(Platform::String^ value);
}
private:
friend class Linphone::Core::Utils;
friend ref class Linphone::Core::LinphoneCoreFactory;
friend ref class Linphone::Core::LinphoneCore;
VideoSize(int width, int height);
VideoSize(int width, int height, Platform::String^ name);
int width;
int height;
Platform::String^ name;
};
ref class VideoPolicy;
ref class VideoSize;
/// <summary>
/// Main object created by LinphoneCoreFactory::CreateLinphoneCore.
......
......@@ -5,6 +5,9 @@
#include "LinphoneAddress.h"
#include "LpConfig.h"
#include "Server.h"
#include "Transports.h"
#include "VideoPolicy.h"
#include "VideoSize.h"
using namespace Linphone::Core;
using namespace Platform;
......
#include "Transports.h"
Linphone::Core::Transports::Transports() :
udp(5060),
tcp(0),
tls(0)
{
}
Linphone::Core::Transports::Transports(int udp_port, int tcp_port, int tls_port) :
udp(udp_port),
tcp(tcp_port),
tls(tls_port)
{
}
Linphone::Core::Transports::Transports(Linphone::Core::Transports^ t) :
udp(t->UDP),
tcp(t->TCP),
tls(t->TLS)
{
}
int Linphone::Core::Transports::UDP::get()
{
return udp;
}
void Linphone::Core::Transports::UDP::set(int value)
{
this->udp = value;
this->tcp = 0;
this->tls = 0;
}
int Linphone::Core::Transports::TCP::get()
{
return tcp;
}
void Linphone::Core::Transports::TCP::set(int value)
{
this->udp = 0;
this->tcp = value;
this->tls = 0;
}
int Linphone::Core::Transports::TLS::get()
{
return tls;
}
void Linphone::Core::Transports::TLS::set(int value)
{
this->udp = 0;
this->tcp = 0;
this->tls = value;
}
Platform::String^ Linphone::Core::Transports::ToString()
{
return "udp[" + udp + "] tcp[" + tcp + "] tls[" + tls + "]";
}
#pragma once
#include "Utils.h"
namespace Linphone
{
namespace Core
{
ref class LinphoneCoreFactory;
ref class LinphoneCore;
/// <summary>
/// Signaling transports ports
/// </summary>
public ref class Transports sealed
{
public:
/// <summary>
/// Gets a string representation of the Transports object.
/// </summary>
/// <returns>A string representation of the Transports object</returns>
Platform::String^ ToString();
/// <summary>
/// UDP port of the Transports object.
/// </summary>
property int UDP
{
int get();
void set(int value);
}
/// <summary>
/// TCP port of the Transports object.
/// </summary>
property int TCP
{
int get();
void set(int value);
}
/// <summary>
/// TLS port of the Transports object.
/// </summary>
property int TLS
{
int get();
void set(int value);
}
private:
friend class Linphone::Core::Utils;
friend ref class Linphone::Core::LinphoneCoreFactory;
friend ref class Linphone::Core::LinphoneCore;
Transports();
Transports(int udp_port, int tcp_port, int tls_port);
Transports(Transports^ t);
int udp;
int tcp;
int tls;
};
}
}
\ No newline at end of file
......@@ -10,6 +10,9 @@
#include "LinphoneChatRoom.h"
#include "LpConfig.h"
#include "PayloadType.h"
#include "Transports.h"
#include "VideoPolicy.h"
#include "VideoSize.h"
#include <Stringapiset.h>
#include <time.h>
......
#include "VideoPolicy.h"
Linphone::Core::VideoPolicy::VideoPolicy() :
automaticallyInitiate(true), automaticallyAccept(true)
{
}
Linphone::Core::VideoPolicy::VideoPolicy(bool automaticallyInitiate, bool automaticallyAccept) :
automaticallyInitiate(automaticallyInitiate), automaticallyAccept(automaticallyAccept)
{
}
bool Linphone::Core::VideoPolicy::AutomaticallyInitiate::get()
{
return automaticallyInitiate;
}
void Linphone::Core::VideoPolicy::AutomaticallyInitiate::set(bool value)
{
automaticallyInitiate = value;
}
bool Linphone::Core::VideoPolicy::AutomaticallyAccept::get()
{
return automaticallyAccept;
}
void Linphone::Core::VideoPolicy::AutomaticallyAccept::set(bool value)
{
automaticallyAccept = value;
}
\ No newline at end of file
#pragma once
#include "Utils.h"
namespace Linphone
{
namespace Core
{
ref class LinphoneCoreFactory;
ref class LinphoneCore;
/// <summary>
/// Class describing policy regarding video streams establishments.
/// </summary>
public ref class VideoPolicy sealed
{
public:
/// <summary>
/// Whether video shall be automatically proposed for outgoing calls.
/// </summary>
property bool AutomaticallyInitiate
{
bool get();
void set(bool value);
}
/// <summary>
/// Whether video shall be automatically accepted for incoming calls.
/// </summary>
property bool AutomaticallyAccept
{
bool get();
void set(bool value);
}
private:
friend class Linphone::Core::Utils;
friend ref class Linphone::Core::LinphoneCoreFactory;
friend ref class Linphone::Core::LinphoneCore;
VideoPolicy();
VideoPolicy(bool automaticallyInitiate, bool automaticallyAccept);
bool automaticallyInitiate;
bool automaticallyAccept;
};
}
}
\ No newline at end of file
#include "VideoSize.h"
Linphone::Core::VideoSize::VideoSize(int width, int height) :
width(width), height(height), name("")
{
}
Linphone::Core::VideoSize::VideoSize(int width, int height, Platform::String^ name) :
width(width), height(height), name(name)
{
}
int Linphone::Core::VideoSize::Width::get()
{
return width;
}
void Linphone::Core::VideoSize::Width::set(int value)
{
width = value;
}
int Linphone::Core::VideoSize::Height::get()
{
return height;
}
void Linphone::Core::VideoSize::Height::set(int value)
{
height = value;
}
Platform::String^ Linphone::Core::VideoSize::Name::get()
{
return name;
}
void Linphone::Core::VideoSize::Name::set(Platform::String^ value)
{
name = value;
}
\ No newline at end of file
#pragma once
#include "Utils.h"
namespace Linphone
{
namespace Core
{
ref class LinphoneCoreFactory;
ref class LinphoneCore;
/// <summary>
/// Class describing a video size.
/// </summary>
public ref class VideoSize sealed
{
public:
/// <summary>
/// The video size width (eg. 640).
/// </summary>
property int Width
{
int get();
void set(int value);
}
/// <summary>
/// The video size height (eg. 480).
/// </summary>
property int Height
{
int get();
void set(int value);
}
/// <summary>
/// The video size name (eg. vga).
/// </summary>
property Platform::String^ Name
{
Platform::String^ get();
void set(Platform::String^ value);
}
private:
friend class Linphone::Core::Utils;
friend ref class Linphone::Core::LinphoneCoreFactory;
friend ref class Linphone::Core::LinphoneCore;
VideoSize(int width, int height);
VideoSize(int width, int height, Platform::String^ name);
int width;
int height;
Platform::String^ name;
};
}
}
\ No newline at end of file
......@@ -60,13 +60,11 @@
<ActivatableClass ActivatableClassId="Linphone.Core.BackgroundModeLogger" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.IncomingCallViewDismissedCallback" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.CallController" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.Transports" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.VideoPolicy" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.VideoSize" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.LinphoneCore" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.LinphoneCall" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.LinphoneCallParams" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.Globals" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.VideoPolicy" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.LinphoneAddress" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.LinphoneAuthInfo" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.LinphoneCallStats" ThreadingModel="MTA" />
......@@ -78,6 +76,8 @@
<ActivatableClass ActivatableClassId="Linphone.Core.LpConfig" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.TunnelConfig" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.Tunnel" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.Transports" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.VideoSize" ThreadingModel="MTA" />
</InProcessServer>
<OutOfProcessServer ServerName="Linphone.Core">
<Path>Linphone.Core.DLL</Path>
......@@ -91,9 +91,6 @@
<Interface Name="Linphone.Core.__ILinphoneCoreFactoryPublicNonVirtuals" InterfaceId="{C83B6E96-A239-311E-BD2B-880114A4E240}" />
<Interface Name="Linphone.Core.__IBackgroundModeLoggerPublicNonVirtuals" InterfaceId="{5A14F5CD-E159-36A3-A7EB-AC29F8CF301C}" />
<Interface Name="Linphone.Core.__ICallControllerPublicNonVirtuals" InterfaceId="{C50D71F8-F4D8-3871-ADDA-739A4E312CED}" />
<Interface Name="Linphone.Core.__ITransportsPublicNonVirtuals" InterfaceId="{9CF934BB-9476-3105-B0DF-49E2F4B2A580}" />
<Interface Name="Linphone.Core.__IVideoPolicyPublicNonVirtuals" InterfaceId="{920ACF67-0C7A-3E4E-B50F-A3FF66C79F69}" />
<Interface Name="Linphone.Core.__IVideoSizePublicNonVirtuals" InterfaceId="{2F218B89-D6C7-30F0-A705-C69644DB79E9}" />
<Interface Name="Linphone.Core.__ILinphoneCorePublicNonVirtuals" InterfaceId="{5D15EB8C-4443-3BC3-BC3D-A319DDE8A2BE}" />
<Interface Name="Linphone.Core.__ILinphoneCoreStatics" InterfaceId="{27C5C871-79CD-3BEB-ACED-BF201D8ACC7B}" />
<Interface Name="Linphone.Core.__ILinphoneCallPublicNonVirtuals" InterfaceId="{0985A9C4-838F-3350-AA92-3D22BCBA35D9}" />
......@@ -101,6 +98,7 @@
<Interface Name="Linphone.Core.__IGlobalsPublicNonVirtuals" InterfaceId="{01600449-19D0-3E52-80E3-382A2C93CBB1}" />
<Interface Name="Linphone.Core.__IGlobalsStatics" InterfaceId="{828E0FFB-4077-39EF-A334-6F19365E4FFE}" />
<Interface Name="Linphone.Core.OutOfProcess.__IServerPublicNonVirtuals" InterfaceId="{46DDE636-87D1-3A06-9D4A-D0753804368A}" />
<Interface Name="Linphone.Core.__IVideoPolicyPublicNonVirtuals" InterfaceId="{920ACF67-0C7A-3E4E-B50F-A3FF66C79F69}" />
<Interface Name="Linphone.Core.__ILinphoneAddressPublicNonVirtuals" InterfaceId="{1EB65211-A8E9-3139-96CA-CD6CD0348372}" />
<Interface Name="Linphone.Core.__ILinphoneAuthInfoPublicNonVirtuals" InterfaceId="{C7039DF8-D910-3633-A2E1-FB0B176790C0}" />
<Interface Name="Linphone.Core.__ILinphoneCallStatsPublicNonVirtuals" InterfaceId="{87BCE67E-109C-3429-9255-76FC496C3382}" />
......@@ -114,6 +112,8 @@
<Interface Name="Linphone.Core.__ITunnelConfigPublicNonVirtuals" InterfaceId="{68700A9B-6D1E-3167-B4AA-626894473735}" />
<Interface Name="Linphone.Core.__ITunnelConfigFactory" InterfaceId="{EE452863-F4DB-3CAF-B716-854C8EF40E25}" />
<Interface Name="Linphone.Core.__ITunnelPublicNonVirtuals" InterfaceId="{A04D28B9-616C-3870-B1AA-31747C3704F8}" />
<Interface Name="Linphone.Core.__ITransportsPublicNonVirtuals" InterfaceId="{9CF934BB-9476-3105-B0DF-49E2F4B2A580}" />
<Interface Name="Linphone.Core.__IVideoSizePublicNonVirtuals" InterfaceId="{2F218B89-D6C7-30F0-A705-C69644DB79E9}" />
</ProxyStub>
</ActivatableClasses>
<ScreenResolutions>
......
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