forked from mirrors/linphone-iphone
GetPeerAdress added to LinphoneChatMessage
This commit is contained in:
parent
328c83b51c
commit
d74083cfaa
4 changed files with 22 additions and 0 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue