mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-26 15:48:09 +00:00
added JNI method for isPresenceReceivedon LinphoneFrined
This commit is contained in:
parent
f10471de2e
commit
0215e014f4
3 changed files with 18 additions and 0 deletions
|
|
@ -1649,6 +1649,14 @@ extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_isInCall(JNIEnv* env
|
|||
|
||||
return (jboolean)linphone_core_in_call((LinphoneCore*)lc);
|
||||
}
|
||||
|
||||
extern "C" jboolean Java_org_linphone_core_LinphoneFriendImpl_isPresenceReceived(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong lf) {
|
||||
|
||||
return (jboolean)linphone_friend_is_presence_received((LinphoneFriend*)lf);
|
||||
}
|
||||
|
||||
extern "C" jboolean Java_org_linphone_core_LinphoneCoreImpl_isInComingInvitePending(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong lc) {
|
||||
|
|
|
|||
|
|
@ -102,6 +102,12 @@ public interface LinphoneFriend {
|
|||
* @return true is subscription is activated for this friend.
|
||||
*/
|
||||
boolean isSubscribesEnabled();
|
||||
|
||||
/**
|
||||
* get presence received status if already setted
|
||||
* @return true if presence is received from this friend.
|
||||
*/
|
||||
boolean isPresenceReceived();
|
||||
/**
|
||||
* @brief Get the status of a friend
|
||||
* @return OnlineStatus
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ class LinphoneFriendImpl implements LinphoneFriend, Serializable {
|
|||
private native int getIncSubscribePolicy(long nativePtr);
|
||||
private native void enableSubscribes(long nativePtr,boolean value);
|
||||
private native boolean isSubscribesEnabled(long nativePtr);
|
||||
private native boolean isPresenceReceived(long nativePtr);
|
||||
private native int getStatus(long nativePtr);
|
||||
private native Object getPresenceModel(long nativePtr);
|
||||
private native void setPresenceModel(long nativePtr, long presencePtr);
|
||||
|
|
@ -82,6 +83,9 @@ class LinphoneFriendImpl implements LinphoneFriend, Serializable {
|
|||
public boolean isSubscribesEnabled() {
|
||||
return isSubscribesEnabled(nativePtr);
|
||||
}
|
||||
public boolean isPresenceReceived() {
|
||||
return isPresenceReceived(nativePtr);
|
||||
}
|
||||
public OnlineStatus getStatus() {
|
||||
return OnlineStatus.fromInt(getStatus(nativePtr));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue