CallParams.h 3.87 KB
Newer Older
1
/*
2
CallParams.h
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
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 "ApiLock.h"
20 21
#include "Core.h"

22

23
namespace BelledonneCommunications
24
{
25
	namespace Linphone
26
	{
27
		namespace Native
28
		{
29
			ref class PayloadType;
30 31

			/// <summary>
32 33
			/// This object contains various call related parameters.
			/// It can be used to retrieve parameters from a currently running call or modify the call's caracteristics dynamically.
34
			/// </summary>
35
			public ref class CallParams sealed
36
			{
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141
			public:
				/// <summary>
				/// Sets the audio bandwidth in kbits/s (0 to disable limitation).
				/// </summary>
				property int AudioBandwidthLimit
				{
					int get();
					void set(int value);
				}

				/// <summary>
				/// Set the audio stream direction.
				/// </summary>
				property MediaDirection AudioDirection
				{
					MediaDirection get();
					void set(MediaDirection value);
				}

				/// <summary>
				/// Indicates low bandwidth mode.
				/// Configuring a call to low bandwidth mode will result in the core to activate several settings for the call in order to ensure that bitrate usage is lowered to the minimum possible.
				/// Tyically, ptime (packetization time) will be increased, audio codecs's output bitrate will be targetted to 20kbits/s provided that it is achievable by the codec selected after SDP handshake.
				/// Video is automatically disabled.
				/// </summary>
				property Platform::Boolean IsLowBandwidthEnabled
				{
					Platform::Boolean get();
					void set(Platform::Boolean value);
				}

				/// <summary>
				/// Enable or disable video.
				/// </summary>
				property Platform::Boolean IsVideoEnabled
				{
					Platform::Boolean get();
					void set(Platform::Boolean value);
				}

				/// <summary>
				/// Returns the MediaEncryption of the call (None, SRTP or ZRTP).
				/// </summary>
				property MediaEncryption MediaEncryption
				{
					BelledonneCommunications::Linphone::Native::MediaEncryption get();
					void set(BelledonneCommunications::Linphone::Native::MediaEncryption value);
				}

				/// <summary>
				/// Returns the size of the video being received.
				/// </summary>
				property VideoSize^ ReceivedVideoSize
				{
					VideoSize^ get();
				}

				/// <summary>
				/// Returns the size of the video being sent.
				/// </summary>
				property VideoSize^ SentVideoSize
				{
					VideoSize^ get();
				}

				/// <summary>
				/// Returns the PayloadType currently in use for the audio stream.
				/// </summary>
				property PayloadType^ UsedAudioCodec
				{
					PayloadType^ get();
				}

				/// <summary>
				/// Returns the PayloadType currently in use for the video stream.
				/// </summary>
				property PayloadType^ UsedVideoCodec
				{
					PayloadType^ get();
				}

				/// <summary>
				/// Set the video stream direction.
				/// </summary>
				property MediaDirection VideoDirection
				{
					MediaDirection get();
					void set(MediaDirection value);
				}

				/// <summary>
				/// Copy an existing CallParams object to a new CallParams object.
				/// </summary>
				CallParams^ Copy();

			private:
				friend class Utils;
				friend ref class Core;

				CallParams(::LinphoneCallParams* params);
				~CallParams();

				::LinphoneCallParams *params;
			};
		}
142
	}
143
}