mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-03 03:39:27 +00:00
add codec management
start OUTGOING Call intent management
This commit is contained in:
parent
41510592f2
commit
75f5c45f15
4 changed files with 68 additions and 1 deletions
|
|
@ -62,4 +62,10 @@ public class LinphoneCoreFactoryImpl extends LinphoneCoreFactory {
|
|||
|
||||
@Override
|
||||
public native void setDebugMode(boolean enable);
|
||||
|
||||
@Override
|
||||
public void setLogHandler(LinphoneLogHandler handler) {
|
||||
//not implemented on Android
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -56,7 +56,8 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
private native void sendDtmf(long nativePtr,char dtmf);
|
||||
private native void clearCallLogs(long nativePtr);
|
||||
private native boolean isMicMuted(long nativePtr);
|
||||
|
||||
private native long findPayloadType(long nativePtr, String mime, int clockRate);
|
||||
private native int enablePayloadType(long nativePtr, long payloadType, boolean enable);
|
||||
|
||||
LinphoneCoreImpl(LinphoneCoreListener listener, File userConfig,File factoryConfig,Object userdata) throws IOException {
|
||||
mListener=listener;
|
||||
|
|
@ -190,4 +191,19 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
public boolean isMicMuted() {
|
||||
return isMicMuted(nativePtr);
|
||||
}
|
||||
public PayloadType findPayloadType(String mime, int clockRate) {
|
||||
long playLoadType = findPayloadType(nativePtr, mime, clockRate);
|
||||
if (playLoadType == 0) {
|
||||
return null;
|
||||
} else {
|
||||
return new PayloadTypeImpl(playLoadType);
|
||||
}
|
||||
}
|
||||
public void enablePayloadType(PayloadType pt, boolean enable)
|
||||
throws LinphoneCoreException {
|
||||
if (enablePayloadType(nativePtr,((PayloadTypeImpl)pt).nativePtr,enable) != 0) {
|
||||
throw new LinphoneCoreException("cannot enable payload type ["+pt+"]");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -69,6 +69,9 @@ class LinphoneProxyConfigImpl implements LinphoneProxyConfig {
|
|||
|
||||
private native void setDialEscapePlus(long ptr, boolean value);
|
||||
|
||||
private native String getRoute(long ptr);
|
||||
private native int setRoute(long ptr,String uri);
|
||||
|
||||
public void enableRegister(boolean value) {
|
||||
enableRegister(nativePtr,value);
|
||||
}
|
||||
|
|
@ -114,4 +117,12 @@ class LinphoneProxyConfigImpl implements LinphoneProxyConfig {
|
|||
public boolean registerEnabled() {
|
||||
return isRegisterEnabled(nativePtr);
|
||||
}
|
||||
public String getRoute() {
|
||||
return getRoute(nativePtr);
|
||||
}
|
||||
public void setRoute(String routeUri) throws LinphoneCoreException {
|
||||
if (setRoute(nativePtr, routeUri) != 0) {
|
||||
throw new LinphoneCoreException("cannot set route ["+routeUri+"]");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
34
PayloadTypeImpl.java
Normal file
34
PayloadTypeImpl.java
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
PayloadTypeImpl.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;
|
||||
|
||||
class PayloadTypeImpl implements PayloadType {
|
||||
|
||||
protected final long nativePtr;
|
||||
|
||||
private native String toString(long ptr);
|
||||
|
||||
protected PayloadTypeImpl(long aNativePtr) {
|
||||
nativePtr = aNativePtr;
|
||||
}
|
||||
public String toString() {
|
||||
return toString(nativePtr);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue