mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-05-07 05:53:06 +00:00
Added method to set PreseceModel to a LinphoneFriend
This commit is contained in:
parent
9ea6076deb
commit
16e21507be
3 changed files with 15 additions and 1 deletions
|
|
@ -3643,7 +3643,7 @@ extern "C" void Java_org_linphone_core_LinphoneFriendImpl_finalize(JNIEnv* env
|
|||
linphone_friend_unref(lfriend);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneFriendListImpl_finalize(JNIEnv* env
|
||||
extern "C" void Java_org_linphone_core_LinphoneFriendListImpl_finalize(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong ptr) {
|
||||
LinphoneFriendList *lfriendList=(LinphoneFriendList*)ptr;
|
||||
|
|
@ -3651,6 +3651,12 @@ extern "C" void Java_org_linphone_core_LinphoneFriendListImpl_finalize(JNIEnv*
|
|||
linphone_friend_list_unref(lfriendList);
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneFriendImpl_setPresenceModel(JNIEnv *env, jobject jobj, jlong ptr, jlong modelPtr) {
|
||||
LinphoneFriend *lf = (LinphoneFriend *)ptr;
|
||||
LinphonePresenceModel *model = (LinphonePresenceModel *)modelPtr;
|
||||
linphone_friend_set_presence_model(lf, model);
|
||||
}
|
||||
|
||||
/*
|
||||
* Class: org_linphone_core_LinphoneFriendImpl
|
||||
* Method: getPresenceModel
|
||||
|
|
|
|||
|
|
@ -113,6 +113,11 @@ public interface LinphoneFriend {
|
|||
* @return A #PresenceModel object, or null if the friend do not have presence information (in which case he is considered offline)
|
||||
*/
|
||||
PresenceModel getPresenceModel();
|
||||
/**
|
||||
* @brief Set the presence information of a friend
|
||||
* @param presenceModel A #PresenceModel object
|
||||
*/
|
||||
void setPresenceModel(PresenceModel presenceModel);
|
||||
/**
|
||||
* Starts editing a friend configuration.
|
||||
*<br> Because friend configuration must be consistent, applications MUST call {@link #edit()} before doing any attempts to modify friend configuration (such as address or subscription policy and so on).
|
||||
|
|
|
|||
|
|
@ -88,6 +88,9 @@ class LinphoneFriendImpl implements LinphoneFriend, Serializable {
|
|||
public PresenceModel getPresenceModel() {
|
||||
return (PresenceModel)getPresenceModel(nativePtr);
|
||||
}
|
||||
public void setPresenceModel(PresenceModel presenceModel) {
|
||||
setPresenceModel(nativePtr, ((PresenceModelImpl)presenceModel).getNativePtr());
|
||||
}
|
||||
public void edit() {
|
||||
synchronized(getSyncObject()){
|
||||
edit(nativePtr);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue