Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
0399162c
Commit
0399162c
authored
Aug 23, 2017
by
Brieuc Viel
Browse files
[FriendsImpl] update java wrapper to add function getVcardToString from friend
parent
e25d0c3e
Changes
4
Hide whitespace changes
Inline
Side-by-side
coreapi/linphonecore_jni.cc
View file @
0399162c
...
...
@@ -4284,6 +4284,15 @@ extern "C" jobject Java_org_linphone_core_LinphoneFriendImpl_getCore(JNIEnv* en
return
NULL
;
}
extern
"C"
jstring
Java_org_linphone_core_LinphoneFriendImpl_getVcardToString
(
JNIEnv
*
env
,
jobject
thiz
,
jlong
ptr
)
{
LinphoneFriend
*
lf
=
(
LinphoneFriend
*
)
ptr
;
LinphoneVcard
*
lvc
=
linphone_friend_get_vcard
(
lf
);
const
char
*
vcard
=
linphone_vcard_as_vcard4_string
(
lvc
);
return
vcard
?
env
->
NewStringUTF
(
vcard
)
:
NULL
;
}
extern
"C"
jobject
Java_org_linphone_core_LinphoneFriendListImpl_getCore
(
JNIEnv
*
env
,
jobject
thiz
,
jlong
ptr
)
{
...
...
java/common/org/linphone/core/LinphoneFriend.java
View file @
0399162c
...
...
@@ -165,6 +165,12 @@ public interface LinphoneFriend {
* @return The reference key of the friend.
**/
String
getRefKey
();
/**
* return a the string value of the vcard corresponding to the given friend
*/
String
getVcardToString
();
/**
* Set a name for this friend
* @param name
...
...
java/impl/org/linphone/core/LinphoneCoreImpl.java
View file @
0399162c
...
...
@@ -195,7 +195,7 @@ class LinphoneCoreImpl implements LinphoneCore {
private
native
Object
createFriend
(
long
nativePtr
);
private
native
Object
createFriendWithAddress
(
long
nativePtr
,
String
address
);
private
native
int
getIncomingTimeout
(
long
nativePtr
);
LinphoneCoreImpl
(
LinphoneCoreListener
listener
,
File
userConfig
,
File
factoryConfig
,
Object
userdata
)
throws
IOException
{
mListener
=
listener
;
String
user
=
userConfig
==
null
?
null
:
userConfig
.
getCanonicalPath
();
...
...
java/impl/org/linphone/core/LinphoneFriendImpl.java
View file @
0399162c
...
...
@@ -40,6 +40,7 @@ public class LinphoneFriendImpl implements LinphoneFriend, Serializable {
private
native
Object
getCore
(
long
ptr
);
private
native
void
setRefKey
(
long
nativePtr
,
String
key
);
private
native
String
getRefKey
(
long
nativePtr
);
private
native
String
getVcardToString
(
long
nativePtr
);
private
Object
userdData
;
public
Object
getUserData
()
{
...
...
@@ -141,6 +142,12 @@ public class LinphoneFriendImpl implements LinphoneFriend, Serializable {
public
String
getRefKey
(){
return
getRefKey
(
nativePtr
);
}
public
synchronized
String
getVcardToString
()
{
return
getVcardToString
(
nativePtr
);
}
private
native
void
setName
(
long
nativePtr
,
String
name
);
@Override
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment