Donate Share

libmtp

Tracker: Patches

5 Path for C++ compatibility - ID: 2838990
Last Update: Comment added ( sf-robot )

- The attached patch contains some changes to be able to compile the files
when they are included into a C++ project. Mainly this concerns the change
of the variables "private" to "_private" and "new" to "_new". Also added
"extern C" to libusb-glue.h for the previously mentioned reason.

- Added a "#define USB_CLASS_PTP 6" to ptp.h. The usage of USB_CLASS_PTP
came into the project through commit revision 1.273 of file libusb-glue.c.
Maybe a newer version of libusb has this defined, but the win32 version
hasn't.

- Added product and vendor id infos for Sony Ericsson K550i to
music-players.h.

- Added some lines of code to libusb-glue.c which are currently commented
out. But they could be used to handle devices that are pure PTP devices and
no MTP. Perhaps this could be made available by a preprocessor switch or
even by a function parameter that enables libmtp also to detect pure PTP
devices. Any suggestion?


Thomas Schweitzer ( thomas_-_s ) - 2009-08-17 14:03

5

Closed

Fixed

Linus Walleij

None

None

Public


Comments ( 4 )

Date: 2009-09-07 02:20
Sender: sf-robotSourceForge.net Site Admin

This Tracker item was closed automatically by the system. It was
previously set to a Pending status, and the original submitter
did not respond within 14 days (the time period specified by
the administrator of this Tracker).


Date: 2009-08-23 21:50
Sender: snirkelProject AdminAccepting Donations

Patched in the most of it, moved the conditional define if
USB_CLASS_PTP to libusb-glue.c instead, brought in ptp.c/ptp.h
from upstream, replaced "_private" for "priv" globally as Marcus
did. Replaced _new with "newlist" in playlist-spl.*

Thanks! Please check that it's OK.


Date: 2009-08-19 15:35
Sender: nobody

i applied the ptp.c and ptp.h part


Date: 2009-08-19 15:31
Sender: nobody

i applied the ptp.c and ptp.h parts to libgphoto2


Attached File ( 1 )

Filename Description Download
libmtp_4win32.patch Patch for C++ compatibility and a bit more Download

Changes ( 8 )

Field Old Value Date By
close_date 2009-08-23 21:50 2009-09-07 02:20 sf-robot
status_id Pending 2009-09-07 02:20 sf-robot
allow_comments 1 2009-09-07 02:20 sf-robot
assigned_to nobody 2009-08-23 21:50 snirkel
close_date - 2009-08-23 21:50 snirkel
status_id Open 2009-08-23 21:50 snirkel
resolution_id None 2009-08-23 21:50 snirkel
File Added 339470: libmtp_4win32.patch 2009-08-17 14:03 thomas_-_s