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 public void show(LinphoneCore lc);
31 /**< Ask the application some authentication information
33 public void authInfoRequested(LinphoneCore lc,String realm,String username);
34 /**< Callback that notifies various events with human readable text.
36 public void displayStatus(LinphoneCore lc,String message);
37 /**< Callback to display a message to the user
39 public void displayMessage(LinphoneCore lc,String message);
40 /** Callback to display a warning to the user
42 public void displayWarning(LinphoneCore lc,String message);
43 /** General State notification
44 * @param state LinphoneCore.State
47 public void globalState(LinphoneCore lc,LinphoneCore.GlobalState state, String message);
48 /** Call State notification
49 * @param state LinphoneCall.State
53 public void callState(LinphoneCore lc, LinphoneCall call, LinphoneCall.State cstate,String message);
55 * Registration state notification
57 public void registrationState(LinphoneCore lc, LinphoneProxyConfig cfg, LinphoneCore.RegistrationState cstate, String smessage);
59 * Reports that a new subscription request has been received and wait for a decision.
60 *Status on this subscription request is notified by changing policy for this friend
61 *@param lc LinphoneCore
62 *@param lf LinphoneFriend corresponding to the subscriber
63 *@param url of the subscriber
66 public void newSubscriptionRequest(LinphoneCore lc, LinphoneFriend lf, String url);
68 * Report status change for a friend previously added to LinphoneCore.
69 * @param lc LinphoneCore
70 * @param lf updated LinphoneFriend
72 public void notifyPresenceReceived(LinphoneCore lc, LinphoneFriend lf);
74 * invoked when a new text message is received
75 * @param lc LinphoneCore
76 * @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.
77 * @param from LinphoneAddress from
78 * @param message incoming message
80 public void textReceived(LinphoneCore lc, LinphoneChatRoom cr,LinphoneAddress from,String message);
82 * Invoked when echo cancalation calibration is completed
83 * @param lc LinphoneCore
85 * @param delay_ms echo delay
88 void ecCalibrationStatus(LinphoneCore lc,LinphoneCore.EcCalibratorStatus status, int delay_ms, Object data);