Transports.h 2.62 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
/*
Transports.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
14
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
15 16
*/

17 18 19 20
#pragma once

#include "Utils.h"

21
namespace BelledonneCommunications
22
{
23
	namespace Linphone
24
	{
25
		namespace Native
26
		{
27
			ref class LinphoneCore;
28 29

			/// <summary>
30
			/// Signaling transports ports
31
			/// </summary>
32 33 34 35 36 37 38 39
			public ref class Transports sealed
			{
			public:
				/// <summary>
				/// Creates a default Transports object (using the UDP 5060 port).
				/// </summary>
				/// <returns>The created Transports</returns>
				Transports();
40

41 42 43 44 45 46 47 48
				/// <summary>
				/// Creates a Transports object specifying the ports to use.
				/// </summary>
				/// <param name="udp_port">The UDP port to use (0 to disable)</param>
				/// <param name="tcp_port">The TCP port to use (0 to disable)</param>
				/// <param name="tls_port">The TLS port to use (0 to disable)</param>
				/// <returns>The created Transports</returns>
				Transports(int udp_port, int tcp_port, int tls_port);
49

50 51 52 53 54 55
				/// <summary>
				/// Clones a Transports object.
				/// </summary>
				/// <param name="t">The Transports object to clone</param>
				/// <returns>The cloned Transports</returns>
				Transports(Transports^ t);
56

57 58 59 60 61 62 63 64
				/// <summary>
				/// UDP port of the Transports object.
				/// </summary>
				property int UDP
				{
					int get();
					void set(int value);
				}
65

66 67 68 69 70 71 72 73
				/// <summary>
				/// TCP port of the Transports object.
				/// </summary>
				property int TCP
				{
					int get();
					void set(int value);
				}
74

75 76 77 78 79 80 81 82 83 84 85 86 87 88
				/// <summary>
				/// TLS port of the Transports object.
				/// </summary>
				property int TLS
				{
					int get();
					void set(int value);
				}

				/// <summary>
				/// Gets a string representation of the Transports object.
				/// </summary>
				/// <returns>A string representation of the Transports object</returns>
				virtual Platform::String^ ToString() override;
89

90 91 92
			private:
				friend class Utils;
				friend ref class LinphoneCore;
93

94 95 96 97 98
				int udp;
				int tcp;
				int tls;
			};
		}
99 100
	}
}