add presence and messaging apis
This commit is contained in:
parent
721e36f5d9
commit
e1f1d7841b
7 changed files with 61 additions and 1 deletions
Binary file not shown.
Binary file not shown.
|
@ -20,9 +20,11 @@ package org.linphone;
|
|||
|
||||
import org.linphone.core.LinphoneAddress;
|
||||
import org.linphone.core.LinphoneCall;
|
||||
import org.linphone.core.LinphoneChatRoom;
|
||||
import org.linphone.core.LinphoneCore;
|
||||
import org.linphone.core.LinphoneCoreException;
|
||||
import org.linphone.core.LinphoneCoreListener;
|
||||
import org.linphone.core.LinphoneFriend;
|
||||
import org.linphone.core.LinphoneProxyConfig;
|
||||
import org.linphone.core.LinphoneCall.State;
|
||||
|
||||
|
@ -583,4 +585,18 @@ public class DialerActivity extends Activity implements LinphoneCoreListener {
|
|||
aButton.setOnTouchListener(lListener);
|
||||
|
||||
}
|
||||
public void newSubscriptionRequest(LinphoneCore lc, LinphoneFriend lf,
|
||||
String url) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
public void notifyPresenceReceived(LinphoneCore lc, LinphoneFriend lf) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
public void textReceived(LinphoneCore lc, LinphoneChatRoom cr,
|
||||
LinphoneAddress from, String message) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,12 +26,15 @@ import java.io.InputStream;
|
|||
import java.util.Timer;
|
||||
import java.util.TimerTask;
|
||||
|
||||
import org.linphone.core.LinphoneAddress;
|
||||
import org.linphone.core.LinphoneAuthInfo;
|
||||
import org.linphone.core.LinphoneCall;
|
||||
import org.linphone.core.LinphoneChatRoom;
|
||||
import org.linphone.core.LinphoneCore;
|
||||
import org.linphone.core.LinphoneCoreException;
|
||||
import org.linphone.core.LinphoneCoreFactory;
|
||||
import org.linphone.core.LinphoneCoreListener;
|
||||
import org.linphone.core.LinphoneFriend;
|
||||
import org.linphone.core.LinphoneProxyConfig;
|
||||
import org.linphone.core.PayloadType;
|
||||
import org.linphone.core.LinphoneCall.State;
|
||||
|
@ -406,6 +409,20 @@ public class LinphoneService extends Service implements LinphoneCoreListener {
|
|||
theLinphone=null;
|
||||
mNotificationManager.cancel(NOTIFICATION_ID);
|
||||
}
|
||||
public void newSubscriptionRequest(LinphoneCore lc, LinphoneFriend lf,
|
||||
String url) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
public void notifyPresenceReceived(LinphoneCore lc, LinphoneFriend lf) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
public void textReceived(LinphoneCore lc, LinphoneChatRoom cr,
|
||||
LinphoneAddress from, String message) {
|
||||
// TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -68,4 +68,14 @@ public class LinphoneCoreFactoryImpl extends LinphoneCoreFactory {
|
|||
//not implemented on Android
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
LinphoneFriend createLinphoneFriend(String friendUri) {
|
||||
return new LinphoneFriendImpl(friendUri);
|
||||
}
|
||||
|
||||
@Override
|
||||
LinphoneFriend createLinphoneFriend() {
|
||||
return createLinphoneFriend(null);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,6 +64,10 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
private native void playDtmf(long nativePtr,char dtmf,int duration);
|
||||
private native void stopDtmf(long nativePtr);
|
||||
|
||||
private native void addFriend(long nativePtr,long friend);
|
||||
private native void setPresenceInfo(long nativePtr,int minute_away, String alternative_contact,int status);
|
||||
private native long createChatRoom(long nativePtr,String to);
|
||||
|
||||
LinphoneCoreImpl(LinphoneCoreListener listener, File userConfig,File factoryConfig,Object userdata) throws IOException {
|
||||
mListener=listener;
|
||||
nativePtr = newLinphoneCore(listener,userConfig.getCanonicalPath(),factoryConfig.getCanonicalPath(),userdata);
|
||||
|
@ -270,5 +274,18 @@ class LinphoneCoreImpl implements LinphoneCore {
|
|||
public void stopDtmf() {
|
||||
stopDtmf(nativePtr);
|
||||
}
|
||||
|
||||
public void addFriend(LinphoneFriend lf) throws LinphoneCoreException {
|
||||
addFriend(nativePtr,((LinphoneFriendImpl)lf).nativePtr);
|
||||
|
||||
}
|
||||
public void setPresenceInfo(int minute_away, String alternative_contact,
|
||||
OnlineStatus status) {
|
||||
setPresenceInfo(nativePtr,minute_away,alternative_contact,status.mValue);
|
||||
|
||||
}
|
||||
public LinphoneChatRoom createChatRoom(String to) {
|
||||
return new LinphoneChatRoomImpl(createChatRoom(nativePtr,to));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 804d489321b28ffa410c5f0eef8e74f0a6a5a30a
|
||||
Subproject commit 47278cc2179939f8881eecaa3a2a695cb4f396a7
|
Loading…
Reference in a new issue