Merge branch 'master' of belledonne-communications.com:linphone-android
This commit is contained in:
commit
db32105df4
3 changed files with 118 additions and 1 deletions
|
@ -33,6 +33,6 @@ public class BootReceiver extends BroadcastReceiver {
|
|||
lLinphoneServiceIntent.setClass(context, LinphoneService.class);
|
||||
context.startService(lLinphoneServiceIntent);;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
37
src/org/linphone/core/LinphoneChatRoomImpl.java
Normal file
37
src/org/linphone/core/LinphoneChatRoomImpl.java
Normal file
|
@ -0,0 +1,37 @@
|
|||
/*
|
||||
LinphoneChatRoomImpl.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 LinphoneChatRoomImpl implements LinphoneChatRoom {
|
||||
protected final long nativePtr;
|
||||
private native long getPeerAddress(long ptr);
|
||||
private native void sendMessage(long ptr, String message);
|
||||
|
||||
protected LinphoneChatRoomImpl(long aNativePtr) {
|
||||
nativePtr = aNativePtr;
|
||||
}
|
||||
|
||||
public LinphoneAddress getPeerAddress() {
|
||||
return new LinphoneAddressImpl(getPeerAddress(nativePtr));
|
||||
}
|
||||
|
||||
public void sendMessage(String message) {
|
||||
sendMessage(nativePtr,message);
|
||||
}
|
||||
}
|
80
src/org/linphone/core/LinphoneFriendImpl.java
Normal file
80
src/org/linphone/core/LinphoneFriendImpl.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;
|
||||
|
||||
class LinphoneFriendImpl implements LinphoneFriend {
|
||||
protected final long nativePtr;
|
||||
private native long newLinphoneFriend(String friendUri);
|
||||
private native void setAddress(long nativePtr,long friend);
|
||||
private native long getAddress(long nativePtr);
|
||||
private native void setIncSubscribePolicy(long nativePtr,int enumValue);
|
||||
private native int getIncSubscribePolicy(long nativePtr);
|
||||
private native void enableSubscribes(long nativePtr,boolean value);
|
||||
private native boolean isSubscribesEnabled(long nativePtr);
|
||||
private native int getStatus(long nativePtr);
|
||||
private native void edit(long nativePtr);
|
||||
private native void done(long nativePtr);
|
||||
|
||||
private native void delete(long ptr);
|
||||
boolean ownPtr = false;
|
||||
protected LinphoneFriendImpl() {
|
||||
nativePtr = newLinphoneFriend(null);
|
||||
}
|
||||
protected LinphoneFriendImpl(String friendUri) {
|
||||
nativePtr = newLinphoneFriend(friendUri);
|
||||
}
|
||||
protected LinphoneFriendImpl(long aNativePtr) {
|
||||
nativePtr = aNativePtr;
|
||||
ownPtr=false;
|
||||
}
|
||||
protected void finalize() throws Throwable {
|
||||
if (ownPtr) delete(nativePtr);
|
||||
}
|
||||
public void setAddress(LinphoneAddress anAddress) {
|
||||
this.setAddress(nativePtr, ((LinphoneAddressImpl)anAddress).nativePtr);
|
||||
|
||||
}
|
||||
public LinphoneAddress getAddress() {
|
||||
return new LinphoneAddressImpl(getAddress(nativePtr));
|
||||
}
|
||||
public void setIncSubscribePolicy(SubscribePolicy policy) {
|
||||
setIncSubscribePolicy(nativePtr,policy.mValue);
|
||||
|
||||
}
|
||||
public SubscribePolicy getIncSubscribePolicy() {
|
||||
return SubscribePolicy.fromInt(getIncSubscribePolicy(nativePtr)) ;
|
||||
}
|
||||
public void enableSubscribes(boolean enable) {
|
||||
enableSubscribes(nativePtr, enable);
|
||||
}
|
||||
public boolean isSubscribesEnabled() {
|
||||
return isSubscribesEnabled(nativePtr);
|
||||
}
|
||||
|
||||
public OnlineStatus getStatus() {
|
||||
return OnlineStatus.fromInt(getStatus(nativePtr));
|
||||
}
|
||||
public void edit() {
|
||||
edit(nativePtr);
|
||||
}
|
||||
public void done() {
|
||||
done(nativePtr);
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue