Refactor LinphonecoreFactory

This commit is contained in:
Jehan Monnier 2010-04-27 14:59:03 +02:00
parent 723ecc0c26
commit 83d0690898
6 changed files with 43 additions and 6 deletions

Binary file not shown.

View file

@ -227,7 +227,7 @@ public class LinphoneService extends Service implements LinphoneCoreListener {
String lIdentity = "sip:"+lUserName+"@"+lDomain;
try {
if (lDefaultProxyConfig == null) {
lDefaultProxyConfig = mLinphoneCore.createProxyConfig(lIdentity, lProxy, null,true);
lDefaultProxyConfig = LinphoneCoreFactory.instance().createProxyConfig(lIdentity, lProxy, null,true);
mLinphoneCore.addProxyConfig(lDefaultProxyConfig);
mLinphoneCore.setDefaultProxyConfig(lDefaultProxyConfig);

View file

@ -28,4 +28,29 @@ class LinphoneAuthInfoImpl implements LinphoneAuthInfo {
protected void finalize() throws Throwable {
delete(nativePtr);
}
public String getPassword() {
// TODO Auto-generated method stub
throw new RuntimeException("not implemeneted yet");
}
public String getRealm() {
// TODO Auto-generated method stub
throw new RuntimeException("not implemeneted yet");
}
public String getUsername() {
// TODO Auto-generated method stub
throw new RuntimeException("not implemeneted yet");
}
public void setPassword(String password) {
// TODO Auto-generated method stub
throw new RuntimeException("not implemeneted yet");
}
public void setRealm(String realm) {
// TODO Auto-generated method stub
throw new RuntimeException("not implemeneted yet");
}
public void setUsername(String username) {
// TODO Auto-generated method stub
throw new RuntimeException("not implemeneted yet");
}
}

View file

@ -72,10 +72,7 @@ class LinphoneCoreImpl implements LinphoneCore {
addAuthInfo(nativePtr,((LinphoneAuthInfoImpl)info).nativePtr);
}
public synchronized LinphoneProxyConfig createProxyConfig(String identity, String proxy,String route,boolean enableRegister) throws LinphoneCoreException {
isValid();
return new LinphoneProxyConfigImpl(identity, proxy, route,enableRegister);
}
public synchronized LinphoneProxyConfig getDefaultProxyConfig() {
isValid();

View file

@ -97,4 +97,19 @@ class LinphoneProxyConfigImpl implements LinphoneProxyConfig {
public void setDialEscapePlus(boolean value) {
setDialEscapePlus(nativePtr,value);
}
public String getIdentity() {
throw new RuntimeException("not implemeneted yet");
}
public String getProxy() {
// TODO Auto-generated method stub
throw new RuntimeException("not implemeneted yet");
}
public boolean isRegistered() {
// TODO Auto-generated method stub
throw new RuntimeException("not implemeneted yet");
}
public boolean registerEnabled() {
// TODO Auto-generated method stub
throw new RuntimeException("not implemeneted yet");
}
}

@ -1 +1 @@
Subproject commit da5f0737578936881ed77d88525cb9bf6cc4961b
Subproject commit 572b696529119810350e083cec72e59b2d3e75d5