.TH "libusb-glue.h" 3 "Version 1.1.21" "libmtp" \" -*- nroff -*- .ad l .nh .SH NAME libmtp \- .SH SYNOPSIS .br .PP \fC#include 'ptp\&.h'\fP .br \fC#include 'libmtp\&.h'\fP .br \fC#include 'device\-flags\&.h'\fP .br .SS "Data Structures" .in +1c .ti -1c .RI "struct \fB_PTP_USB\fP" .br .in -1c .SS "Macros" .in +1c .ti -1c .RI "#define \fBLIBMTP_USB_DEBUG\fP(format, args\&.\&.\&.)" .br .ti -1c .RI "#define \fBLIBMTP_USB_DATA\fP(buffer, length, base)" .br .ti -1c .RI "#define \fBFLAG_BROKEN_MTPGETOBJPROPLIST_ALL\fP(a) ((a)\->rawdevice\&.device_entry\&.device_flags & \fBDEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST_ALL\fP)" .br .ti -1c .RI "#define \fBFLAG_UNLOAD_DRIVER\fP(a) ((a)\->rawdevice\&.device_entry\&.device_flags & \fBDEVICE_FLAG_UNLOAD_DRIVER\fP)" .br .ti -1c .RI "#define \fBFLAG_BROKEN_MTPGETOBJPROPLIST\fP(a) ((a)\->rawdevice\&.device_entry\&.device_flags & \fBDEVICE_FLAG_BROKEN_MTPGETOBJPROPLIST\fP)" .br .ti -1c .RI "#define \fBFLAG_NO_ZERO_READS\fP(a) ((a)\->rawdevice\&.device_entry\&.device_flags & \fBDEVICE_FLAG_NO_ZERO_READS\fP)" .br .ti -1c .RI "#define \fBFLAG_IRIVER_OGG_ALZHEIMER\fP(a) ((a)\->rawdevice\&.device_entry\&.device_flags & \fBDEVICE_FLAG_IRIVER_OGG_ALZHEIMER\fP)" .br .ti -1c .RI "#define \fBFLAG_ONLY_7BIT_FILENAMES\fP(a) ((a)\->rawdevice\&.device_entry\&.device_flags & \fBDEVICE_FLAG_ONLY_7BIT_FILENAMES\fP)" .br .ti -1c .RI "#define \fBFLAG_NO_RELEASE_INTERFACE\fP(a) ((a)\->rawdevice\&.device_entry\&.device_flags & \fBDEVICE_FLAG_NO_RELEASE_INTERFACE\fP)" .br .ti -1c .RI "#define \fBFLAG_IGNORE_HEADER_ERRORS\fP(a) ((a)\->rawdevice\&.device_entry\&.device_flags & \fBDEVICE_FLAG_IGNORE_HEADER_ERRORS\fP)" .br .ti -1c .RI "#define \fBFLAG_BROKEN_SET_OBJECT_PROPLIST\fP(a) ((a)\->rawdevice\&.device_entry\&.device_flags & \fBDEVICE_FLAG_BROKEN_SET_OBJECT_PROPLIST\fP)" .br .ti -1c .RI "#define \fBFLAG_OGG_IS_UNKNOWN\fP(a) ((a)\->rawdevice\&.device_entry\&.device_flags & \fBDEVICE_FLAG_OGG_IS_UNKNOWN\fP)" .br .ti -1c .RI "#define \fBFLAG_BROKEN_SET_SAMPLE_DIMENSIONS\fP(a) ((a)\->rawdevice\&.device_entry\&.device_flags & \fBDEVICE_FLAG_BROKEN_SET_SAMPLE_DIMENSIONS\fP)" .br .ti -1c .RI "#define \fBFLAG_ALWAYS_PROBE_DESCRIPTOR\fP(a) ((a)\->rawdevice\&.device_entry\&.device_flags & \fBDEVICE_FLAG_ALWAYS_PROBE_DESCRIPTOR\fP)" .br .ti -1c .RI "#define \fBFLAG_PLAYLIST_SPL_V1\fP(a) ((a)\->rawdevice\&.device_entry\&.device_flags & \fBDEVICE_FLAG_PLAYLIST_SPL_V1\fP)" .br .ti -1c .RI "#define \fBFLAG_PLAYLIST_SPL_V2\fP(a) ((a)\->rawdevice\&.device_entry\&.device_flags & \fBDEVICE_FLAG_PLAYLIST_SPL_V2\fP)" .br .ti -1c .RI "#define \fBFLAG_PLAYLIST_SPL\fP(a) ((a)\->rawdevice\&.device_entry\&.device_flags & (\fBDEVICE_FLAG_PLAYLIST_SPL_V1\fP | \fBDEVICE_FLAG_PLAYLIST_SPL_V2\fP))" .br .ti -1c .RI "#define \fBFLAG_CANNOT_HANDLE_DATEMODIFIED\fP(a) ((a)\->rawdevice\&.device_entry\&.device_flags & \fBDEVICE_FLAG_CANNOT_HANDLE_DATEMODIFIED\fP)" .br .ti -1c .RI "#define \fBFLAG_BROKEN_SEND_OBJECT_PROPLIST\fP(a) ((a)\->rawdevice\&.device_entry\&.device_flags & \fBDEVICE_FLAG_BROKEN_SEND_OBJECT_PROPLIST\fP)" .br .ti -1c .RI "#define \fBFLAG_BROKEN_BATTERY_LEVEL\fP(a) ((a)\->rawdevice\&.device_entry\&.device_flags & \fBDEVICE_FLAG_BROKEN_BATTERY_LEVEL\fP)" .br .ti -1c .RI "#define \fBFLAG_FLAC_IS_UNKNOWN\fP(a) ((a)\->rawdevice\&.device_entry\&.device_flags & \fBDEVICE_FLAG_FLAC_IS_UNKNOWN\fP)" .br .ti -1c .RI "#define \fBFLAG_UNIQUE_FILENAMES\fP(a) ((a)\->rawdevice\&.device_entry\&.device_flags & \fBDEVICE_FLAG_UNIQUE_FILENAMES\fP)" .br .ti -1c .RI "#define \fBFLAG_SWITCH_MODE_BLACKBERRY\fP(a) ((a)\->rawdevice\&.device_entry\&.device_flags & \fBDEVICE_FLAG_SWITCH_MODE_BLACKBERRY\fP)" .br .ti -1c .RI "#define \fBFLAG_LONG_TIMEOUT\fP(a) ((a)\->rawdevice\&.device_entry\&.device_flags & \fBDEVICE_FLAG_LONG_TIMEOUT\fP)" .br .ti -1c .RI "#define \fBFLAG_FORCE_RESET_ON_CLOSE\fP(a) ((a)\->rawdevice\&.device_entry\&.device_flags & \fBDEVICE_FLAG_FORCE_RESET_ON_CLOSE\fP)" .br .ti -1c .RI "#define \fBPTP_CD_RC_CONNECTED\fP 0" .br .ti -1c .RI "#define \fBPTP_CD_RC_NO_DEVICES\fP 1" .br .ti -1c .RI "#define \fBPTP_CD_RC_ERROR_CONNECTING\fP 2" .br .in -1c .SS "Typedefs" .in +1c .ti -1c .RI "typedef struct \fB_PTP_USB\fP \fBPTP_USB\fP" .br .in -1c .SS "Functions" .in +1c .ti -1c .RI "void \fBdump_usbinfo\fP (\fBPTP_USB\fP *ptp_usb)" .br .ti -1c .RI "const char * \fBget_playlist_extension\fP (\fBPTP_USB\fP *ptp_usb)" .br .ti -1c .RI "void \fBclose_device\fP (\fBPTP_USB\fP *ptp_usb, \fBPTPParams\fP *params)" .br .ti -1c .RI "\fBLIBMTP_error_number_t\fP \fBconfigure_usb_device\fP (\fBLIBMTP_raw_device_t\fP *device, \fBPTPParams\fP *params, void **usbinfo)" .br .ti -1c .RI "void \fBset_usb_device_timeout\fP (\fBPTP_USB\fP *ptp_usb, int timeout)" .br .ti -1c .RI "void \fBget_usb_device_timeout\fP (\fBPTP_USB\fP *ptp_usb, int *timeout)" .br .ti -1c .RI "int \fBguess_usb_speed\fP (\fBPTP_USB\fP *ptp_usb)" .br .in -1c .SH "Detailed Description" .PP Low-level USB interface glue towards libusb\&. .PP Copyright (C) 2005-2007 Richard A\&. Low richard@wentnet.com Copyright (C) 2005-2012 Linus Walleij triad@df.lth.se Copyright (C) 2006-2011 Marcus Meissner Copyright (C) 2007 Ted Bullock Copyright (C) 2008 Chris Bagwell chris@cnpbagwell.com .PP This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version\&. .PP This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE\&. See the GNU Lesser General Public License for more details\&. .PP You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc\&., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA\&. .PP Created by Richard Low on 24/12/2005\&. Modified by Linus Walleij .SH "Macro Definition Documentation" .PP .SS "#define LIBMTP_USB_DATA(buffer, length, base)" \fBValue:\fP.PP .nf do { \\ if ((LIBMTP_debug & LIBMTP_DEBUG_DATA) != 0) \\ data_dump_ascii (stdout, buffer, length, base); \\ } while (0) .fi .SS "#define LIBMTP_USB_DEBUG(format, args\&.\&.\&.)" \fBValue:\fP.PP .nf do { \\ if ((LIBMTP_debug & LIBMTP_DEBUG_USB) != 0) \\ fprintf(stdout, "LIBMTP %s[%d]: " format, __FUNCTION__, __LINE__, ##args); \\ } while (0) .fi Debug macro .SH "Typedef Documentation" .PP .SS "typedef struct \fB_PTP_USB\fP \fBPTP_USB\fP" Internal USB struct\&. .SH "Function Documentation" .PP .SS "\fBLIBMTP_error_number_t\fP configure_usb_device (\fBLIBMTP_raw_device_t\fP * device, \fBPTPParams\fP * params, void ** usbinfo)" This function assigns params and usbinfo given a raw device as input\&. .PP \fBParameters\fP .RS 4 \fIdevice\fP the device to be assigned\&. .br \fIusbinfo\fP a pointer to the new usbinfo\&. .RE .PP \fBReturns\fP .RS 4 an error code\&. .RE .PP .PP References \fBLIBMTP_raw_device_struct::device_entry\fP, \fBLIBMTP_device_entry_struct::product_id\fP, \fB_PTP_USB::rawdevice\fP, and \fBLIBMTP_device_entry_struct::vendor_id\fP\&. .SS "void dump_usbinfo (\fBPTP_USB\fP * ptp_usb)" This routine just dumps out low-level USB information about the current device\&. .PP \fBParameters\fP .RS 4 \fIptp_usb\fP the USB device to get information from\&. .RE .PP .PP References \fBLIBMTP_raw_device_struct::bus_location\fP, \fBLIBMTP_raw_device_struct::device_entry\fP, \fBLIBMTP_device_entry_struct::device_flags\fP, \fBLIBMTP_raw_device_struct::devnum\fP, \fBLIBMTP_device_entry_struct::product\fP, \fBLIBMTP_device_entry_struct::product_id\fP, \fB_PTP_USB::rawdevice\fP, \fBLIBMTP_device_entry_struct::vendor\fP, and \fBLIBMTP_device_entry_struct::vendor_id\fP\&. .SS "const char * get_playlist_extension (\fBPTP_USB\fP * ptp_usb)" Retrieve the appropriate playlist extension for this device\&. Rather hacky at the moment\&. This is probably desired by the managing software, but when creating lists on the device itself you notice certain preferences\&. .PP \fBParameters\fP .RS 4 \fIptp_usb\fP the USB device to get suggestion for\&. .RE .PP \fBReturns\fP .RS 4 the suggested playlist extension\&. .RE .PP .SH "Author" .PP Generated automatically by Doxygen for libmtp from the source code\&.