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 @@ ...@@ -3,6 +3,7 @@
#include "LinphoneCallParams.h" #include "LinphoneCallParams.h"
#include "LinphoneCore.h" #include "LinphoneCore.h"
#include "Server.h" #include "Server.h"
#include "VideoPolicy.h"
using namespace Linphone::Core; using namespace Linphone::Core;
using namespace Platform; using namespace Platform;
......
...@@ -153,8 +153,11 @@ ...@@ -153,8 +153,11 @@
<ClInclude Include="Enums.h" /> <ClInclude Include="Enums.h" />
<ClInclude Include="PayloadType.h" /> <ClInclude Include="PayloadType.h" />
<ClInclude Include="Server.h" /> <ClInclude Include="Server.h" />
<ClInclude Include="Transports.h" />
<ClInclude Include="Tunnel.h" /> <ClInclude Include="Tunnel.h" />
<ClInclude Include="Utils.h" /> <ClInclude Include="Utils.h" />
<ClInclude Include="VideoPolicy.h" />
<ClInclude Include="VideoSize.h" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="ApiLock.cpp" /> <ClCompile Include="ApiLock.cpp" />
...@@ -174,8 +177,11 @@ ...@@ -174,8 +177,11 @@
<ClCompile Include="LinphoneProxyConfig.cpp" /> <ClCompile Include="LinphoneProxyConfig.cpp" />
<ClCompile Include="LpConfig.cpp" /> <ClCompile Include="LpConfig.cpp" />
<ClCompile Include="PayloadType.cpp" /> <ClCompile Include="PayloadType.cpp" />
<ClCompile Include="Transports.cpp" />
<ClCompile Include="Tunnel.cpp" /> <ClCompile Include="Tunnel.cpp" />
<ClCompile Include="Utils.cpp" /> <ClCompile Include="Utils.cpp" />
<ClCompile Include="VideoPolicy.cpp" />
<ClCompile Include="VideoSize.cpp" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<None Include="OopServerRegistrationHelper.exe"> <None Include="OopServerRegistrationHelper.exe">
......
...@@ -12,6 +12,9 @@ ...@@ -12,6 +12,9 @@
#include "CallController.h" #include "CallController.h"
#include "Tunnel.h" #include "Tunnel.h"
#include "Server.h" #include "Server.h"
#include "Transports.h"
#include "VideoPolicy.h"
#include "VideoSize.h"
#include "Enums.h" #include "Enums.h"
#include "ApiLock.h" #include "ApiLock.h"
#include <collection.h> #include <collection.h>
...@@ -25,143 +28,6 @@ using namespace Windows::Phone::Media::Devices; ...@@ -25,143 +28,6 @@ using namespace Windows::Phone::Media::Devices;
using namespace Windows::Phone::Networking::Voip; using namespace Windows::Phone::Networking::Voip;
using namespace Windows::System::Threading; 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) void Linphone::Core::LinphoneCore::SetLogLevel(OutputTraceLevel logLevel)
{ {
......
...@@ -29,141 +29,10 @@ namespace Linphone ...@@ -29,141 +29,10 @@ namespace Linphone
ref class LinphoneChatRoom; ref class LinphoneChatRoom;
ref class PayloadType; ref class PayloadType;
ref class LpConfig; ref class LpConfig;
ref class Transports;
ref class Tunnel; ref class Tunnel;
ref class VideoPolicy;
/// <summary> ref class VideoSize;
/// 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;
};
/// <summary> /// <summary>
/// Main object created by LinphoneCoreFactory::CreateLinphoneCore. /// Main object created by LinphoneCoreFactory::CreateLinphoneCore.
...@@ -1102,15 +971,15 @@ namespace Linphone ...@@ -1102,15 +971,15 @@ namespace Linphone
/// </summary> /// </summary>
void SetDeviceRotation(int rotation); void SetDeviceRotation(int rotation);
/// <summary> /// <summary>
/// Notifies the system that the call needs to be muted/unmuted. /// Notifies the system that the call needs to be muted/unmuted.
/// </summary> /// </summary>
/// <param name="isMuted">The new mute state</param> /// <param name="isMuted">The new mute state</param>
void NotifyMute(bool isMuted); void NotifyMute(bool isMuted);
/// <summary> /// <summary>
/// Sets the path to the database file used to store chat messages /// Sets the path to the database file used to store chat messages
/// </summary> /// </summary>
/// <param name="chatDatabasePath">The path to the database file</param> /// <param name="chatDatabasePath">The path to the database file</param>
void SetChatDatabasePath(Platform::String^ chatDatabasePath); void SetChatDatabasePath(Platform::String^ chatDatabasePath);
......
...@@ -5,6 +5,9 @@ ...@@ -5,6 +5,9 @@
#include "LinphoneAddress.h" #include "LinphoneAddress.h"
#include "LpConfig.h" #include "LpConfig.h"
#include "Server.h" #include "Server.h"
#include "Transports.h"
#include "VideoPolicy.h"
#include "VideoSize.h"
using namespace Linphone::Core; using namespace Linphone::Core;
using namespace Platform; 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 @@ ...@@ -10,6 +10,9 @@
#include "LinphoneChatRoom.h" #include "LinphoneChatRoom.h"
#include "LpConfig.h" #include "LpConfig.h"
#include "PayloadType.h" #include "PayloadType.h"
#include "Transports.h"
#include "VideoPolicy.h"
#include "VideoSize.h"
#include <Stringapiset.h> #include <Stringapiset.h>
#include <time.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 @@ ...@@ -60,13 +60,11 @@
<ActivatableClass ActivatableClassId="Linphone.Core.BackgroundModeLogger" ThreadingModel="MTA" /> <ActivatableClass ActivatableClassId="Linphone.Core.BackgroundModeLogger" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.IncomingCallViewDismissedCallback" ThreadingModel="MTA" /> <ActivatableClass ActivatableClassId="Linphone.Core.IncomingCallViewDismissedCallback" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.CallController" 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.LinphoneCore" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.LinphoneCall" ThreadingModel="MTA" /> <ActivatableClass ActivatableClassId="Linphone.Core.LinphoneCall" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.LinphoneCallParams" ThreadingModel="MTA" /> <ActivatableClass ActivatableClassId="Linphone.Core.LinphoneCallParams" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.Globals" 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.LinphoneAddress" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.LinphoneAuthInfo" ThreadingModel="MTA" /> <ActivatableClass ActivatableClassId="Linphone.Core.LinphoneAuthInfo" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.LinphoneCallStats" ThreadingModel="MTA" /> <ActivatableClass ActivatableClassId="Linphone.Core.LinphoneCallStats" ThreadingModel="MTA" />
...@@ -78,6 +76,8 @@ ...@@ -78,6 +76,8 @@
<ActivatableClass ActivatableClassId="Linphone.Core.LpConfig" ThreadingModel="MTA" /> <ActivatableClass ActivatableClassId="Linphone.Core.LpConfig" ThreadingModel="MTA" />
<ActivatableClass ActivatableClassId="Linphone.Core.TunnelConfig" ThreadingModel="MTA" />