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 {
28 /**< Notifies the application that it should show up
30 void show(LinphoneCore lc);
32 /**< Ask the application some authentication information
34 void authInfoRequested(LinphoneCore lc,String realm,String username);
36 /**< Callback that notifies various events with human readable text.
38 void displayStatus(LinphoneCore lc,String message);
40 /**< Callback to display a message to the user
42 void displayMessage(LinphoneCore lc,String message);
44 /** Callback to display a warning to the user
46 void displayWarning(LinphoneCore lc,String message);
48 /** General State notification
49 * @param state LinphoneCore.State
52 void globalState(LinphoneCore lc,LinphoneCore.GlobalState state, String message);
54 /** Call State notification
55 * @param state LinphoneCall.State
58 void callState(LinphoneCore lc, LinphoneCall call, LinphoneCall.State cstate,String message);
61 * Callback to display change in encryption state.
62 * @param encrypted true if all streams of the call are encrypted
63 * @param authenticationToken token like ZRTP SAS that may be displayed to user
65 void callEncryptionChanged(LinphoneCore lc, LinphoneCall call, boolean encrypted, String authenticationToken);
68 * Registration state notification
70 void registrationState(LinphoneCore lc, LinphoneProxyConfig cfg, LinphoneCore.RegistrationState cstate, String smessage);
73 * Reports that a new subscription request has been received and wait for a decision.
74 *Status on this subscription request is notified by changing policy for this friend
75 *@param lc LinphoneCore
76 *@param lf LinphoneFriend corresponding to the subscriber
77 *@param url of the subscriber
80 void newSubscriptionRequest(LinphoneCore lc, LinphoneFriend lf, String url);
83 * Report status change for a friend previously added to LinphoneCore.
84 * @param lc LinphoneCore
85 * @param lf updated LinphoneFriend
87 void notifyPresenceReceived(LinphoneCore lc, LinphoneFriend lf);
90 * invoked when a new text message is received
91 * @param lc LinphoneCore
92 * @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.
93 * @param from LinphoneAddress from
94 * @param message incoming message
96 void textReceived(LinphoneCore lc, LinphoneChatRoom cr,LinphoneAddress from,String message);
99 * Invoked when echo cancalation calibration is completed
100 * @param lc LinphoneCore
102 * @param delay_ms echo delay
105 void ecCalibrationStatus(LinphoneCore lc,LinphoneCore.EcCalibratorStatus status, int delay_ms, Object data);