2 LinphoneCoreListener.java
3 Copyright (C) 2010 Belledonne Communications, Grenoble, France
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License
7 as published by the Free Software Foundation; either version 2
8 of the License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 package org.linphone.core;
24 *This interface holds all callbacks that the application should implement. None is mandatory.
26 public interface LinphoneCoreListener {
27 /**< Ask the application some authentication information
29 void authInfoRequested(LinphoneCore lc,String realm,String username);
31 /** General State notification
32 * @param state LinphoneCore.State
35 void globalState(LinphoneCore lc,LinphoneCore.GlobalState state, String message);
37 /** Call State notification
38 * @param state LinphoneCall.State
41 void callState(LinphoneCore lc, LinphoneCall call, LinphoneCall.State cstate,String message);
44 * Call stats notification
46 void callStatsUpdated(LinphoneCore lc, LinphoneCall call, LinphoneCallStats stats);
49 * Callback to display change in encryption state.
50 * @param encrypted true if all streams of the call are encrypted
51 * @param authenticationToken token like ZRTP SAS that may be displayed to user
53 void callEncryptionChanged(LinphoneCore lc, LinphoneCall call, boolean encrypted, String authenticationToken);
56 * Registration state notification
58 void registrationState(LinphoneCore lc, LinphoneProxyConfig cfg, LinphoneCore.RegistrationState cstate, String smessage);
61 * Reports that a new subscription request has been received and wait for a decision.
62 *Status on this subscription request is notified by changing policy for this friend
63 *@param lc LinphoneCore
64 *@param lf LinphoneFriend corresponding to the subscriber
65 *@param url of the subscriber
68 void newSubscriptionRequest(LinphoneCore lc, LinphoneFriend lf, String url);
71 * Report status change for a friend previously added to LinphoneCore.
72 * @param lc LinphoneCore
73 * @param lf updated LinphoneFriend
75 void notifyPresenceReceived(LinphoneCore lc, LinphoneFriend lf);
78 * invoked when a new text message is received
79 * @param lc LinphoneCore
80 * @param room LinphoneChatRoom involved in this conversation. Can be be created by the framework in case the from is not present in any chat room.
81 * @param from LinphoneAddress from
82 * @param message incoming message
84 void textReceived(LinphoneCore lc, LinphoneChatRoom cr, LinphoneAddress from, String message);
87 * invoked when a new linphone chat message is received
88 * @param lc LinphoneCore
89 * @param room LinphoneChatRoom involved in this conversation. Can be be created by the framework in case the from is not present in any chat room.
90 * @param message incoming linphone chat message message
92 void messageReceived(LinphoneCore lc, LinphoneChatRoom cr, LinphoneChatMessage message);
95 * invoked when a new dtmf is received
96 * @param lc LinphoneCore
97 * @param call LinphoneCall involved in the dtmf sending
98 * @param dtmf value of the dtmf sent
100 void dtmfReceived(LinphoneCore lc, LinphoneCall call, int dtmf);
103 * Invoked when echo cancalation calibration is completed
104 * @param lc LinphoneCore
106 * @param delay_ms echo delay
109 void ecCalibrationStatus(LinphoneCore lc,LinphoneCore.EcCalibratorStatus status, int delay_ms, Object data);
111 * Report Notified message received for this identity.
112 * @param lc LinphoneCore
113 * @param call LinphoneCall in case the notify is part of a dialog, may be null
114 * @param from LinphoneAddress the message comes from
115 * @param event String the raw body of the notify event.
118 void notifyReceived(LinphoneCore lc, LinphoneCall call, LinphoneAddress from, byte[] event);
121 /**< @Deprecated Notifies the application that it should show up
123 void show(LinphoneCore lc);
124 /**< @Deprecated Callback that notifies various events with human readable text.
126 void displayStatus(LinphoneCore lc,String message);
128 /**< @Deprecated Callback to display a message to the user
130 void displayMessage(LinphoneCore lc,String message);
132 /** @Deprecated Callback to display a warning to the user
134 void displayWarning(LinphoneCore lc,String message);