mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-30 01:39:20 +00:00
fix errors in the file transfer API design that were also wrapped in java.
This commit is contained in:
parent
916a3e8e02
commit
c828b54b33
5 changed files with 13 additions and 14 deletions
|
|
@ -2685,8 +2685,8 @@ extern "C" jlong Java_org_linphone_core_LinphoneChatRoomImpl_createFileTransferM
|
|||
return (jlong) message;
|
||||
}
|
||||
|
||||
extern "C" void Java_org_linphone_core_LinphoneChatRoomImpl_cancelFileTransfer(JNIEnv* env, jobject thiz, jlong ptr, jlong message) {
|
||||
linphone_chat_room_cancel_file_transfer((LinphoneChatMessage *)message);
|
||||
extern "C" void Java_org_linphone_core_LinphoneChatMessageImpl_cancelFileTransfer(JNIEnv* env, jobject thiz, jlong ptr) {
|
||||
linphone_chat_message_cancel_file_transfer((LinphoneChatMessage *)ptr);
|
||||
}
|
||||
|
||||
extern "C" jobject Java_org_linphone_core_LinphoneChatMessageImpl_getFileTransferInformation(JNIEnv* env, jobject thiz, jlong ptr) {
|
||||
|
|
|
|||
|
|
@ -163,6 +163,10 @@ public interface LinphoneChatMessage {
|
|||
*/
|
||||
void startFileDownload(LinphoneChatMessage.StateListener listener);
|
||||
|
||||
/**
|
||||
* Cancel an ongoing file transfer attached to this message.(upload or download).
|
||||
*/
|
||||
void cancelFileTransfer();
|
||||
/**
|
||||
* Get the file_transfer_information (used by call backs to recover informations during a rcs file transfer)
|
||||
* @return a pointer to the LinphoneContent structure or NULL if not present.
|
||||
|
|
@ -179,4 +183,5 @@ public interface LinphoneChatMessage {
|
|||
* @return the data stored in the chat message if any, else null
|
||||
*/
|
||||
String getAppData();
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -144,9 +144,4 @@ public interface LinphoneChatRoom {
|
|||
*/
|
||||
LinphoneChatMessage createFileTransferMessage(LinphoneContent content);
|
||||
|
||||
/**
|
||||
* Cancel an ongoing file transfer attached to this message (upload or download)
|
||||
* @param message
|
||||
*/
|
||||
void cancelFileTransfer(LinphoneChatMessage message);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -127,4 +127,10 @@ public class LinphoneChatMessageImpl implements LinphoneChatMessage {
|
|||
public String getAppData() {
|
||||
return getAppData(nativePtr);
|
||||
}
|
||||
|
||||
private native void cancelFileTransfer(long messagePtr);
|
||||
@Override
|
||||
public void cancelFileTransfer() {
|
||||
cancelFileTransfer(nativePtr);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -177,11 +177,4 @@ class LinphoneChatRoomImpl implements LinphoneChatRoom {
|
|||
}
|
||||
}
|
||||
|
||||
private native void cancelFileTransfer(long ptr, long messagePtr);
|
||||
@Override
|
||||
public void cancelFileTransfer(LinphoneChatMessage message) {
|
||||
synchronized(getCore()) {
|
||||
cancelFileTransfer(nativePtr, ((LinphoneChatMessageImpl)message).getNativePtr());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue