mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-19 20:18:09 +00:00
add presence and messaging apis
This commit is contained in:
parent
728865a441
commit
2804666ea8
2 changed files with 27 additions and 0 deletions
|
|
@ -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));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue