From ca8da575f27235558182921c72d48d4d1d7d4991 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 28 Apr 2010 16:54:37 +0200 Subject: [PATCH] api enhancements --- java/org/linphone/core/LinphoneCore.java | 22 ++++++++++++------- .../linphone/core/LinphoneCoreFactory.java | 2 ++ 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/java/org/linphone/core/LinphoneCore.java b/java/org/linphone/core/LinphoneCore.java index bfc9486b8..4662edb2c 100644 --- a/java/org/linphone/core/LinphoneCore.java +++ b/java/org/linphone/core/LinphoneCore.java @@ -80,7 +80,19 @@ public interface LinphoneCore { void addAuthInfo(LinphoneAuthInfo info); - public void invite(String uri); + /** + * Build an address according to the current proxy config. In case destination is not a sip address, the default proxy domain is automatically appended + * @param destination + * @return + * @throws If no LinphoneAddress can be built from destination + */ + public LinphoneAddress interpretUrl(String destination) throws LinphoneCoreException; + + /** + * Starts a call given a destination. Internally calls interpretUrl() then invite(LinphoneAddress). + * @param uri + */ + public void invite(String destination)throws LinphoneCoreException; public void invite(LinphoneAddress to); @@ -150,13 +162,7 @@ public interface LinphoneCore { * @return true is mic is muted */ public boolean isMicMuted(); - /** - * Build an address according to the current proxy config. In case destination is not a sip uri, the default proxy domain is automatically appended - * @param destination - * @return - * @throws If no LinphonrAddress can be built from destination - */ - public LinphoneAddress interpretUrl(String destination) throws LinphoneCoreException; + /** * Initiate a dtmf signal if in call * @param number diff --git a/java/org/linphone/core/LinphoneCoreFactory.java b/java/org/linphone/core/LinphoneCoreFactory.java index 87572c3bd..65f8dd9b8 100644 --- a/java/org/linphone/core/LinphoneCoreFactory.java +++ b/java/org/linphone/core/LinphoneCoreFactory.java @@ -54,6 +54,8 @@ abstract public class LinphoneCoreFactory { abstract public LinphoneAddress createLinphoneAddress(String username,String domain,String displayName); + abstract public LinphoneAddress createLinphoneAddress(String address); + abstract public LinphoneProxyConfig createProxyConfig(String identity, String proxy,String route,boolean enableRegister) throws LinphoneCoreException; /** * Enable verbose traces