CoreListener.h 5.75 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13
/*
CoreListener.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 "Enums.h"

21
namespace BelledonneCommunications
22
{
23
	namespace Linphone
24
	{
25
		namespace Native
26
		{
27 28 29 30 31
			ref class Call;
			ref class CallStats;
			ref class ChatMessage;
			ref class ChatRoom;
			ref class ProxyConfig;
32 33

			/// <summary>
34
			/// Definition of the CoreListener interface.
35
			/// </summary>
36
			[Windows::Foundation::Metadata::WebHostHidden]
37 38 39 40 41 42 43 44 45
			public interface class CoreListener
			{
			public:
				/// <summary>
				/// Callback method called when authentication information are requested.
				/// </summary>
				/// <param name="realm">The realm for which authentication information are requested</param>
				/// <param name="username">The username for which authentication information are requested</param>
				void AuthInfoRequested(Platform::String^ realm, Platform::String^ username, Platform::String^ domain);
46

47 48 49 50 51 52 53
				/// <summary>
				/// Callback method called when the encryption of a call has changed.
				/// </summary>
				/// <param name="call">The call for which the encryption has changed</param>
				/// <param name="encrypted">A boolean value telling whether the call is encrypted</param>
				/// <param name="authenticationToken">The authentication token for the call if it is encrypted</param>
				void CallEncryptionChanged(Call^ call, Platform::Boolean encrypted, Platform::String^ authenticationToken);
54

55 56 57 58 59 60
				/// <summary>
				/// Callback method called when the state of a call has changed.
				/// </summary>
				/// <param name="call">The call whose state has changed</param>
				/// <param name="state">The new state of the call</param>
				void CallStateChanged(Call^ call, CallState state, Platform::String^ message);
61

62 63 64 65 66 67
				/// <summary>
				/// Callback method called when the statistics of a call have been updated.
				/// </summary>
				/// <param name="call">The call for which the statistics have been updated</param>
				/// <param name="stats">The updated statistics for the call</param>
				void CallStatsUpdated(Call^ call, CallStats^ stats);
68

69 70 71 72 73 74
				/// <summary>
				/// Callback method called when a DTMF is received.
				/// </summary>
				/// <param name="call">The call on which a DTMF has been received</param>
				/// <param name="dtmf">The DTMF that has been received</param>
				void DtmfReceived(Call^ call, char16 dtmf);
75

76 77 78 79 80 81 82
				/// <summary>
				/// Callback method called when the echo canceller calibration finishes.
				/// </summary>
				/// <param name="status">The status of the echo canceller calibration</param>
				/// <param name="delayMs">The echo delay in milliseconds if the status is EcCalibratorStatus::Done</param>
				void EcCalibrationStatus(EcCalibratorStatus status, int delayMs);

83 84 85 86 87 88
				/// <summary>
				/// Callback method called when the application state has changed.
				/// </summary>
				/// <param name="state">The new state of the application</param>
				/// <param name="message">A message describing the new state of the application</param>
				void GlobalStateChanged(GlobalState state, Platform::String^ message);
89

90 91 92 93 94
				/// <summary>
				/// Callback method called when the composing status for this room has been updated.
				/// </summary>
				/// <param name="room">The room for which the composing status has been updated</param>
				void IsComposingReceived(ChatRoom^ room);
95

96 97 98 99 100
				/// <summary>
				/// Callback method called when the progress of the current logs upload has changed.
				/// </summary>
				/// <param name="progress"></param>
				void LogCollectionUploadProgressIndication(int offset, int total);
101

102 103 104 105 106 107
				/// <summary>
				/// Callback method called when the state of the current log upload changes.
				/// </summary>
				/// <param name="state">Tells the state of the upload</param>
				/// <param name="info">An error message if the upload went wrong, the url of the uploaded logs if it went well, null if upload not yet finished</param>
				void LogCollectionUploadStateChanged(LogCollectionUploadState state, Platform::String^ info);
108

109 110 111 112 113 114 115 116 117 118 119 120 121 122
				/// <summary>
				/// Callback method called when a chat message is received.
				/// </summary>
				/// <param name="room">The ChatRoom involved in the conversation</param>
				/// <param name="message">The incoming ChatMessage</param>
				void MessageReceived(ChatRoom^ room, ChatMessage^ message);

				/// <summary>
				/// Callback method called when the state of the registration of a proxy config has changed.
				/// </summary>
				/// <param name="config">The proxy config for which the registration state has changed</param>
				/// <param name="state">The new registration state for the proxy config</param>
				/// <param name="message">A message describing the new registration state</param>
				void RegistrationStateChanged(ProxyConfig^ config, RegistrationState state, Platform::String^ message);
123 124 125 126 127 128 129

				/// <summary>
				/// Callback for notifying progresses of transfers.
				/// </summary>
				/// <param name="transfered">The call that was transfered</param>
				/// <param name="newCallState">The state of the call to transfer target at the far end</param>
				void TransferStateChanged(Call^ transfered, CallState newCallState);
130 131
			};
		}
132
	}
133
}