Commit d74083cf authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

GetPeerAdress added to LinphoneChatMessage

parent 328c83b5
......@@ -170,6 +170,10 @@ char* linphone_chat_message_get_message(LinphoneChatMessage* msg) {
return msg->message;
}
const LinphoneAddress* linphone_chat_message_get_peer_address(LinphoneChatMessage *msg) {
return linphone_chat_room_get_peer_address(msg->chat_room);
}
/**
* user pointer set function
*/
......
......@@ -672,6 +672,7 @@ void linphone_chat_room_send_message2(LinphoneChatRoom *cr, LinphoneChatMessage*
LinphoneCore* linphone_chat_room_get_lc(LinphoneChatRoom *cr);
LinphoneChatRoom* linphone_chat_message_get_chat_room(LinphoneChatMessage *msg);
char* linphone_chat_message_get_message(LinphoneChatMessage *msg);
const LinphoneAddress* linphone_chat_message_get_peer_address(LinphoneChatMessage *msg);
void linphone_chat_room_set_user_data(LinphoneChatRoom *cr, void * ud);
void * linphone_chat_room_get_user_data(LinphoneChatRoom *cr);
......
......@@ -1387,6 +1387,11 @@ extern "C" jstring Java_org_linphone_core_LinphoneChatMessageImpl_getMessage(JNI
jstring jvalue =env->NewStringUTF(linphone_chat_message_get_message((LinphoneChatMessage*)ptr));
return jvalue;
}
extern "C" long Java_org_linphone_core_LinphoneChatMessageImpl_getPeerAddress(JNIEnv* env
,jobject thiz
,jlong ptr) {
return (long) linphone_chat_message_get_peer_address((LinphoneChatMessage*)ptr);
}
extern "C" void Java_org_linphone_core_LinphoneChatRoomImpl_sendMessage(JNIEnv* env
,jobject thiz
,jlong ptr
......
......@@ -60,5 +60,17 @@ public interface LinphoneChatMessage {
void setUserData();
/**
* get text associated to this LinphoneChatMessage
*
* @return text sent along with the message
*/
String getMessage();
/**
* get peer address associated to this LinphoneChatMessage
*
* @return LinphoneAddress peer address
*/
LinphoneAddress getPeerAddress();
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment