]> sjero.net Git - linphone/blob - java/common/org/linphone/core/LinphoneCore.java
Added setIncomingTimeout to JNI
[linphone] / java / common / org / linphone / core / LinphoneCore.java
1 /*
2 LinphoneCore.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 import java.util.Vector;
22
23 /**
24  * Linphone core main object created by method {@link LinphoneCoreFactory#createLinphoneCore(LinphoneCoreListener, String, String, Object)}.    
25  *
26  */
27
28 public interface LinphoneCore {
29         /**
30          * linphone core states
31          */
32         static public class GlobalState {
33                 
34                 static private Vector values = new Vector();
35                 /**
36                  * Off
37                  */
38                 static public GlobalState GlobalOff = new GlobalState(0,"GlobalOff");       
39                 /**
40                  * Startup
41                  */
42                 static public GlobalState GlobalStartup = new GlobalState(1,"GlobalStartup");
43                 /**
44                  * On
45                  */
46                 static public GlobalState GlobalOn = new GlobalState(2,"GlobalOn");
47                 /**
48                  * Shutdown
49                  */
50                 static public GlobalState GlobalShutdown = new GlobalState(3,"GlobalShutdown");
51
52                 private final int mValue;
53                 private final String mStringValue;
54
55                 
56                 private GlobalState(int value,String stringValue) {
57                         mValue = value;
58                         values.addElement(this);
59                         mStringValue=stringValue;
60                 }
61                 public static GlobalState fromInt(int value) {
62
63                         for (int i=0; i<values.size();i++) {
64                                 GlobalState state = (GlobalState) values.elementAt(i);
65                                 if (state.mValue == value) return state;
66                         }
67                         throw new RuntimeException("state not found ["+value+"]");
68                 }
69                 public String toString() {
70                         return mStringValue;
71                 }
72         }
73         /**
74          * Describes proxy registration states.
75          *
76          */
77         static public class RegistrationState {
78                 
79                 private static Vector values = new Vector();
80                 /**
81                  * None
82                  */
83                 public static RegistrationState RegistrationNone = new RegistrationState(0,"RegistrationNone");       
84                 /**
85                  * In Progress
86                  */
87                 public static RegistrationState RegistrationProgress  = new RegistrationState(1,"RegistrationProgress");
88                 /**
89                  * Ok
90                  */
91                 public static RegistrationState RegistrationOk = new RegistrationState(2,"RegistrationOk");
92                 /**
93                  * Cleared
94                  */
95                 public static RegistrationState RegistrationCleared = new RegistrationState(3,"RegistrationCleared");
96                 /**
97                  * Failed
98                  */
99                 public static RegistrationState RegistrationFailed = new RegistrationState(4,"RegistrationFailed");
100                 private final int mValue;
101                 private final String mStringValue;
102
103                 
104                 private RegistrationState(int value,String stringValue) {
105                         mValue = value;
106                         values.addElement(this);
107                         mStringValue=stringValue;
108                 }
109                 public static RegistrationState fromInt(int value) {
110
111                         for (int i=0; i<values.size();i++) {
112                                 RegistrationState state = (RegistrationState) values.elementAt(i);
113                                 if (state.mValue == value) return state;
114                         }
115                         throw new RuntimeException("state not found ["+value+"]");
116                 }
117                 public String toString() {
118                         return mStringValue;
119                 }
120         }
121         /**
122          * Describes firewall policy.
123          *
124          */
125         static public class FirewallPolicy {
126                 
127                 static private Vector values = new Vector();
128                 /**
129                  * No firewall is assumed.
130                  */
131                 static public FirewallPolicy NoFirewall = new FirewallPolicy(0,"NoFirewall");       
132                 /**
133                  * Use NAT address (discouraged)
134                  */
135                 static public FirewallPolicy UseNatAddress  = new FirewallPolicy(1,"UseNatAddress");
136                 /**
137                  * Use stun server to discover RTP addresses and ports.
138                  */
139                 static public FirewallPolicy UseStun = new FirewallPolicy(2,"UseStun");
140                 /**
141                  * Use ICE.
142                  */
143                 static public FirewallPolicy UseIce = new FirewallPolicy(3,"UseIce");
144                 
145                 private final int mValue;
146                 private final String mStringValue;
147
148                 
149                 private FirewallPolicy(int value,String stringValue) {
150                         mValue = value;
151                         values.addElement(this);
152                         mStringValue=stringValue;
153                 }
154                 public static FirewallPolicy fromInt(int value) {
155
156                         for (int i=0; i<values.size();i++) {
157                                 FirewallPolicy state = (FirewallPolicy) values.elementAt(i);
158                                 if (state.mValue == value) return state;
159                         }
160                         throw new RuntimeException("state not found ["+value+"]");
161                 }
162                 public String toString() {
163                         return mStringValue;
164                 }
165                 public int value(){
166                         return mValue;
167                 }
168         }
169         
170         /**
171          * Signaling transports ports.
172          */
173         static public class Transports {
174                 public int udp;
175                 public int tcp;
176                 public int tls;
177                 
178                 public Transports() {};
179                 public Transports(Transports t) {
180                         this.udp = t.udp;
181                         this.tcp = t.tcp;
182                         this.tls = t.tls;
183                 }
184                 public String toString() {
185                         return "udp["+udp+"] tcp["+tcp+"] tls["+tls+"]";
186                 }
187         }
188         /**
189          * Media (RTP) encryption enum-like.
190          *
191          */
192         static public class MediaEncryption {
193                 
194                 static private Vector values = new Vector();
195                 /**
196                  * None
197                  */
198                 static public MediaEncryption None = new MediaEncryption(0,"None");       
199                 /**
200                  * SRTP
201                  */
202                 static public MediaEncryption SRTP = new MediaEncryption(1,"SRTP");
203                 /**
204                  * ZRTP
205                  */
206                 static public MediaEncryption ZRTP = new MediaEncryption(2,"ZRTP");
207                 protected final int mValue;
208                 private final String mStringValue;
209
210                 
211                 private MediaEncryption(int value,String stringValue) {
212                         mValue = value;
213                         values.addElement(this);
214                         mStringValue=stringValue;
215                 }
216                 public static MediaEncryption fromInt(int value) {
217
218                         for (int i=0; i<values.size();i++) {
219                                 MediaEncryption menc = (MediaEncryption) values.elementAt(i);
220                                 if (menc.mValue == value) return menc;
221                         }
222                         throw new RuntimeException("MediaEncryption not found ["+value+"]");
223                 }
224                 public String toString() {
225                         return mStringValue;
226                 }
227         }
228         /**
229          *      EC Calibrator Status
230          */
231         static public class EcCalibratorStatus {
232                 
233                 static private Vector values = new Vector();
234                 public static final int IN_PROGRESS_STATUS=0;
235                 public static final int DONE_STATUS=1;
236                 public static final int FAILED_STATUS=2;
237                 /**
238                  * Calibration in progress
239                  */
240                 static public EcCalibratorStatus InProgress = new EcCalibratorStatus(IN_PROGRESS_STATUS,"InProgress");       
241                 /**
242                  * Calibration done
243                  */
244                 static public EcCalibratorStatus Done  = new EcCalibratorStatus(DONE_STATUS,"Done");
245                 /**
246                  * Calibration in progress
247                  */
248                 static public EcCalibratorStatus Failed = new EcCalibratorStatus(FAILED_STATUS,"Failed");
249
250                 private final int mValue;
251                 private final String mStringValue;
252
253                 
254                 private EcCalibratorStatus(int value,String stringValue) {
255                         mValue = value;
256                         values.addElement(this);
257                         mStringValue=stringValue;
258                 }
259                 public static EcCalibratorStatus fromInt(int value) {
260
261                         for (int i=0; i<values.size();i++) {
262                                 EcCalibratorStatus status = (EcCalibratorStatus) values.elementAt(i);
263                                 if (status.mValue == value) return status;
264                         }
265                         throw new RuntimeException("status not found ["+value+"]");
266                 }
267                 public String toString() {
268                         return mStringValue;
269                 }
270                 public int value(){
271                         return mValue;
272                 }
273         }
274         /**
275          * clear all added proxy configs
276          */
277         public void clearProxyConfigs();
278         /**
279          * Add a proxy configuration. This will start registration on the proxy, if registration is enabled.
280          * @param proxyCfg
281          * @throws LinphoneCoreException
282          */
283         public void addProxyConfig(LinphoneProxyConfig proxyCfg) throws LinphoneCoreException;
284         /**
285          * Sets the default proxy.
286          *<br>
287          * This default proxy must be part of the list of already entered {@link LinphoneProxyConfig}. 
288          * Toggling it as default will make LinphoneCore use the identity associated with the proxy configuration in all incoming and outgoing calls.
289          * @param proxyCfg 
290          */
291         public void setDefaultProxyConfig(LinphoneProxyConfig proxyCfg);
292         
293         /**
294          * get he default proxy configuration, that is the one used to determine the current identity.
295          * @return null if no default proxy config 
296          */
297         public LinphoneProxyConfig getDefaultProxyConfig() ;
298         
299         /**
300          * clear all the added auth info
301          */
302         void clearAuthInfos();
303         /**
304          * Adds authentication information to the LinphoneCore.
305          * <br>This information will be used during all SIP transacations that require authentication.
306          * @param info
307          */
308         void addAuthInfo(LinphoneAuthInfo info);
309         
310         /**
311          * Build an address according to the current proxy config. In case destination is not a sip address, the default proxy domain is automatically appended
312          * @param destination
313          * @return
314          * @throws If no LinphoneAddress can be built from destination
315          */
316         public LinphoneAddress interpretUrl(String destination) throws LinphoneCoreException;
317         
318         /**
319          * Starts a call given a destination. Internally calls {@link #interpretUrl(String)} then {@link #invite(LinphoneAddress)}.
320          * @param uri
321          */
322         public LinphoneCall invite(String destination)throws LinphoneCoreException;
323         /**
324          * Initiates an outgoing call given a destination LinphoneAddress
325          *<br>The LinphoneAddress can be constructed directly using linphone_address_new(), or created by linphone_core_interpret_url(). The application doesn't own a reference to the returned LinphoneCall object. Use linphone_call_ref() to safely keep the LinphoneCall pointer valid within your application.
326          * @param to the destination of the call (sip address).
327          * @return LinphoneCall
328          * @throws LinphoneCoreException
329          */
330         public LinphoneCall invite(LinphoneAddress to)throws LinphoneCoreException;
331         /**
332          * Terminates a call.
333          * @param aCall to be terminated
334          */
335         public void terminateCall(LinphoneCall aCall);
336         /**
337          * Returns The LinphoneCall the current call if one is in call
338          *
339         **/
340         public LinphoneCall getCurrentCall(); 
341         
342         /**
343          * get current call remote address in case of in/out call
344          * @return null if no call engaged yet
345          */
346         public LinphoneAddress getRemoteAddress();
347         /**
348          *  
349          * @return  TRUE if there is a call running or pending.
350          */
351         public boolean isIncall();
352         /**
353          * 
354          * @return Returns true if in incoming call is pending, ie waiting for being answered or declined.
355          */
356         public boolean isInComingInvitePending();
357         /**
358          * Main loop function. It is crucial that your application call it periodically.
359          *
360          *      #iterate() performs various backgrounds tasks:
361          * <li>receiving of SIP messages
362          * <li> handles timers and timeout
363          * <li> performs registration to proxies
364          * <li> authentication retries The application MUST call this function from periodically, in its main loop. 
365          * <br> Be careful that this function must be call from the same thread as other liblinphone methods. In not the case make sure all liblinphone calls are serialized with a mutex.
366
367          */
368         public void iterate();
369         /**
370          * Accept an incoming call.
371          *
372          * Basically the application is notified of incoming calls within the
373          * {@link LinphoneCoreListener#callState} listener method.
374          * The application can later respond positively to the call using
375          * this method.
376          * @throws LinphoneCoreException 
377          */
378         public void acceptCall(LinphoneCall aCall) throws LinphoneCoreException;
379         
380         /**
381          * Accept an incoming call.
382          *
383          * Basically the application is notified of incoming calls within the
384          * {@link LinphoneCoreListener#callState} listener method.
385          * The application can later respond positively to the call using
386          * this method.
387          * @throws LinphoneCoreException 
388          */
389         public void acceptCallWithParams(LinphoneCall aCall, LinphoneCallParams params) throws LinphoneCoreException;
390         
391         /**
392          * Accept call modifications initiated by other end.
393          *
394          * Basically the application is notified of incoming calls within the
395          * {@link LinphoneCoreListener#callState} listener method.
396          * The application can later respond positively to the call using
397          * this method.
398          * @throws LinphoneCoreException 
399          */
400         public void acceptCallUpdate(LinphoneCall aCall, LinphoneCallParams params) throws LinphoneCoreException;
401         
402         
403         /**
404          * Prevent LinphoneCore from performing an automatic answer
405          *
406          * Basically the application is notified of incoming calls within the
407          * {@link LinphoneCoreListener#callState} listener method.
408          * The application can later respond positively to the call using
409          * this method.
410          * @throws LinphoneCoreException 
411          */
412         public void deferCallUpdate(LinphoneCall aCall) throws LinphoneCoreException;
413         
414         /**
415          * @return a list of LinphoneCallLog 
416          */
417         public LinphoneCallLog[] getCallLogs();
418         
419         /**
420          * This method is called by the application to notify the Linphone core library when network is reachable.
421          * Calling this method with true trigger Linphone to initiate a registration process for all proxy
422          * configuration with parameter register set to enable.
423          * This method disable the automatic registration mode. It means you must call this method after each network state changes
424          * @param network state  
425          *
426          */
427         public void setNetworkReachable(boolean isReachable);
428         /**
429          * 
430          * @return if false, there is no network connection.
431          */
432         public boolean isNetworkReachable();
433         /**
434          * destroy linphone core and free all underlying resources
435          */
436         public void destroy();
437         /**
438          * Allow to control play level before entering  sound card:  
439          * @param level in db
440          */
441         public void setPlaybackGain(float gain);
442         /**
443          * get play level before entering  sound card:  
444          * @return level in db
445          */
446         public float getPlaybackGain();
447         /**
448          * set play level
449          * @param level [0..100]
450          */
451         public void setPlayLevel(int level);
452         /**
453          * get playback level [0..100];
454          * -1 if not cannot be determined
455          * @return
456          */
457         public int getPlayLevel();
458         /**
459          *  Mutes or unmutes the local microphone.
460          * @param isMuted
461          */
462         void muteMic(boolean isMuted);
463         /**
464          * 
465          * @return true is mic is muted
466          */
467         boolean isMicMuted();
468         
469         /**
470          * Initiate a dtmf signal if in call
471          * @param number
472          */
473         void sendDtmf(char number);
474         /**
475          * Initiate a dtmf signal to the speaker if not in call.
476          * Sending of the DTMF is done in another function.
477          * @param number
478          * @param duration in ms , -1 for unlimited
479          */
480         void playDtmf(char number,int duration);
481         /**
482          * stop current dtmf
483          */
484         void stopDtmf();
485         
486         /**
487          * remove all call logs
488          */
489         void clearCallLogs();
490         /***
491          * get payload type  from mime type, clock rate, and number of channels.-
492          * 
493          * return null if not found
494          */
495         PayloadType findPayloadType(String mime, int clockRate, int channels); 
496         /***
497          * get payload type  from mime type and clock rate..
498          * 
499          * return null if not found
500          */
501         PayloadType findPayloadType(String mime, int clockRate); 
502         /**
503          * not implemented yet
504          * @param pt
505          * @param enable
506          * @throws LinphoneCoreException
507          */
508         void enablePayloadType(PayloadType pt, boolean enable) throws LinphoneCoreException;
509         /**
510          * Enables or disable echo cancellation.
511          * @param enable
512          */
513         void enableEchoCancellation(boolean enable);
514         /**
515          * get EC status 
516          * @return true if echo cancellation is enabled.
517          */
518         boolean isEchoCancellationEnabled();
519         /**
520          * Get echo limiter status (another method of doing echo suppressionn, more brute force)
521          * @return true if echo limiter is enabled
522          */
523         boolean isEchoLimiterEnabled();
524         /**
525          * @param transports used for signaling (TCP, UDP and TLS)
526          */
527         void setSignalingTransportPorts(Transports transports);
528         /**
529          * @return transports used for signaling (TCP, UDP, TLS)
530          */
531         Transports getSignalingTransportPorts();
532         /**
533          * not implemented
534          * @param value
535          */
536         void enableSpeaker(boolean value);
537         /**
538          * not implemented
539          * @return
540          */
541         boolean isSpeakerEnabled();
542         /**
543          * add a friend to the current buddy list, if subscription attribute is set, a SIP SUBSCRIBE message is sent.
544          * @param lf LinphoenFriend to add
545          * @throws LinphoneCoreException
546          */
547         void addFriend(LinphoneFriend lf) throws LinphoneCoreException;
548
549         /**
550          * Set my presence status
551          * @param minute_away how long in away
552          * @param status sip uri used to redirect call in state LinphoneStatusMoved
553          */
554         void setPresenceInfo(int minute_away,String alternative_contact, OnlineStatus status);
555         /**
556          * Create a new chat room for messaging from a sip uri like sip:joe@sip.linphone.org
557          * @param to    destination address for messages 
558          *
559          * @return {@link LinphoneChatRoom} where messaging can take place.
560          */
561         LinphoneChatRoom createChatRoom(String to);
562         
563         void setVideoWindow(Object w);
564         void setPreviewWindow(Object w);
565         void setDeviceRotation(int rotation);
566         
567         void setVideoDevice(int id);
568         int getVideoDevice();
569         
570         /**
571          * Enables video globally.
572          *
573          * 
574          * This function does not have any effect during calls. It just indicates #LinphoneCore to
575          * initiate future calls with video or not. The two boolean parameters indicate in which
576          * direction video is enabled. Setting both to false disables video entirely.
577          *
578          * @param vcap_enabled indicates whether video capture is enabled
579          * @param display_enabled indicates whether video display should be shown
580          *
581         **/
582         void enableVideo(boolean vcap_enabled, boolean display_enabled);
583         /**
584          * Returns TRUE if video is enabled, FALSE otherwise.
585          *      
586          ***/
587         boolean isVideoEnabled();
588         
589         /**
590          * Specify a STUN server to help firewall traversal.
591          * @param stun_server Stun server address and port, such as stun.linphone.org or stun.linphone.org:3478
592          */
593         void setStunServer(String stun_server);
594         /**
595          * @return stun server address if previously set.
596          */
597         String getStunServer();
598         
599         /**
600          * Sets policy regarding workarounding NATs
601          * @param pol one of the FirewallPolicy members.
602         **/
603         void setFirewallPolicy(FirewallPolicy pol);
604         /**
605          * @return previously set firewall policy.
606          */
607         FirewallPolicy getFirewallPolicy();
608
609         LinphoneCall inviteAddressWithParams(LinphoneAddress destination, LinphoneCallParams params) throws LinphoneCoreException ;
610         
611         int updateCall(LinphoneCall call, LinphoneCallParams params);
612
613         LinphoneCallParams createDefaultCallParameters();
614
615         /**
616          * Sets the path to a wav file used for ringing.
617          *
618          * @param path The file must be a wav 16bit linear. Local ring is disabled if null
619          */
620         void setRing(String path);
621         /**
622          * gets the path to a wav file used for ringing.
623          *
624          * @param null if not set
625          */
626         String getRing();
627         
628         /**
629          * Sets file or folder containing trusted root CAs
630          *
631          * @param path path to file with multiple PEM certif or to folder with multiple PEM files
632          */     
633         void setRootCA(String path);
634         
635         void setUploadBandwidth(int bw);
636
637         void setDownloadBandwidth(int bw);
638         
639         /**
640          * Sets audio packetization interval suggested for remote end.
641          * @param ptime packetization interval in milliseconds
642          */
643         void setDownloadPtime(int ptime);
644         
645         /**
646          * Sets audio packetization interval sent to remote end.
647          * @param ptime packetization interval in milliseconds
648          */
649         void setUploadPtime(int ptime);
650
651         void setPreferredVideoSize(VideoSize vSize);
652         
653         VideoSize getPreferredVideoSize();
654         
655         /**
656          * Returns the currently supported audio codecs, as PayloadType elements
657          * @return
658          */
659         PayloadType[] getAudioCodecs();
660         /**
661          * Returns the currently supported video codecs, as PayloadType elements
662          * @return
663          */
664         PayloadType[] getVideoCodecs();
665         /**
666          * enable signaling keep alive. small udp packet sent periodically to keep udp NAT association
667          */
668         void enableKeepAlive(boolean enable);
669         /**
670          * get keep elive mode
671          * @return true if enable
672          */
673         boolean isKeepAliveEnabled();
674         /**
675          * Start an echo calibration of the sound devices, in order to find adequate settings for the echo canceler automatically.
676          * status is notified to {@link LinphoneCoreListener#ecCalibrationStatus(EcCalibratorStatus, int, Object)}
677          * @param User object
678          * @throws LinphoneCoreException if operation is still in progress;
679         **/
680         void startEchoCalibration(Object data) throws LinphoneCoreException;
681
682         void enableIpv6(boolean enable);
683         /**
684          * @deprecated
685          * @param i
686          */
687         void adjustSoftwareVolume(int i);
688         
689         boolean pauseCall(LinphoneCall call);
690         boolean resumeCall(LinphoneCall call);
691         boolean pauseAllCalls();
692         
693         void setZrtpSecretsCache(String file);
694         void enableEchoLimiter(boolean val);
695
696         boolean isInConference();
697         boolean enterConference();
698         void leaveConference();
699
700         void addToConference(LinphoneCall call);
701         void addAllToConference();
702         void removeFromConference(LinphoneCall call);
703
704         void terminateConference();
705         int getConferenceSize();
706         
707         void terminateAllCalls();
708         LinphoneCall[] getCalls();
709         int getCallsNb();
710
711
712         void transferCall(LinphoneCall call, String referTo);
713         void transferCallToAnother(LinphoneCall callToTransfer, LinphoneCall destination);
714
715         LinphoneCall findCallFromUri(String uri);
716
717         int getMaxCalls();
718         void setMaxCalls(int max);
719         boolean isMyself(String uri);
720
721         /**
722          * Use this method to check the calls state and forbid proposing actions
723          * which could result in an active call.
724          * Eg: don't start a new call if one is in outgoing ringing.
725          * Eg: don't merge to conference either as it could result
726          *     in two active calls (conference and accepted call). 
727          * @return
728          */
729         boolean soundResourcesLocked();
730         /**
731          * Returns whether given media encryption is supported by liblinphone.
732          */
733         boolean mediaEncryptionSupported(MediaEncryption menc);
734         /**
735          * set media encryption (rtp) to use
736          * @params menc: MediaEncryption.None, MediaEncryption.SRTP or MediaEncryption.ZRTP
737          */
738         void setMediaEncryption(MediaEncryption menc);
739         /**
740          * return selected media encryption
741          * @return MediaEncryption.None, MediaEncryption.SRTP or MediaEncryption.ZRTP
742          */
743         MediaEncryption getMediaEncryption();
744 /**
745          * Set media encryption required for outgoing calls
746          */
747         void setMediaEncryptionMandatory(boolean yesno);
748         /**
749          * @return if media encryption is required for outgoing calls
750          */
751         boolean isMediaEncryptionMandatory();
752
753         /**
754          * @param path path to music file played to remote side when on hold.
755          */
756         void setPlayFile(String path);
757         void tunnelEnable(boolean enable);
758         void tunnelAutoDetect();
759         void tunnelCleanServers();
760         void tunnelSetHttpProxy(String proxy_host, int port, String username, String password);
761         /**
762          * @param host tunnel server ip address
763          * @param port tunnel server tls port, recommended value is 443
764          * @param udpMirrorPort remote port on the tunnel server side  used to test udp reachability
765          * @param roundTripDelay udp packet round trip delay in ms considered as acceptable. recommended value is 1000 ms
766          */
767         void tunnelAddServerAndMirror(String host, int port, int udpMirrorPort, int roundTripDelay);
768
769         boolean isTunnelAvailable();
770         
771         LinphoneProxyConfig[] getProxyConfigList();
772         
773         void setVideoPolicy(boolean autoInitiate, boolean autoAccept);
774         
775         void setUserAgent(String name, String version);
776         
777         void setCpuCount(int count);
778         
779         /**
780          * remove a call log
781          */
782         public void removeCallLog(LinphoneCallLog log);
783         
784         /**
785          * @return count of missed calls
786          */
787         public int getMissedCallsCount();
788         
789         /**
790          * Set missed calls count to zero
791          */
792         public void resetMissedCallsCount();
793         /**
794          * re-initiates registration if network is up.
795          */
796         public void refreshRegisters();
797
798         /**
799          * return the version code of linphone core
800          */
801         public String getVersion();
802         
803         /**
804          * remove a linphone friend from linphone core and linphonerc
805          */
806         void removeFriend(LinphoneFriend lf);
807         
808         /**
809          * return a linphone friend (if exists) that matches the sip address
810          */
811         LinphoneFriend findFriendByAddress(String sipUri);
812         
813         /**
814          * Sets the UDP port used for audio streaming.
815         **/
816         void setAudioPort(int port);
817         
818         /**
819          * Sets the UDP port range from which to randomly select the port used for audio streaming.
820          */
821         void setAudioPortRange(int minPort, int maxPort);
822         
823         /**
824          * Sets the UDP port used for video streaming.
825         **/
826         void setVideoPort(int port);
827         
828         /**
829          * Sets the UDP port range from which to randomly select the port used for video streaming.
830          */
831         void setVideoPortRange(int minPort, int maxPort);
832         
833         /**
834          * Set the incoming call timeout in seconds.
835          * If an incoming call isn't answered for this timeout period, it is
836          * automatically declined.
837         **/
838         void setIncomingTimeout(int timeout);
839 }