Merge commit '1eff817' into belle-sip

This commit is contained in:
Jehan Monnier 2013-05-22 15:51:56 +02:00
commit da87ffc3e6
3 changed files with 7 additions and 3 deletions

View file

@ -81,8 +81,9 @@ abstract public class LinphoneCoreFactory {
* Constructs a LinphoneAddress object by parsing the user supplied address, given as a string.
* @param address should be like sip:joe@sip.linphone.org
* @return
* @throws LinphoneCoreException if address cannot be parsed
*/
abstract public LinphoneAddress createLinphoneAddress(String address);
abstract public LinphoneAddress createLinphoneAddress(String address) throws LinphoneCoreException;
abstract public LpConfig createLpConfig(String file);
abstract public LinphoneProxyConfig createProxyConfig(String identity, String proxy,String route,boolean enableRegister) throws LinphoneCoreException;

View file

@ -34,8 +34,11 @@ public class LinphoneAddressImpl implements LinphoneAddress {
private native void setUserName(long ptr,String username);
private native String toString(long ptr);
protected LinphoneAddressImpl(String identity) {
protected LinphoneAddressImpl(String identity) throws LinphoneCoreException{
nativePtr = newLinphoneAddressImpl(identity, null);
if(nativePtr==0) {
throw new LinphoneCoreException("Cannot create LinphoneAdress from ["+identity+"]");
}
}
protected LinphoneAddressImpl(String username,String domain,String displayName) {

View file

@ -102,7 +102,7 @@ public class LinphoneCoreFactoryImpl extends LinphoneCoreFactory {
}
@Override
public LinphoneAddress createLinphoneAddress(String identity) {
public LinphoneAddress createLinphoneAddress(String identity) throws LinphoneCoreException {
return new LinphoneAddressImpl(identity);
}