mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-19 03:58:08 +00:00
Missing wrapper files
This commit is contained in:
parent
e54b075fbc
commit
342d404c35
2 changed files with 107 additions and 0 deletions
27
java/common/org/linphone/core/LinphoneFriendList.java
Normal file
27
java/common/org/linphone/core/LinphoneFriendList.java
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
/*
|
||||
LinphoneFriend.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;
|
||||
|
||||
|
||||
public interface LinphoneFriendList {
|
||||
public void setRLSUri(String uri);
|
||||
public void addFriend(LinphoneFriend friend);
|
||||
public void updateSubscriptions(LinphoneProxyConfig proxyConfig,boolean onlyWhenRegistered);
|
||||
long getNativePtr();
|
||||
}
|
||||
80
java/impl/org/linphone/core/LinphoneFriendListImpl.java
Normal file
80
java/impl/org/linphone/core/LinphoneFriendListImpl.java
Normal file
|
|
@ -0,0 +1,80 @@
|
|||
/*
|
||||
LinphoneFriendImpl.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.Serializable;
|
||||
import org.linphone.core.LinphoneProxyConfigImpl;
|
||||
|
||||
class LinphoneFriendListImpl implements LinphoneFriendList, Serializable {
|
||||
|
||||
protected final long nativePtr;
|
||||
private native void finalize(long nativePtr);
|
||||
private native long newLinphoneFriendList(long corePtr);
|
||||
private native void setRLSUri(long nativePtr,String uri);
|
||||
private native void addFriend(long nativePtr,long friendPtr);
|
||||
private native void updateSubscriptions(long nativePtr,long proxyConfigPtr,boolean onlyWhenRegistered);
|
||||
private native Object getCore(long ptr);
|
||||
|
||||
|
||||
protected LinphoneFriendListImpl(LinphoneCoreImpl core) {
|
||||
nativePtr = newLinphoneFriendList(core.nativePtr);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setRLSUri(String uri) {
|
||||
synchronized(getSyncObject()){
|
||||
setRLSUri(nativePtr, uri);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addFriend(LinphoneFriend friend) {
|
||||
synchronized(getSyncObject()){
|
||||
addFriend(nativePtr, friend.getNativePtr());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateSubscriptions(LinphoneProxyConfig proxyConfig,boolean onlyWhenRegistered) {
|
||||
synchronized(getSyncObject()){
|
||||
updateSubscriptions(nativePtr, ((LinphoneProxyConfigImpl)proxyConfig).nativePtr,onlyWhenRegistered);
|
||||
}
|
||||
}
|
||||
|
||||
/*reserved for JNI */
|
||||
protected LinphoneFriendListImpl(long aNativePtr) {
|
||||
nativePtr = aNativePtr;
|
||||
}
|
||||
@Override
|
||||
protected void finalize() throws Throwable {
|
||||
if (nativePtr != 0) {
|
||||
finalize(nativePtr);
|
||||
}
|
||||
super.finalize();
|
||||
}
|
||||
|
||||
@Override
|
||||
public long getNativePtr() {
|
||||
return nativePtr;
|
||||
}
|
||||
private Object getSyncObject(){
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Add table
Reference in a new issue