forked from mirrors/linphone-iphone
Merge branch 'master' of belledonne-communications.com:linphone-private into dev_multicall
This commit is contained in:
commit
da3a9274a0
5 changed files with 68 additions and 35 deletions
|
|
@ -51,7 +51,7 @@ JNIEXPORT jint JNICALL JNI_OnLoad(JavaVM *ajvm, void *reserved)
|
|||
|
||||
|
||||
//LinphoneFactory
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreFactory_setDebugMode(JNIEnv* env
|
||||
extern "C" void Java_org_linphone_core_LinphoneCoreFactoryImpl_setDebugMode(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jboolean isDebug) {
|
||||
if (isDebug) {
|
||||
|
|
|
|||
|
|
@ -34,13 +34,30 @@ public interface LinphoneAddress {
|
|||
* @return null if not set
|
||||
*/
|
||||
public String getDomain();
|
||||
public String getPort();
|
||||
public int getPortInt();
|
||||
/**
|
||||
* set display name
|
||||
* @param name
|
||||
*/
|
||||
public void setDisplayName(String name);
|
||||
public void setUserName(String username);
|
||||
public void setDomain(String domain);
|
||||
public void setPort(String port);
|
||||
public void setPortInt(int port);
|
||||
public void clean();
|
||||
|
||||
/**
|
||||
* @return an URI version of the address that can be used to place a call using {@link LinphoneCore#invite(String)}
|
||||
*
|
||||
* @return the address as a string.
|
||||
*/
|
||||
public String toUri();
|
||||
public String asString();
|
||||
/**
|
||||
*
|
||||
* @return the address without display name as a string.
|
||||
*/
|
||||
public String asStringUriOnly();
|
||||
|
||||
/*must return the same thing as asString()*/
|
||||
public String toString();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|||
package org.linphone.core;
|
||||
|
||||
public interface LinphoneAuthInfo {
|
||||
|
||||
String getUsername();
|
||||
String getPassword();
|
||||
String getRealm();
|
||||
void setUsername(String username);
|
||||
void setPassword(String password);
|
||||
void setRealm(String realm);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -59,14 +59,6 @@ public interface LinphoneCore {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param identity sip uri sip:jehan@linphone.org
|
||||
* @param proxy sip uri (sip:linphone.org)
|
||||
* @param route optionnal sip usi (sip:linphone.org)
|
||||
* @param register should be initiated
|
||||
* @return
|
||||
*/
|
||||
public LinphoneProxyConfig createProxyConfig(String identity,String proxy,String route,boolean enableRegister) throws LinphoneCoreException;
|
||||
/**
|
||||
* clear all added proxy config
|
||||
*/
|
||||
|
|
@ -88,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);
|
||||
|
||||
|
|
@ -123,7 +127,7 @@ public interface LinphoneCore {
|
|||
/**
|
||||
* @return a list of LinphoneCallLog
|
||||
*/
|
||||
public List<LinphoneCallLog> getCallLogs();
|
||||
public List getCallLogs();
|
||||
|
||||
/**
|
||||
* This method is called by the application to notify the Linphone core library when network is reachable.
|
||||
|
|
@ -158,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
|
||||
|
|
|
|||
|
|
@ -21,33 +21,46 @@ package org.linphone.core;
|
|||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
public class LinphoneCoreFactory {
|
||||
|
||||
abstract public class LinphoneCoreFactory {
|
||||
|
||||
private static String defaulfFactory = "org.linphone.core.LinphoneCoreFactoryImpl";
|
||||
static {
|
||||
System.loadLibrary("linphone");
|
||||
}
|
||||
static LinphoneCoreFactory theLinphoneCoreFactory = new LinphoneCoreFactory();
|
||||
static LinphoneCoreFactory theLinphoneCoreFactory;
|
||||
/**
|
||||
* Indicate the name of the class used by this factory
|
||||
* @param pathName
|
||||
*/
|
||||
static void setFactoryClassName (String className) {
|
||||
defaulfFactory = className;
|
||||
}
|
||||
|
||||
public static LinphoneCoreFactory instance() {
|
||||
|
||||
try {
|
||||
if (theLinphoneCoreFactory == null) {
|
||||
Class lFactoryClass = Class.forName(defaulfFactory);
|
||||
theLinphoneCoreFactory = (LinphoneCoreFactory) lFactoryClass.newInstance();
|
||||
}
|
||||
} catch (Exception e) {
|
||||
System.err.println("cannot instanciate factory ["+defaulfFactory+"]");
|
||||
}
|
||||
return theLinphoneCoreFactory;
|
||||
}
|
||||
public LinphoneAuthInfo createAuthInfo(String username,String password) {
|
||||
return new LinphoneAuthInfoImpl(username,password) ;
|
||||
}
|
||||
abstract public LinphoneAuthInfo createAuthInfo(String username,String password);
|
||||
|
||||
public LinphoneCore createLinphoneCore(LinphoneCoreListener listener, File userConfig,File factoryConfig,Object userdata) throws IOException {
|
||||
return new LinphoneCoreImpl(listener,userConfig,factoryConfig,userdata);
|
||||
}
|
||||
abstract public LinphoneCore createLinphoneCore(LinphoneCoreListener listener, File userConfig,File factoryConfig,Object userdata) throws IOException;
|
||||
|
||||
public LinphoneAddress createLinphoneAddress(String username,String domain,String displayName) {
|
||||
return new LinphoneAddressImpl(username,domain,displayName);
|
||||
}
|
||||
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
|
||||
* @param enable
|
||||
* @param enable
|
||||
*/
|
||||
public native void setDebugMode(boolean enable);
|
||||
abstract public void setDebugMode(boolean enable);
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue