mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-02-07 14:18:25 +00:00
add LinphoneChatMessage.getTo() java wrapper
This commit is contained in:
parent
032d83c830
commit
a357f2fc86
3 changed files with 19 additions and 0 deletions
|
|
@ -2589,6 +2589,12 @@ extern "C" jlong Java_org_linphone_core_LinphoneChatMessageImpl_getFrom(JNIEnv*
|
|||
return (jlong) linphone_chat_message_get_from((LinphoneChatMessage*)ptr);
|
||||
}
|
||||
|
||||
extern "C" jlong Java_org_linphone_core_LinphoneChatMessageImpl_getTo(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong ptr) {
|
||||
return (jlong) linphone_chat_message_get_to((LinphoneChatMessage*)ptr);
|
||||
}
|
||||
|
||||
extern "C" jlong Java_org_linphone_core_LinphoneChatMessageImpl_getPeerAddress(JNIEnv* env
|
||||
,jobject thiz
|
||||
,jlong ptr) {
|
||||
|
|
|
|||
|
|
@ -74,6 +74,12 @@ public interface LinphoneChatMessage {
|
|||
*/
|
||||
LinphoneAddress getFrom();
|
||||
|
||||
/**
|
||||
* Get destination address of the LinphoneChatMessage.
|
||||
* @return the LinphoneAddress in the To field of the message.
|
||||
*/
|
||||
LinphoneAddress getTo();
|
||||
|
||||
/**
|
||||
* Linphone message can carry external body as defined by rfc2017
|
||||
* @param message #LinphoneChatMessage
|
||||
|
|
@ -147,4 +153,5 @@ public interface LinphoneChatMessage {
|
|||
* @return an ErrorInfo.
|
||||
*/
|
||||
ErrorInfo getErrorInfo();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -48,6 +48,12 @@ public class LinphoneChatMessageImpl implements LinphoneChatMessage {
|
|||
return new LinphoneAddressImpl(getFrom(nativePtr),LinphoneAddressImpl.WrapMode.FromConst);
|
||||
}
|
||||
|
||||
private native long getTo(long ptr);
|
||||
@Override
|
||||
public LinphoneAddress getTo() {
|
||||
return new LinphoneAddressImpl(getTo(nativePtr),LinphoneAddressImpl.WrapMode.FromConst);
|
||||
}
|
||||
|
||||
private native void addCustomHeader(long nativePtr, String name, String value);
|
||||
@Override
|
||||
public void addCustomHeader(String name, String value) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue