mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-22 21:58:08 +00:00
add about menu
This commit is contained in:
parent
083b74b925
commit
d4015a2afb
4 changed files with 32 additions and 1 deletions
|
|
@ -34,7 +34,11 @@ public interface LinphoneAddress {
|
|||
* @return null if not set
|
||||
*/
|
||||
public String getDomain();
|
||||
|
||||
/**
|
||||
* set display name
|
||||
* @param name
|
||||
*/
|
||||
public void setDisplayName(String name);
|
||||
/**
|
||||
* @return an URI version of the address that can be used to place a call using {@link LinphoneCore#invite(String)}
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -29,6 +29,8 @@ public class LinphoneAddressImpl implements LinphoneAddress {
|
|||
private native String getUserName(long ptr);
|
||||
private native String getDomain(long ptr);
|
||||
private native String toUri(long ptr);
|
||||
private native String setDisplayName(long ptr,String name);
|
||||
|
||||
|
||||
protected LinphoneAddressImpl(String username,String domain,String displayName) {
|
||||
nativePtr = newLinphoneAddressImpl("sip:"+username+"@"+domain, displayName);
|
||||
|
|
@ -56,5 +58,8 @@ public class LinphoneAddressImpl implements LinphoneAddress {
|
|||
public String toUri() {
|
||||
return toUri(nativePtr);
|
||||
}
|
||||
public void setDisplayName(String name) {
|
||||
setDisplayName(nativePtr,name);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -90,6 +90,8 @@ public interface LinphoneCore {
|
|||
|
||||
public void invite(String uri);
|
||||
|
||||
public void invite(LinphoneAddress to);
|
||||
|
||||
public void terminateCall();
|
||||
/**
|
||||
* get the remote address in case of in/out call
|
||||
|
|
@ -151,6 +153,13 @@ public interface LinphoneCore {
|
|||
* @param isMuted
|
||||
*/
|
||||
public void muteMic(boolean isMuted);
|
||||
/**
|
||||
* 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;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,6 +52,8 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
private native void setSoftPlayLevel(long nativeptr, float gain);
|
||||
private native float getSoftPlayLevel(long nativeptr);
|
||||
private native void muteMic(long nativePtr,boolean isMuted);
|
||||
private native long interpretUrl(long nativePtr,String destination);
|
||||
private native void inviteAddress(long nativePtr,long to);
|
||||
|
||||
|
||||
LinphoneCoreImpl(LinphoneCoreListener listener, File userConfig,File factoryConfig,Object userdata) throws IOException {
|
||||
|
|
@ -169,4 +171,15 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
public void muteMic(boolean isMuted) {
|
||||
muteMic(nativePtr,isMuted);
|
||||
}
|
||||
public LinphoneAddress interpretUrl(String destination) throws LinphoneCoreException {
|
||||
long lAddress = interpretUrl(nativePtr,destination);
|
||||
if (lAddress != 0) {
|
||||
return new LinphoneAddressImpl(lAddress);
|
||||
} else {
|
||||
throw new LinphoneCoreException("Cannot interpret ["+destination+"]");
|
||||
}
|
||||
}
|
||||
public void invite(LinphoneAddress to) {
|
||||
inviteAddress(nativePtr,((LinphoneAddressImpl)to).nativePtr);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue