Added JNI getFrom to LinphoneChatMessage

This commit is contained in:
Sylvain Berfini 2012-09-18 15:32:29 +02:00
parent 239e4f553b
commit a1961faa44
2 changed files with 14 additions and 2 deletions

View file

@ -1425,10 +1425,15 @@ extern "C" void Java_org_linphone_core_LinphoneChatMessageImpl_setExternalBodyUr
linphone_chat_message_set_external_body_url((LinphoneChatMessage *)ptr, url);
env->ReleaseStringUTFChars(jurl, url);
}
extern "C" long Java_org_linphone_core_LinphoneChatMessageImpl_getPeerAddress(JNIEnv* env
extern "C" jlong Java_org_linphone_core_LinphoneChatMessageImpl_getFrom(JNIEnv* env
,jobject thiz
,jlong ptr) {
return (long) linphone_chat_message_get_peer_address((LinphoneChatMessage*)ptr);
return (jlong) linphone_chat_message_get_from((LinphoneChatMessage*)ptr);
}
extern "C" jlong Java_org_linphone_core_LinphoneChatMessageImpl_getPeerAddress(JNIEnv* env
,jobject thiz
,jlong ptr) {
return (jlong) linphone_chat_message_get_peer_address((LinphoneChatMessage*)ptr);
}
extern "C" void Java_org_linphone_core_LinphoneChatRoomImpl_sendMessage(JNIEnv* env
,jobject thiz

View file

@ -74,6 +74,13 @@ public interface LinphoneChatMessage {
*/
LinphoneAddress getPeerAddress();
/**
* get from address associated to this LinphoneChatMessage
*
* @return LinphoneAddress from address
*/
LinphoneAddress getFrom();
/**
* Linphone message can carry external body as defined by rfc2017
* @param message #LinphoneChatMessage