Commit 328c83b5 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

GetMessage method for linphoneChatMessage

parent 5223b0c7
......@@ -165,6 +165,11 @@ const char* linphone_chat_message_state_to_string(const LinphoneChatMessageState
}
}
char* linphone_chat_message_get_message(LinphoneChatMessage* msg) {
return msg->message;
}
/**
* user pointer set function
*/
......
......@@ -671,6 +671,7 @@ typedef void (*LinphoneChatMessageStateChangeCb)(LinphoneChatMessage* msg,Linpho
void linphone_chat_room_send_message2(LinphoneChatRoom *cr, LinphoneChatMessage* msg,LinphoneChatMessageStateChangeCb status_cb,void* ud);
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);
void linphone_chat_room_set_user_data(LinphoneChatRoom *cr, void * ud);
void * linphone_chat_room_get_user_data(LinphoneChatRoom *cr);
......
......@@ -1377,11 +1377,16 @@ extern "C" jlong Java_org_linphone_core_LinphoneChatRoomImpl_createLinphoneChatM
}
extern "C" void Java_org_linphone_core_LinphoneChatMessageImpl_setUserData(JNIEnv* env
,jobject thiz
,jlong ptr
) {
,jlong ptr) {
jobject ud = env->NewGlobalRef(thiz);
linphone_chat_message_set_user_data((LinphoneChatMessage*)ptr,(void*) ud);
}
extern "C" jstring Java_org_linphone_core_LinphoneChatMessageImpl_getMessage(JNIEnv* env
,jobject thiz
,jlong ptr) {
jstring jvalue =env->NewStringUTF(linphone_chat_message_get_message((LinphoneChatMessage*)ptr));
return jvalue;
}
extern "C" void Java_org_linphone_core_LinphoneChatRoomImpl_sendMessage(JNIEnv* env
,jobject thiz
,jlong ptr
......
......@@ -59,4 +59,6 @@ public interface LinphoneChatMessage {
Object getUserData();
void setUserData();
String getMessage();
}
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