Hello community,
here is the log from the commit of package libmtp for openSUSE:Factory checked in at 2018-03-29 11:48:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libmtp (Old)
and /work/SRC/openSUSE:Factory/.libmtp.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libmtp"
Thu Mar 29 11:48:19 2018 rev:77 rq:590840 version:1.1.15
Changes:
--------
--- /work/SRC/openSUSE:Factory/libmtp/libmtp.changes 2017-10-07 17:46:18.470797574 +0200
+++ /work/SRC/openSUSE:Factory/.libmtp.new/libmtp.changes 2018-03-29 11:48:23.617985373 +0200
@@ -1,0 +2,10 @@
+Sat Mar 24 17:35:38 UTC 2018 - meissner@suse.com
+
+- updated to 1.1.15 release
+ - lots of new USB ids
+ - copy and move object implemented
+ - 64bit file bugfixes
+ - bugfixes
+
+
+-------------------------------------------------------------------
Old:
----
libmtp-1.1.14.tar.gz
libmtp-1.1.14.tar.gz.asc
New:
----
libmtp-1.1.15.tar.gz
libmtp-1.1.15.tar.gz.asc
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libmtp.spec ++++++
--- /var/tmp/diff_new_pack.vQSSCF/_old 2018-03-29 11:48:24.261962172 +0200
+++ /var/tmp/diff_new_pack.vQSSCF/_new 2018-03-29 11:48:24.265962028 +0200
@@ -1,7 +1,7 @@
#
# spec file for package libmtp
#
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -26,7 +26,7 @@
Summary: Commandline utilities for access to MTP Players
License: LGPL-2.1+
Group: Productivity/Multimedia/Sound/Players
-Version: 1.1.14
+Version: 1.1.15
Release: 0
%define sonum 9
Source0: http://downloads.sourceforge.net/project/%{name}/%{name}/%{version}/%{name}-%{version}.tar.gz
++++++ libmtp-1.1.14.tar.gz -> libmtp-1.1.15.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmtp-1.1.14/configure new/libmtp-1.1.15/configure
--- old/libmtp-1.1.14/configure 2017-10-01 21:25:43.000000000 +0200
+++ new/libmtp-1.1.15/configure 2018-03-24 12:04:12.000000000 +0100
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for libmtp 1.1.14.
+# Generated by GNU Autoconf 2.69 for libmtp 1.1.15.
#
# Report bugs to .
#
@@ -590,8 +590,8 @@
# Identity of this package.
PACKAGE_NAME='libmtp'
PACKAGE_TARNAME='libmtp'
-PACKAGE_VERSION='1.1.14'
-PACKAGE_STRING='libmtp 1.1.14'
+PACKAGE_VERSION='1.1.15'
+PACKAGE_STRING='libmtp 1.1.15'
PACKAGE_BUGREPORT='libmtp-discuss@lists.sourceforge.net'
PACKAGE_URL=''
@@ -1360,7 +1360,7 @@
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures libmtp 1.1.14 to adapt to many kinds of systems.
+\`configure' configures libmtp 1.1.15 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1430,7 +1430,7 @@
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of libmtp 1.1.14:";;
+ short | recursive ) echo "Configuration of libmtp 1.1.15:";;
esac
cat <<\_ACEOF
@@ -1562,7 +1562,7 @@
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-libmtp configure 1.1.14
+libmtp configure 1.1.15
generated by GNU Autoconf 2.69
Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2042,7 +2042,7 @@
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by libmtp $as_me 1.1.14, which was
+It was created by libmtp $as_me 1.1.15, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ $0 $@
@@ -2906,7 +2906,7 @@
# Define the identity of the package.
PACKAGE='libmtp'
- VERSION='1.1.14'
+ VERSION='1.1.15'
cat >>confdefs.h <<_ACEOF
@@ -16633,7 +16633,7 @@
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by libmtp $as_me 1.1.14, which was
+This file was extended by libmtp $as_me 1.1.15, which was
generated by GNU Autoconf 2.69. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -16699,7 +16699,7 @@
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
-libmtp config.status 1.1.14
+libmtp config.status 1.1.15
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmtp-1.1.14/configure.ac new/libmtp-1.1.15/configure.ac
--- old/libmtp-1.1.14/configure.ac 2017-10-01 21:25:34.000000000 +0200
+++ new/libmtp-1.1.15/configure.ac 2018-03-24 12:04:03.000000000 +0100
@@ -1,6 +1,6 @@
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.52)
-AC_INIT([libmtp], [1.1.14], [libmtp-discuss@lists.sourceforge.net])
+AC_INIT([libmtp], [1.1.15], [libmtp-discuss@lists.sourceforge.net])
AC_CONFIG_MACRO_DIR([m4])
AM_INIT_AUTOMAKE([foreign])
AC_CONFIG_SRCDIR([src/libmtp.c])
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmtp-1.1.14/doc/Makefile.in new/libmtp-1.1.15/doc/Makefile.in
--- old/libmtp-1.1.14/doc/Makefile.in 2017-10-01 21:25:42.000000000 +0200
+++ new/libmtp-1.1.15/doc/Makefile.in 2018-03-24 12:04:11.000000000 +0100
@@ -370,9 +370,9 @@
maintainer-clean-generic:
@echo "This command is intended for maintainers to use"
@echo "it deletes files that may require special tools to rebuild."
+@HAVE_DOXYGEN_FALSE@clean-local:
@HAVE_DOXYGEN_FALSE@install-data-local:
@HAVE_DOXYGEN_FALSE@uninstall-local:
-@HAVE_DOXYGEN_FALSE@clean-local:
clean: clean-am
clean-am: clean-generic clean-libtool clean-local mostlyclean-am
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmtp-1.1.14/libmtp.pc new/libmtp-1.1.15/libmtp.pc
--- old/libmtp-1.1.14/libmtp.pc 2017-10-01 21:25:58.000000000 +0200
+++ new/libmtp-1.1.15/libmtp.pc 2018-03-24 12:04:21.000000000 +0100
@@ -7,7 +7,7 @@
Name: libmtp
Description: libmtp is a library for accessing Media Transfer Protocol devices
-Version: 1.1.14
+Version: 1.1.15
Requires.private: libusb-1.0
Conflicts:
Libs: -L${libdir} -lmtp
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmtp-1.1.14/src/Makefile.am new/libmtp-1.1.15/src/Makefile.am
--- old/libmtp-1.1.14/src/Makefile.am 2015-10-07 09:43:18.000000000 +0200
+++ new/libmtp-1.1.15/src/Makefile.am 2018-03-17 09:22:25.000000000 +0100
@@ -47,8 +47,8 @@
# increment AGE, Otherwise AGE is reset to 0. If CURRENT has changed,
# REVISION is set to 0, otherwise REVISION is incremented.
# ---------------------------------------------------------------------------
-CURRENT=12
-AGE=3
+CURRENT=13
+AGE=4
REVISION=0
SOVERSION=$(CURRENT):$(REVISION):$(AGE)
LT_CURRENT_MINUS_AGE=`expr $(CURRENT) - $(AGE)`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmtp-1.1.14/src/Makefile.in new/libmtp-1.1.15/src/Makefile.in
--- old/libmtp-1.1.14/src/Makefile.in 2017-10-01 21:25:42.000000000 +0200
+++ new/libmtp-1.1.15/src/Makefile.in 2018-03-24 12:04:11.000000000 +0100
@@ -390,8 +390,8 @@
# increment AGE, Otherwise AGE is reset to 0. If CURRENT has changed,
# REVISION is set to 0, otherwise REVISION is incremented.
# ---------------------------------------------------------------------------
-CURRENT = 12
-AGE = 3
+CURRENT = 13
+AGE = 4
REVISION = 0
SOVERSION = $(CURRENT):$(REVISION):$(AGE)
LT_CURRENT_MINUS_AGE = `expr $(CURRENT) - $(AGE)`
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmtp-1.1.14/src/libmtp.c new/libmtp-1.1.15/src/libmtp.c
--- old/libmtp-1.1.14/src/libmtp.c 2017-06-10 16:35:54.000000000 +0200
+++ new/libmtp-1.1.15/src/libmtp.c 2018-03-24 08:08:07.000000000 +0100
@@ -2220,6 +2220,8 @@
case PTP_EC_DevicePropChanged:
LIBMTP_INFO("Received event PTP_EC_DevicePropChanged in session %u\n", session_id);
/* TODO: update device properties */
+ *event = LIBMTP_EVENT_DEVICE_PROPERTY_CHANGED;
+ *out1 = param1;
break;
case PTP_EC_ObjectInfoChanged:
LIBMTP_INFO("Received event PTP_EC_ObjectInfoChanged in session %u\n", session_id);
@@ -4042,6 +4044,12 @@
PTP_OC_ANDROID_BeginEditObject) &&
ptp_operation_issupported(device->params,
PTP_OC_ANDROID_EndEditObject));
+ case LIBMTP_DEVICECAP_MoveObject:
+ return ptp_operation_issupported(device->params,
+ PTP_OC_MoveObject);
+ case LIBMTP_DEVICECAP_CopyObject:
+ return ptp_operation_issupported(device->params,
+ PTP_OC_CopyObject);
/*
* Handle other capabilities here, this is also a good place to
* blacklist some advanced operations on specific devices if need
@@ -4237,6 +4245,10 @@
file->parent_id = ob->oi.ParentObject;
file->storage_id = ob->oi.StorageID;
+ if (ob->oi.Filename != NULL) {
+ file->filename = strdup(ob->oi.Filename);
+ }
+
// Set the filetype
file->filetype = map_ptp_type_to_libmtp_type(ob->oi.ObjectFormat);
@@ -4250,7 +4262,7 @@
*/
if (file->filetype == LIBMTP_FILETYPE_UNKNOWN) {
if ((FLAG_IRIVER_OGG_ALZHEIMER(ptp_usb) ||
- FLAG_OGG_IS_UNKNOWN(ptp_usb)) &&
+ FLAG_OGG_IS_UNKNOWN(ptp_usb)) &&
has_ogg_extension(file->filename)) {
file->filetype = LIBMTP_FILETYPE_OGG;
}
@@ -4265,9 +4277,6 @@
// We only have 32-bit file size here; later we use the PTP_OPC_ObjectSize property
file->filesize = ob->oi.ObjectCompressedSize;
- if (ob->oi.Filename != NULL) {
- file->filename = strdup(ob->oi.Filename);
- }
// This is a unique ID so we can keep track of the file.
file->item_id = ob->oid;
@@ -5249,26 +5258,28 @@
uint16_t ret;
PTPParams *params = (PTPParams *) device->params;
PTP_USB *ptp_usb = (PTP_USB*) device->usbinfo;
- PTPObject *ob;
- ret = ptp_object_want (params, id, PTPOBJECT_OBJECTINFO_LOADED, &ob);
- if (ret != PTP_RC_OK) {
+ LIBMTP_file_t *mtpfile = LIBMTP_Get_Filemetadata(device, id);
+ if (mtpfile == NULL) {
add_error_to_errorstack(device, LIBMTP_ERROR_GENERAL, "LIBMTP_Get_File_To_File_Descriptor(): Could not get object info.");
return -1;
}
- if (ob->oi.ObjectFormat == PTP_OFC_Association) {
+ if (mtpfile->filetype == LIBMTP_FILETYPE_FOLDER) {
add_error_to_errorstack(device, LIBMTP_ERROR_GENERAL, "LIBMTP_Get_File_To_File_Descriptor(): Bad object format.");
return -1;
}
// Callbacks
ptp_usb->callback_active = 1;
- ptp_usb->current_transfer_total = ob->oi.ObjectCompressedSize+
+ ptp_usb->current_transfer_total = mtpfile->filesize +
PTP_USB_BULK_HDR_LEN+sizeof(uint32_t); // Request length, one parameter
ptp_usb->current_transfer_complete = 0;
ptp_usb->current_transfer_callback = callback;
ptp_usb->current_transfer_callback_data = data;
+ // Don't need mtpfile anymore
+ LIBMTP_destroy_file_t(mtpfile);
+
ret = ptp_getobject_tofd(params, id, fd);
ptp_usb->callback_active = 0;
@@ -5311,29 +5322,31 @@
LIBMTP_progressfunc_t const callback,
void const * const data)
{
- PTPObject *ob;
uint16_t ret;
PTPParams *params = (PTPParams *) device->params;
PTP_USB *ptp_usb = (PTP_USB*) device->usbinfo;
- ret = ptp_object_want (params, id, PTPOBJECT_OBJECTINFO_LOADED, &ob);
- if (ret != PTP_RC_OK) {
+ LIBMTP_file_t *mtpfile = LIBMTP_Get_Filemetadata(device, id);
+ if (mtpfile == NULL) {
add_error_to_errorstack(device, LIBMTP_ERROR_GENERAL, "LIBMTP_Get_File_To_File_Descriptor(): Could not get object info.");
return -1;
}
- if (ob->oi.ObjectFormat == PTP_OFC_Association) {
+ if (mtpfile->filetype == LIBMTP_FILETYPE_FOLDER) {
add_error_to_errorstack(device, LIBMTP_ERROR_GENERAL, "LIBMTP_Get_File_To_File_Descriptor(): Bad object format.");
return -1;
}
// Callbacks
ptp_usb->callback_active = 1;
- ptp_usb->current_transfer_total = ob->oi.ObjectCompressedSize+
+ ptp_usb->current_transfer_total = mtpfile->filesize +
PTP_USB_BULK_HDR_LEN+sizeof(uint32_t); // Request length, one parameter
ptp_usb->current_transfer_complete = 0;
ptp_usb->current_transfer_callback = callback;
ptp_usb->current_transfer_callback_data = data;
+ // Don't need mtpfile anymore
+ LIBMTP_destroy_file_t(mtpfile);
+
MTPDataHandler mtp_handler;
mtp_handler.getfunc = NULL;
mtp_handler.putfunc = put_func;
@@ -6786,6 +6799,79 @@
}
/**
+ * The function moves an object from one location on a device to another
+ * location.
+ *
+ * The semantics of moving a folder are not defined in the spec, but it
+ * appears to do the right thing when tested (but devices that implement
+ * this operation are rare).
+ *
+ * Note that moving an object may take a significant amount of time,
+ * particularly if being moved between storages. MTP does not provide
+ * any kind of progress mechanism, so the operation will simply block
+ * for the duration.
+ *
+ * @param device a pointer to the device where the object exists.
+ * @param object_id the object to move.
+ * @param storage_id the id of the destination storage.
+ * @param parent_id the id of the destination parent object (folder).
+ * If the destination is the root of the storage, pass '0'.
+ * @return 0 on success, any other value means failure.
+ */
+int LIBMTP_Move_Object(LIBMTP_mtpdevice_t *device,
+ uint32_t object_id,
+ uint32_t storage_id,
+ uint32_t parent_id)
+{
+ uint16_t ret;
+ PTPParams *params = (PTPParams *) device->params;
+
+ ret = ptp_moveobject(params, object_id, storage_id, parent_id);
+ if (ret != PTP_RC_OK) {
+ add_ptp_error_to_errorstack(device, ret, "LIBMTP_Move_Object(): could not move object.");
+ return -1;
+ }
+
+ return 0;
+}
+
+/**
+ * The function copies an object from one location on a device to another
+ * location.
+ *
+ * The semantics of copying a folder are not defined in the spec, but it
+ * appears to do the right thing when tested (but devices that implement
+ * this operation are rare).
+ *
+ * Note that copying an object may take a significant amount of time.
+ * MTP does not provide any kind of progress mechanism, so the operation
+ * will simply block for the duration.
+ *
+ * @param device a pointer to the device where the object exists.
+ * @param object_id the object to copy.
+ * @param storage_id the id of the destination storage.
+ * @param parent_id the id of the destination parent object (folder).
+ * If the destination is the root of the storage, pass '0'.
+ * @return 0 on success, any other value means failure.
+ */
+int LIBMTP_Copy_Object(LIBMTP_mtpdevice_t *device,
+ uint32_t object_id,
+ uint32_t storage_id,
+ uint32_t parent_id)
+{
+ uint16_t ret;
+ PTPParams *params = (PTPParams *) device->params;
+
+ ret = ptp_copyobject(params, object_id, storage_id, parent_id);
+ if (ret != PTP_RC_OK) {
+ add_ptp_error_to_errorstack(device, ret, "LIBMTP_Copy_Object(): could not copy object.");
+ return -1;
+ }
+
+ return 0;
+}
+
+/**
* Internal function to update an object filename property.
*/
static int set_object_filename(LIBMTP_mtpdevice_t *device,
@@ -8987,8 +9073,19 @@
uint64_t offset, uint32_t maxbytes,
unsigned char **data, unsigned int *size)
{
- PTPParams *params = (PTPParams *) device->params;
- uint16_t ret;
+ PTPParams *params = (PTPParams *) device->params;
+ uint16_t ret;
+ LIBMTP_file_t *mtpfile = LIBMTP_Get_Filemetadata(device, id);
+
+ /* Some devices do not like reading over the end and hang instead of progressing */
+ if (offset >= mtpfile->filesize) {
+ *size = 0;
+ LIBMTP_destroy_file_t (mtpfile);
+ return 0;
+ }
+ if (offset + maxbytes > mtpfile->filesize) {
+ maxbytes = mtpfile->filesize - offset;
+ }
if (!ptp_operation_issupported(params, PTP_OC_ANDROID_GetPartialObject64)) {
if (!ptp_operation_issupported(params, PTP_OC_GetPartialObject)) {
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmtp-1.1.14/src/libmtp.h new/libmtp-1.1.15/src/libmtp.h
--- old/libmtp-1.1.14/src/libmtp.h 2017-10-01 21:25:57.000000000 +0200
+++ new/libmtp-1.1.15/src/libmtp.h 2018-03-24 12:04:21.000000000 +0100
@@ -29,8 +29,8 @@
#ifndef LIBMTP_H_INCLUSION_GUARD
#define LIBMTP_H_INCLUSION_GUARD
-#define LIBMTP_VERSION 1.1.14
-#define LIBMTP_VERSION_STRING "1.1.14"
+#define LIBMTP_VERSION 1.1.15
+#define LIBMTP_VERSION_STRING "1.1.15"
/* This handles MSVC pecularities */
#ifdef _MSC_VER
@@ -426,6 +426,16 @@
* @see LIBMTP_TruncateObject()
*/
LIBMTP_DEVICECAP_EditObjects,
+ /**
+ * This capability tells whether you can call the function to
+ * move an object, @see LIBMTP_MoveObject()
+ */
+ LIBMTP_DEVICECAP_MoveObject,
+ /**
+ * This capability tells whether you can call the function to
+ * copy an object, @see LIBMTP_CopyObject()
+ */
+ LIBMTP_DEVICECAP_CopyObject,
} LIBMTP_devicecap_t;
/**
@@ -800,6 +810,7 @@
LIBMTP_EVENT_STORE_REMOVED,
LIBMTP_EVENT_OBJECT_ADDED,
LIBMTP_EVENT_OBJECT_REMOVED,
+ LIBMTP_EVENT_DEVICE_PROPERTY_CHANGED,
};
typedef enum LIBMTP_event_enum LIBMTP_event_t;
@@ -1038,6 +1049,8 @@
* @{
*/
int LIBMTP_Delete_Object(LIBMTP_mtpdevice_t *, uint32_t);
+int LIBMTP_Move_Object(LIBMTP_mtpdevice_t *, uint32_t, uint32_t, uint32_t);
+int LIBMTP_Copy_Object(LIBMTP_mtpdevice_t *, uint32_t, uint32_t, uint32_t);
int LIBMTP_Set_Object_Filename(LIBMTP_mtpdevice_t *, uint32_t , char *);
int LIBMTP_GetPartialObject(LIBMTP_mtpdevice_t *, uint32_t const,
uint64_t, uint32_t,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmtp-1.1.14/src/libmtp.h.in new/libmtp-1.1.15/src/libmtp.h.in
--- old/libmtp-1.1.14/src/libmtp.h.in 2017-06-10 16:36:53.000000000 +0200
+++ new/libmtp-1.1.15/src/libmtp.h.in 2018-03-24 08:08:07.000000000 +0100
@@ -426,6 +426,16 @@
* @see LIBMTP_TruncateObject()
*/
LIBMTP_DEVICECAP_EditObjects,
+ /**
+ * This capability tells whether you can call the function to
+ * move an object, @see LIBMTP_MoveObject()
+ */
+ LIBMTP_DEVICECAP_MoveObject,
+ /**
+ * This capability tells whether you can call the function to
+ * copy an object, @see LIBMTP_CopyObject()
+ */
+ LIBMTP_DEVICECAP_CopyObject,
} LIBMTP_devicecap_t;
/**
@@ -800,6 +810,7 @@
LIBMTP_EVENT_STORE_REMOVED,
LIBMTP_EVENT_OBJECT_ADDED,
LIBMTP_EVENT_OBJECT_REMOVED,
+ LIBMTP_EVENT_DEVICE_PROPERTY_CHANGED,
};
typedef enum LIBMTP_event_enum LIBMTP_event_t;
@@ -1038,6 +1049,8 @@
* @{
*/
int LIBMTP_Delete_Object(LIBMTP_mtpdevice_t *, uint32_t);
+int LIBMTP_Move_Object(LIBMTP_mtpdevice_t *, uint32_t, uint32_t, uint32_t);
+int LIBMTP_Copy_Object(LIBMTP_mtpdevice_t *, uint32_t, uint32_t, uint32_t);
int LIBMTP_Set_Object_Filename(LIBMTP_mtpdevice_t *, uint32_t , char *);
int LIBMTP_GetPartialObject(LIBMTP_mtpdevice_t *, uint32_t const,
uint64_t, uint32_t,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmtp-1.1.14/src/libmtp.sym new/libmtp-1.1.15/src/libmtp.sym
--- old/libmtp-1.1.14/src/libmtp.sym 2017-06-10 16:07:29.000000000 +0200
+++ new/libmtp-1.1.15/src/libmtp.sym 2018-03-17 09:21:17.000000000 +0100
@@ -94,6 +94,8 @@
LIBMTP_Create_New_Album
LIBMTP_Update_Album
LIBMTP_Delete_Object
+LIBMTP_Move_Object
+LIBMTP_Copy_Object
LIBMTP_Set_File_Name
LIBMTP_Set_Folder_Name
LIBMTP_Set_Track_Name
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmtp-1.1.14/src/libopenusb1-glue.c new/libmtp-1.1.15/src/libopenusb1-glue.c
--- old/libmtp-1.1.14/src/libopenusb1-glue.c 2017-10-01 21:48:58.000000000 +0200
+++ new/libmtp-1.1.15/src/libopenusb1-glue.c 2017-10-06 13:54:29.000000000 +0200
@@ -1213,7 +1213,7 @@
unsigned long packet_size;
PTP_USB *ptp_usb = (PTP_USB *) params->data;
- packet_size = ptp_usb->inep_maxpacket;
+ packet_size = ptp_usb->outep_maxpacket;
LIBMTP_USB_DEBUG("SEND DATA PHASE\n");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmtp-1.1.14/src/libusb-glue.c new/libmtp-1.1.15/src/libusb-glue.c
--- old/libmtp-1.1.14/src/libusb-glue.c 2017-10-01 21:49:13.000000000 +0200
+++ new/libmtp-1.1.15/src/libusb-glue.c 2017-10-06 13:54:11.000000000 +0200
@@ -1205,7 +1205,7 @@
unsigned long packet_size;
PTP_USB *ptp_usb = (PTP_USB *) params->data;
- packet_size = ptp_usb->inep_maxpacket;
+ packet_size = ptp_usb->outep_maxpacket;
LIBMTP_USB_DEBUG("SEND DATA PHASE\n");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmtp-1.1.14/src/libusb1-glue.c new/libmtp-1.1.15/src/libusb1-glue.c
--- old/libmtp-1.1.14/src/libusb1-glue.c 2017-10-01 21:49:09.000000000 +0200
+++ new/libmtp-1.1.15/src/libusb1-glue.c 2017-10-19 07:29:48.000000000 +0200
@@ -1924,17 +1924,11 @@
libusb_kernel_driver_active(device_handle, ptp_usb->interface)
) {
if (LIBUSB_SUCCESS != libusb_detach_kernel_driver(device_handle, ptp_usb->interface)) {
- perror("libusb_detach_kernel_driver() failed, continuing anyway...");
+ perror("libusb_detach_kernel_driver() failed, continuing anyway...");
}
}
- usbresult = libusb_claim_interface(device_handle, ptp_usb->interface);
- if (usbresult != 0) {
- fprintf(stderr, "error returned by libusb_claim_interface() = %d", usbresult);
- return -1;
- }
-
/*
* Check if the config is set to something else than what we want
* to use. Only set the configuration if we absolutely have to.
@@ -1970,6 +1964,12 @@
}
}
+ usbresult = libusb_claim_interface(device_handle, ptp_usb->interface);
+ if (usbresult != 0) {
+ fprintf(stderr, "error returned by libusb_claim_interface() = %d", usbresult);
+ return -1;
+ }
+
/*
* If the altsetting is set to something different than we want, switch
* it.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmtp-1.1.14/src/music-players.h new/libmtp-1.1.15/src/music-players.h
--- old/libmtp-1.1.14/src/music-players.h 2017-09-26 06:48:53.000000000 +0200
+++ new/libmtp-1.1.15/src/music-players.h 2018-03-24 11:08:04.000000000 +0100
@@ -4,7 +4,7 @@
*
* Copyright (C) 2005-2007 Richard A. Low
* Copyright (C) 2005-2013 Linus Walleij
- * Copyright (C) 2006-2007,2015-2017 Marcus Meissner
+ * Copyright (C) 2006-2007,2015-2018 Marcus Meissner
* Copyright (C) 2007 Ted Bullock
* Copyright (C) 2012 Sony Mobile Communications AB
*
@@ -628,6 +628,9 @@
/* Reported by Jocelyn Mayer */
{ "Acer", 0x0502, "Iconia One 10", 0x3841,
DEVICE_FLAGS_ANDROID_BUGS },
+ /* https://sourceforge.net/p/libmtp/bugs/1733/ */
+ { "Acer", 0x0502, "Liquid Zest 4G", 0x38a5,
+ DEVICE_FLAGS_ANDROID_BUGS },
/* Mia */
{ "Acer", 0x0502, "Liquid Zest Plus", 0x38bb,
DEVICE_FLAGS_ANDROID_BUGS },
@@ -846,6 +849,10 @@
{ "iRiver", 0x4102, "E30", 0x1167,
DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST | DEVICE_FLAG_NO_ZERO_READS |
DEVICE_FLAG_OGG_IS_UNKNOWN },
+ /* https://sourceforge.net/p/libmtp/bugs/1766/ */
+ { "iRiver", 0x4102, "AK380", 0x1195,
+ DEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST | DEVICE_FLAG_NO_ZERO_READS |
+ DEVICE_FLAG_OGG_IS_UNKNOWN },
/* https://sourceforge.net/p/libmtp/bugs/1634/
* copying flags from above */
{ "iRiver", 0x4102, "AK70", 0x1200,
@@ -1894,16 +1901,28 @@
DEVICE_FLAG_NONE },
{ "SONY", 0x0fce, "XPeria X MTP", 0x01e0,
DEVICE_FLAG_NONE },
+ /* https://sourceforge.net/p/libmtp/feature-requests/251/ */
+ { "SONY", 0x0fce, "XPeria SOV33", 0x01e1,
+ DEVICE_FLAG_NONE },
{ "SONY", 0x0fce, "XPeria XZ MTP", 0x01e7,
DEVICE_FLAG_NONE },
{ "SONY", 0x0fce, "XPeria X Compact MTP", 0x01e8,
DEVICE_FLAG_NONE },
+ /* https://sourceforge.net/p/libmtp/feature-requests/252/ */
+ { "SONY", 0x0fce, "XPeria G3123", 0x01eb,
+ DEVICE_FLAG_NONE },
/* https://sourceforge.net/p/libmtp/support-requests/247/ */
{ "SONY", 0x0fce, "XPeria XZ", 0x01ed,
DEVICE_FLAG_NONE },
/* https://sourceforge.net/p/libmtp/support-requests/251/ */
{ "SONY", 0x0fce, "XPeria XZ Premium", 0x01f1,
DEVICE_FLAG_NONE },
+ /* Nicholas O'Connor on libmtp-discuss */
+ { "SONY", 0x0fce, "XPeria XZ1", 0x01f3,
+ DEVICE_FLAG_NONE },
+ /* https://sourceforge.net/p/libmtp/support-requests/252/ */
+ { "SONY", 0x0fce, "XPeria XZ1 Compact", 0x01f4,
+ DEVICE_FLAG_NONE },
/*
@@ -2015,14 +2034,22 @@
DEVICE_FLAG_NONE },
{ "SONY", 0x0fce, "XPeria X MTP+CDROM", 0x41e0,
DEVICE_FLAG_NONE },
+ { "SONY", 0x0fce, "XPeria SOV33 MTP+CDROM", 0x41e1,
+ DEVICE_FLAG_NONE },
{ "SONY", 0x0fce, "XPeria XZ MTP+CDROM", 0x41e7,
DEVICE_FLAG_NONE },
{ "SONY", 0x0fce, "XPeria X Compact MTP+CDROM", 0x41e8,
DEVICE_FLAG_NONE },
+ { "SONY", 0x0fce, "XPeria G3123 MTP+CDROM", 0x41eb,
+ DEVICE_FLAG_NONE },
{ "SONY", 0x0fce, "XPeria XZ CDROM", 0x41ed,
DEVICE_FLAG_NONE },
{ "SONY", 0x0fce, "XPeria XZ Premium MTP+CDROM", 0x41f1,
DEVICE_FLAG_NONE },
+ { "SONY", 0x0fce, "XPeria XZ1 MTP+CDROM", 0x41f3,
+ DEVICE_FLAG_NONE },
+ { "SONY", 0x0fce, "XPeria XZ1 Compact MTP+CDROM", 0x41f4,
+ DEVICE_FLAG_NONE },
/*
* MTP+ADB personalities of MTP devices (see above)
@@ -2157,14 +2184,22 @@
DEVICE_FLAG_NONE },
{ "SONY", 0x0fce, "XPeria X MTP+ADB", 0x51e0,
DEVICE_FLAG_NONE },
+ { "SONY", 0x0fce, "XPeria SOV33 MTP+ADB", 0x51e1,
+ DEVICE_FLAG_NONE },
{ "SONY", 0x0fce, "XPeria XZ MTP+ADB", 0x51e7,
DEVICE_FLAG_NONE },
{ "SONY", 0x0fce, "XPeria X Compact MTP+ADB", 0x51e8,
DEVICE_FLAG_NONE },
+ { "SONY", 0x0fce, "XPeria G3123 MTP+ADB", 0x51eb,
+ DEVICE_FLAG_NONE },
{ "SONY", 0x0fce, "XPeria XZ ADB", 0x51ed,
DEVICE_FLAG_NONE },
{ "SONY", 0x0fce, "XPeria XZ Premium MTP+ADB", 0x51f1,
DEVICE_FLAG_NONE },
+ { "SONY", 0x0fce, "XPeria XZ1 ADB", 0x51f3,
+ DEVICE_FLAG_NONE },
+ { "SONY", 0x0fce, "XPeria XZ1 Compact MTP+ADB", 0x51f4,
+ DEVICE_FLAG_NONE },
/*
* MTP+UMS modes
@@ -2678,6 +2713,9 @@
/* https://sourceforge.net/p/libmtp/bugs/1364/ */
{ "Asus", 0x0b05, "Zenfone 2 ZE551ML (MTP)", 0x5f03,
DEVICE_FLAGS_ANDROID_BUGS },
+ /* https://sourceforge.net/p/libmtp/feature-requests/255/ */
+ { "Asus", 0x0b05, "Zenfone V (MTP)", 0x610f,
+ DEVICE_FLAGS_ANDROID_BUGS },
/* https://sourceforge.net/p/libmtp/bugs/1642/ */
{ "Asus", 0x0b05, "ME581CL", 0x7770,
DEVICE_FLAGS_ANDROID_BUGS },
@@ -2771,8 +2809,11 @@
/* https://sourceforge.net/p/libmtp/bugs/1250/ */
{ "Lenovo", 0x17ef, "A5500-F", 0x772b,
DEVICE_FLAGS_ANDROID_BUGS },
+ /* https://sourceforge.net/p/libmtp/bugs/1742/ */
+ { "Lenovo", 0x17ef, "A7600-F", 0x7730,
+ DEVICE_FLAGS_ANDROID_BUGS },
/* https://sourceforge.net/p/libmtp/bugs/1391/ */
- { "Lenovo", 0x17ef, "A7600-F", 0x7731,
+ { "Lenovo", 0x17ef, "A7600-F 2nd", 0x7731,
DEVICE_FLAGS_ANDROID_BUGS },
/* https://sourceforge.net/p/libmtp/bugs/1291/ */
{ "Lenovo", 0x17ef, "A3500-F", 0x7737,
@@ -2797,6 +2838,9 @@
/* https://sourceforge.net/p/libmtp/feature-requests/125/ */
{ "Lenovo", 0x17ef, "Vibe Z2", 0x77ea,
DEVICE_FLAGS_ANDROID_BUGS },
+ /* https://sourceforge.net/p/libmtp/feature-requests/253/ */
+ { "Lenovo", 0x17ef, "A7000-A Smartphone", 0x7882,
+ DEVICE_FLAGS_ANDROID_BUGS },
/* https://sourceforge.net/p/libmtp/bugs/1360/ */
{ "Lenovo", 0x17ef, "K3 Note", 0x7883,
DEVICE_FLAGS_ANDROID_BUGS },
@@ -2852,15 +2896,27 @@
/* https://sourceforge.net/p/libmtp/support-requests/242/ */
{ "Lenovo", 0x17ef, "Tab 3 10 Plus", 0x79de,
DEVICE_FLAGS_ANDROID_BUGS },
+ /* https://sourceforge.net/p/libmtp/bugs/1755/ */
+ { "Lenovo", 0x17ef, "TB3-850M ", 0x79de,
+ DEVICE_FLAGS_ANDROID_BUGS },
/* https://sourceforge.net/p/libmtp/bugs/1624/ */
{ "Lenovo", 0x17ef, "B Smartphone", 0x7a18,
DEVICE_FLAGS_ANDROID_BUGS },
+ /* https://sourceforge.net/p/libmtp/bugs/1738/ */
+ { "Lenovo", 0x17ef, "K6 Power", 0x7a2a,
+ DEVICE_FLAGS_ANDROID_BUGS },
/* https://sourceforge.net/p/libmtp/bugs/1679/ */
{ "Lenovo", 0x17ef, "C2", 0x7a36,
DEVICE_FLAGS_ANDROID_BUGS },
/* https://sourceforge.net/p/libmtp/support-requests/248/ */
{ "Lenovo", 0x17ef, "P2c72", 0x7a36,
DEVICE_FLAGS_ANDROID_BUGS },
+ /* Marcus parents */
+ { "Lenovo", 0x17ef, "Tab 10", 0x7a50,
+ DEVICE_FLAGS_ANDROID_BUGS },
+ /* https://sourceforge.net/p/libmtp/bugs/1736/ */
+ { "Lenovo", 0x17ef, "P1060X", 0x9039,
+ DEVICE_FLAGS_ANDROID_BUGS },
/*
* Huawei
@@ -2885,6 +2941,9 @@
/* https://sourceforge.net/p/libmtp/feature-requests/173/ */
{ "Huawei", 0x12d1, "P9 Plus", 0x107e,
DEVICE_FLAGS_ANDROID_BUGS },
+ /* https://sourceforge.net/p/libmtp/support-requests/259/ */
+ { "Huawei", 0x12d1, "Y5 2017", 0x107f,
+ DEVICE_FLAGS_ANDROID_BUGS },
/* https://sourceforge.net/p/libmtp/bugs/1361/ */
{ "Huawei", 0x12d1, "Ascend P8", 0x1082,
DEVICE_FLAGS_ANDROID_BUGS },
@@ -2911,6 +2970,9 @@
*/
{ "Huawei", 0x12d1, "CUN-U29", 0x2608,
DEVICE_FLAGS_ANDROID_BUGS },
+ /* https://sourceforge.net/p/libmtp/support-requests/257/ */
+ { "Huawei", 0x12d1, "LUA-L02", 0x260b,
+ DEVICE_FLAGS_ANDROID_BUGS },
{ "Huawei", 0x12d1, "Mediapad (mode 0)", 0x360f,
DEVICE_FLAGS_ANDROID_BUGS },
// Reported by Bearsh
@@ -2928,6 +2990,8 @@
/* https://sourceforge.net/p/libmtp/bugs/672/ */
{ "ZTE", 0x19d2, "Grand X In", 0x0343, DEVICE_FLAGS_ANDROID_BUGS },
{ "ZTE", 0x19d2, "V985", 0x0383, DEVICE_FLAGS_ANDROID_BUGS },
+ /* https://sourceforge.net/p/libmtp/bugs/1745/ */
+ { "ZTE", 0x19d2, "Blade L3", 0x2008, DEVICE_FLAGS_ANDROID_BUGS },
/* https://sourceforge.net/p/libmtp/bugs/1328/ */
{ "ZTE", 0x19d2, "V5", 0xffce, DEVICE_FLAGS_ANDROID_BUGS },
/* https://sourceforge.net/p/libmtp/bugs/1646/ */
@@ -3075,6 +3139,9 @@
DEVICE_FLAGS_ANDROID_BUGS },
{ "HTC", 0x0bb4, "HTC One M8 (MTP)", 0x0f25,
DEVICE_FLAGS_ANDROID_BUGS },
+ /* https://sourceforge.net/p/libmtp/feature-requests/245/ */
+ { "HTC", 0x0bb4, "HTC One U11 (MTP)", 0x0f26,
+ DEVICE_FLAGS_ANDROID_BUGS },
{ "HTC", 0x0bb4, "HTC One M8 (MTP+ADB)", 0x061a,
DEVICE_FLAGS_ANDROID_BUGS },
{ "HTC", 0x0bb4, "HTC One M8 (MTP+UMS)", 0x0fb5,
@@ -3124,6 +3191,8 @@
* NEC
*/
{ "NEC", 0x0409, "FOMA N01A", 0x0242, DEVICE_FLAG_NONE },
+ /* https://sourceforge.net/p/libmtp/bugs/1724/ */
+ { "Casio", 0x0409, "GzOne Commando C771", 0x02ed, DEVICE_FLAG_NONE },
{ "NEC", 0x0409, "Casio C811", 0x0326, DEVICE_FLAG_NONE },
{ "NEC", 0x0409, "Casio CA-201L", 0x0432, DEVICE_FLAG_NONE },
@@ -3214,7 +3283,7 @@
{ "Amazon", 0x1949, "Kindle Fire 5", 0x0222,
DEVICE_FLAGS_ANDROID_BUGS },
/* https://sourceforge.net/p/libmtp/bugs/1718/ */
- { "Amazon", 0x1949, "Kindle Fire 8", 0x0261,
+ { "Amazon", 0x1949, "Kindle Fire 8 (2nd ID)", 0x0261,
DEVICE_FLAGS_ANDROID_BUGS },
{ "Amazon", 0x1949, "Fire Phone", 0x0800,
DEVICE_FLAGS_ANDROID_BUGS },
@@ -3516,6 +3585,8 @@
/* https://sourceforge.net/p/libmtp/bugs/1292/ */
{ "Prestigio", 0x29e4, "5505 DUO ", 0x1103, DEVICE_FLAGS_ANDROID_BUGS },
+ /* https://sourceforge.net/p/libmtp/support-requests/260/ */
+ { "MediaTek", 0x29e4, "5508 DUO", 0x1201, DEVICE_FLAGS_ANDROID_BUGS },
/* https://sourceforge.net/p/libmtp/bugs/1243/ */
{ "Prestigio", 0x29e4, "5504 DUO ", 0x1203, DEVICE_FLAGS_ANDROID_BUGS },
/* https://sourceforge.net/p/libmtp/feature-requests/141/ */
@@ -3555,8 +3626,12 @@
{ "Caterpillar", 0x04b7, "Cat S50 (2nd ID)", 0x88aa, DEVICE_FLAGS_ANDROID_BUGS },
/* https://sourceforge.net/p/libmtp/bugs/1603/ */
{ "Caterpillar", 0x04b7, "Cat S40", 0x88b0, DEVICE_FLAGS_ANDROID_BUGS },
+ /* https://sourceforge.net/p/libmtp/support-requests/253/ */
+ { "Caterpillar", 0x04b7, "Cat S30", 0x88b9, DEVICE_FLAGS_ANDROID_BUGS },
/* https://sourceforge.net/p/libmtp/feature-requests/176/ */
{ "Caterpillar", 0x04b7, "Cat S60", 0x88c0, DEVICE_FLAGS_ANDROID_BUGS },
+ /* https://sourceforge.net/p/libmtp/bugs/1757/ */
+ { "Caterpillar", 0x04b7, "Cat S41", 0x88c6, DEVICE_FLAGS_ANDROID_BUGS },
/* https://sourceforge.net/p/libmtp/bugs/682/ */
{ "Pegatron", 0x1d4d, "Chagall (ADB)", 0x5035, DEVICE_FLAGS_ANDROID_BUGS },
@@ -3600,6 +3675,9 @@
*/
{ "YU Yureka", 0x1ebf, "Vodafone smart turbo 4", 0x7f29, DEVICE_FLAGS_ANDROID_BUGS },
+ /* https://sourceforge.net/p/libmtp/feature-requests/249/ */
+ { "Coolpad", 0x1ebf, "801ES", 0x7029, DEVICE_FLAGS_ANDROID_BUGS },
+
/* https://sourceforge.net/p/libmtp/bugs/1314/ */
{ "BenQ", 0x1d45, "F5", 0x459d, DEVICE_FLAGS_ANDROID_BUGS },
@@ -3634,10 +3712,13 @@
{ "GoPro" , 0x2672, "HERO+", 0x0021, DEVICE_FLAG_NONE },
{ "GoPro" , 0x2672, "HERO5 Black", 0x0027, DEVICE_FLAG_NONE },
{ "GoPro" , 0x2672, "HERO5 Session", 0x0029, DEVICE_FLAG_NONE },
+ { "GoPro" , 0x2672, "HERO6 Black", 0x0037, DEVICE_FLAG_NONE },
/* https://sourceforge.net/p/libmtp/bugs/1490/ */
{ "Marshall" , 0x2ad9, "London", 0x000b, DEVICE_FLAG_NONE },
+ /* https://sourceforge.net/p/libmtp/feature-requests/257/ */
+ { "Fairphone" , 0x2ae5, "Fairphone 2 (ID2)", 0x6764, DEVICE_FLAGS_ANDROID_BUGS },
/* https://sourceforge.net/p/libmtp/support-requests/202/ */
{ "Fairphone" , 0x2ae5, "Fairphone 2", 0xf003, DEVICE_FLAGS_ANDROID_BUGS },
/* https://sourceforge.net/p/libmtp/support-requests/214/ */
@@ -3675,6 +3756,8 @@
/* https://sourceforge.net/p/libmtp/bugs/1716/ */
{ "Letv" , 0x2b0e, "Le Max2", 0x1840, DEVICE_FLAGS_ANDROID_BUGS },
+ /* https://sourceforge.net/p/libmtp/bugs/1768/ */
+ { "Letv" , 0x2b0e, "Le Max2 (ID2)", 0x1844, DEVICE_FLAGS_ANDROID_BUGS },
/* https://sourceforge.net/p/libmtp/bugs/1606/ */
{ "TP-Link" , 0x2357, "Neffos C5 (MTP)", 0x0314, DEVICE_FLAGS_ANDROID_BUGS },
@@ -3694,6 +3777,20 @@
/* https://sourceforge.net/p/libmtp/bugs/1663/ */
{ "Nextbit" , 0x2c3f, "Robin", 0x0001, DEVICE_FLAGS_ANDROID_BUGS },
+
+ /* https://sourceforge.net/p/libmtp/feature-requests/240/ */
+ { "Spreadtrum" , 0x1782, "STK Storm 2e Pluz", 0x4002, DEVICE_FLAGS_ANDROID_BUGS },
+
+ /* https://sourceforge.net/p/libmtp/support-requests/258/ */
+ { "Essential Phone" , 0x2e17, "PH-1a", 0xc030, DEVICE_FLAGS_ANDROID_BUGS },
+ /* https://sourceforge.net/p/libmtp/feature-requests/242/ */
+ { "Essential Phone" , 0x2e17, "PH-1", 0xc033, DEVICE_FLAGS_ANDROID_BUGS },
+
+ /* https://sourceforge.net/p/libmtp/feature-requests/247/ */
+ { "VEGA" , 0x10a9, "R3", 0x1105, DEVICE_FLAGS_ANDROID_BUGS },
+
+ /* https://sourceforge.net/p/libmtp/bugs/1764/ */
+ { "O&P Innovations" , 0x0746, "XDP-100R", 0xa003, DEVICE_FLAGS_ANDROID_BUGS },
/*
* Other strange stuff.
*/
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmtp-1.1.14/src/ptp.c new/libmtp-1.1.15/src/ptp.c
--- old/libmtp-1.1.14/src/ptp.c 2017-07-27 17:19:37.000000000 +0200
+++ new/libmtp-1.1.15/src/ptp.c 2018-03-17 09:19:02.000000000 +0100
@@ -1550,6 +1550,53 @@
}
/**
+ * ptp_moveobject:
+ * params: PTPParams*
+ * handle - source ObjectHandle
+ * storage - destination StorageID
+ * parent - destination parent ObjectHandle
+ *
+ * Move an object to a new location under the specified parent.
+ * Note that unlike most calls, 0 must be passed for the parent if the destination
+ * is the Storage root.
+ *
+ * Return values: Some PTP_RC_* code.
+ **/
+uint16_t
+ptp_moveobject (PTPParams* params, uint32_t handle, uint32_t storage, uint32_t parent)
+{
+ PTPContainer ptp;
+
+ PTP_CNT_INIT(ptp, PTP_OC_MoveObject, handle, storage, parent);
+ CHECK_PTP_RC(ptp_transaction(params, &ptp, PTP_DP_NODATA, 0, NULL, NULL));
+ /* If the object is cached and could be removed, cleanse cache. */
+ ptp_remove_object_from_cache(params, handle);
+ return PTP_RC_OK;
+}
+
+/**
+ * ptp_copyobject:
+ * params: PTPParams*
+ * handle - source ObjectHandle
+ * storage - destination StorageID
+ * parent - destination parent ObjectHandle
+ *
+ * Copy an object to a new location under the specified parent.
+ * Note that unlike most calls, 0 must be passed for the parent if the destination
+ * is the Storage root.
+ *
+ * Return values: Some PTP_RC_* code.
+ **/
+uint16_t
+ptp_copyobject (PTPParams* params, uint32_t handle, uint32_t storage, uint32_t parent)
+{
+ PTPContainer ptp;
+
+ PTP_CNT_INIT(ptp, PTP_OC_CopyObject, handle, storage, parent);
+ return ptp_transaction(params, &ptp, PTP_DP_NODATA, 0, NULL, NULL);
+}
+
+/**
* ptp_sendobjectinfo:
* params: PTPParams*
* uint32_t* store - destination StorageID on Responder
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/libmtp-1.1.14/src/ptp.h new/libmtp-1.1.15/src/ptp.h
--- old/libmtp-1.1.14/src/ptp.h 2017-07-27 17:20:04.000000000 +0200
+++ new/libmtp-1.1.15/src/ptp.h 2018-03-17 09:19:02.000000000 +0100
@@ -2676,6 +2676,12 @@
uint16_t ptp_deleteobject (PTPParams* params, uint32_t handle,
uint32_t ofc);
+uint16_t ptp_moveobject (PTPParams* params, uint32_t handle,
+ uint32_t storage, uint32_t parent);
+
+uint16_t ptp_copyobject (PTPParams* params, uint32_t handle,
+ uint32_t storage, uint32_t parent);
+
uint16_t ptp_sendobjectinfo (PTPParams* params, uint32_t* store,
uint32_t* parenthandle, uint32_t* handle,
PTPObjectInfo* objectinfo);