mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-19 12:08:11 +00:00
add status bar
This commit is contained in:
parent
a9a5d5d19a
commit
41510592f2
6 changed files with 107 additions and 14 deletions
|
|
@ -66,5 +66,32 @@ public class LinphoneAddressImpl implements LinphoneAddress {
|
|||
public void setDisplayName(String name) {
|
||||
setDisplayName(nativePtr,name);
|
||||
}
|
||||
public String asString() {
|
||||
return toString();
|
||||
}
|
||||
public String asStringUriOnly() {
|
||||
return toUri(nativePtr);
|
||||
}
|
||||
public void clean() {
|
||||
throw new RuntimeException("Not implemented");
|
||||
}
|
||||
public String getPort() {
|
||||
return String.valueOf(getPortInt());
|
||||
}
|
||||
public int getPortInt() {
|
||||
return getPortInt();
|
||||
}
|
||||
public void setDomain(String domain) {
|
||||
throw new RuntimeException("Not implemented");
|
||||
}
|
||||
public void setPort(String port) {
|
||||
throw new RuntimeException("Not implemented");
|
||||
}
|
||||
public void setPortInt(int port) {
|
||||
throw new RuntimeException("Not implemented");
|
||||
}
|
||||
public void setUserName(String username) {
|
||||
throw new RuntimeException("Not implemented");
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -22,8 +22,8 @@ class LinphoneAuthInfoImpl implements LinphoneAuthInfo {
|
|||
protected final long nativePtr;
|
||||
private native long newLinphoneAuthInfo(String username, String userid, String passwd, String ha1,String realm);
|
||||
private native void delete(long ptr);
|
||||
protected LinphoneAuthInfoImpl(String username,String password) {
|
||||
nativePtr = newLinphoneAuthInfo(username,null,password,null,null);
|
||||
protected LinphoneAuthInfoImpl(String username,String password, String realm) {
|
||||
nativePtr = newLinphoneAuthInfo(username,null,password,null,realm);
|
||||
}
|
||||
protected void finalize() throws Throwable {
|
||||
delete(nativePtr);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class LinphoneCallLogImpl implements LinphoneCallLog {
|
|||
|
||||
|
||||
public CallDirection getDirection() {
|
||||
return isIncoming(nativePtr)?CallDirection.Callincoming:CallDirection.CallOutgoing;
|
||||
return isIncoming(nativePtr)?CallDirection.Incoming:CallDirection.Outgoing;
|
||||
}
|
||||
|
||||
public LinphoneAddress getFrom() {
|
||||
|
|
|
|||
65
LinphoneCoreFactoryImpl.java
Normal file
65
LinphoneCoreFactoryImpl.java
Normal file
|
|
@ -0,0 +1,65 @@
|
|||
/*
|
||||
LinphoneCoreFactoryImpl.java
|
||||
Copyright (C) 2010 Belledonne Communications, Grenoble, France
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
*/
|
||||
package org.linphone.core;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
|
||||
public class LinphoneCoreFactoryImpl extends LinphoneCoreFactory {
|
||||
|
||||
static {
|
||||
System.loadLibrary("linphone");
|
||||
}
|
||||
@Override
|
||||
public LinphoneAuthInfo createAuthInfo(String username, String password,
|
||||
String realm) {
|
||||
return new LinphoneAuthInfoImpl(username,password,realm);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LinphoneAddress createLinphoneAddress(String username,
|
||||
String domain, String displayName) {
|
||||
return new LinphoneAddressImpl(username,domain,displayName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public LinphoneAddress createLinphoneAddress(String address) {
|
||||
throw new RuntimeException("Not implemeneted yet");
|
||||
}
|
||||
|
||||
@Override
|
||||
public LinphoneCore createLinphoneCore(LinphoneCoreListener listener,
|
||||
String userConfig, String factoryConfig, Object userdata)
|
||||
throws LinphoneCoreException {
|
||||
try {
|
||||
return new LinphoneCoreImpl(listener,new File(userConfig),new File(factoryConfig),userdata);
|
||||
} catch (IOException e) {
|
||||
throw new LinphoneCoreException("Cannot create LinphoneCore",e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public LinphoneProxyConfig createProxyConfig(String identity, String proxy,
|
||||
String route, boolean enableRegister) throws LinphoneCoreException {
|
||||
return new LinphoneProxyConfigImpl(identity,proxy,route,enableRegister);
|
||||
}
|
||||
|
||||
@Override
|
||||
public native void setDebugMode(boolean enable);
|
||||
}
|
||||
|
|
@ -20,8 +20,7 @@ package org.linphone.core;
|
|||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Vector;
|
||||
|
||||
|
||||
class LinphoneCoreImpl implements LinphoneCore {
|
||||
|
|
@ -139,9 +138,9 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
acceptCall(nativePtr);
|
||||
|
||||
}
|
||||
public synchronized List<LinphoneCallLog> getCallLogs() {
|
||||
public synchronized Vector<LinphoneCallLog> getCallLogs() {
|
||||
isValid();
|
||||
List<LinphoneCallLog> logs = new ArrayList<LinphoneCallLog>();
|
||||
Vector<LinphoneCallLog> logs = new Vector<LinphoneCallLog>();
|
||||
for (int i=0;i < getNumberOfCallLogs(nativePtr);i++) {
|
||||
logs.add(new LinphoneCallLogImpl(getCallLog(nativePtr, i)));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,10 +52,15 @@ class LinphoneProxyConfigImpl implements LinphoneProxyConfig {
|
|||
private native void done(long ptr);
|
||||
|
||||
private native void setIdentity(long ptr,String identity);
|
||||
private native String getIdentity(long ptr);
|
||||
private native int setProxy(long ptr,String proxy);
|
||||
private native String getProxy(long ptr);
|
||||
|
||||
|
||||
private native void enableRegister(long ptr,boolean value);
|
||||
private native boolean isRegisterEnabled(long ptr);
|
||||
|
||||
private native boolean isRegistered(long ptr);
|
||||
private native void setDialPrefix(long ptr, String prefix);
|
||||
|
||||
private native String normalizePhoneNumber(long ptr,String number);
|
||||
|
|
@ -98,18 +103,15 @@ class LinphoneProxyConfigImpl implements LinphoneProxyConfig {
|
|||
setDialEscapePlus(nativePtr,value);
|
||||
}
|
||||
public String getIdentity() {
|
||||
throw new RuntimeException("not implemeneted yet");
|
||||
return getIdentity(nativePtr);
|
||||
}
|
||||
public String getProxy() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new RuntimeException("not implemeneted yet");
|
||||
return getProxy(nativePtr);
|
||||
}
|
||||
public boolean isRegistered() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new RuntimeException("not implemeneted yet");
|
||||
return isRegistered(nativePtr);
|
||||
}
|
||||
public boolean registerEnabled() {
|
||||
// TODO Auto-generated method stub
|
||||
throw new RuntimeException("not implemeneted yet");
|
||||
return isRegisterEnabled(nativePtr);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue