]> sjero.net Git - linphone/blob - java/common/org/linphone/core/LinphoneCoreListener.java
ddd58a3ac3de8266da21d5740a14cc5756d199af
[linphone] / java / common / org / linphone / core / LinphoneCoreListener.java
1 /*
2 LinphoneCoreListener.java
3 Copyright (C) 2010  Belledonne Communications, Grenoble, France
4
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.
9
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.
14
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.
18 */
19 package org.linphone.core;
20
21
22 /**
23  * 
24  *This interface holds all callbacks that the application should implement. None is mandatory.
25  */
26 public interface LinphoneCoreListener {
27
28         /**< Notifies the application that it should show up
29          * @return */
30                 public void show(LinphoneCore lc);
31                 /**< Ask the application some authentication information 
32                  * @return */
33                 public void authInfoRequested(LinphoneCore lc,String realm,String username); 
34                 /**< Callback that notifies various events with human readable text.
35                  * @return */
36                 public void displayStatus(LinphoneCore lc,String message);
37                 /**< Callback to display a message to the user 
38                  * @return */
39                 public void displayMessage(LinphoneCore lc,String message);
40                 /** Callback to display a warning to the user 
41                  * @return */
42                 public void displayWarning(LinphoneCore lc,String message);
43                 /** General State notification  
44                  * @param state LinphoneCore.State
45                  * @return 
46                  * */           
47                 public void globalState(LinphoneCore lc,LinphoneCore.GlobalState state, String message);
48                 /** Call  State notification  
49                  * @param state LinphoneCall.State
50                  * @return 
51                  * */           
52                 
53                 public void callState(LinphoneCore lc, LinphoneCall call, LinphoneCall.State cstate,String message);
54                 /**
55                  * Registration state notification
56                  * */
57                 public void registrationState(LinphoneCore lc, LinphoneProxyConfig cfg, LinphoneCore.RegistrationState cstate, String smessage);
58                 /**
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
64                  * 
65                  */
66                 public void newSubscriptionRequest(LinphoneCore lc, LinphoneFriend lf, String url);
67                 /**
68                  * Report status change for a friend previously added to LinphoneCore.
69                  * @param lc LinphoneCore
70                  * @param lf updated LinphoneFriend
71                  */
72                 public void notifyPresenceReceived(LinphoneCore lc, LinphoneFriend lf);
73                 /**
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
79                  */
80                 public void textReceived(LinphoneCore lc, LinphoneChatRoom cr,LinphoneAddress from,String message);
81                 /**
82                  * Invoked when echo cancalation calibration is completed
83                  * @param lc LinphoneCore
84                  * @param status 
85                  * @param delay_ms echo delay
86                  * @param data
87                  */
88                  void ecCalibrationStatus(LinphoneCore lc,LinphoneCore.EcCalibratorStatus status, int delay_ms, Object data);
89                 
90 }
91