libmtp.h
Go to the documentation of this file.
#ifndef LIBMTP_H_INCLUSION_GUARD
#define LIBMTP_H_INCLUSION_GUARD
#define LIBMTP_VERSION 1.1.21
#define LIBMTP_VERSION_STRING "1.1.21"
/* This handles MSVC pecularities */
#ifdef _MSC_VER
#include <windows.h>
#define __WIN32__
#if _MSC_VER < 1900
#define snprintf _snprintf
#endif
#define ssize_t SSIZE_T
/*
* Types that do not exist in Windows
* sys/types.h, but they exist in mingw32
* sys/types.h.
*/
typedef char int8_t;
typedef unsigned char uint8_t;
typedef __int16 int16_t;
typedef unsigned __int16 uint16_t;
typedef __int32 int32_t;
typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t;
#else
#include <sys/time.h>
#endif
#include <stdio.h>
#include <stdint.h>
/* We use time_t */
#include <time.h>
#define LIBMTP_DEBUG_NONE 0x00
#define LIBMTP_DEBUG_PTP 0x01
#define LIBMTP_DEBUG_PLST 0x02
#define LIBMTP_DEBUG_USB 0x04
#define LIBMTP_DEBUG_DATA 0x08
#define LIBMTP_DEBUG_ALL 0xFF
typedef enum {
LIBMTP_FILETYPE_FOLDER,
LIBMTP_FILETYPE_WAV,
LIBMTP_FILETYPE_MP3,
LIBMTP_FILETYPE_WMA,
LIBMTP_FILETYPE_OGG,
LIBMTP_FILETYPE_AUDIBLE,
LIBMTP_FILETYPE_MP4,
LIBMTP_FILETYPE_UNDEF_AUDIO,
LIBMTP_FILETYPE_WMV,
LIBMTP_FILETYPE_AVI,
LIBMTP_FILETYPE_MPEG,
LIBMTP_FILETYPE_ASF,
LIBMTP_FILETYPE_QT,
LIBMTP_FILETYPE_UNDEF_VIDEO,
LIBMTP_FILETYPE_JPEG,
LIBMTP_FILETYPE_JFIF,
LIBMTP_FILETYPE_TIFF,
LIBMTP_FILETYPE_BMP,
LIBMTP_FILETYPE_GIF,
LIBMTP_FILETYPE_PICT,
LIBMTP_FILETYPE_PNG,
LIBMTP_FILETYPE_VCALENDAR1,
LIBMTP_FILETYPE_VCALENDAR2,
LIBMTP_FILETYPE_VCARD2,
LIBMTP_FILETYPE_VCARD3,
LIBMTP_FILETYPE_WINDOWSIMAGEFORMAT,
LIBMTP_FILETYPE_WINEXEC,
LIBMTP_FILETYPE_TEXT,
LIBMTP_FILETYPE_HTML,
LIBMTP_FILETYPE_FIRMWARE,
LIBMTP_FILETYPE_AAC,
LIBMTP_FILETYPE_MEDIACARD,
LIBMTP_FILETYPE_FLAC,
LIBMTP_FILETYPE_MP2,
LIBMTP_FILETYPE_M4A,
LIBMTP_FILETYPE_DOC,
LIBMTP_FILETYPE_XML,
LIBMTP_FILETYPE_XLS,
LIBMTP_FILETYPE_PPT,
LIBMTP_FILETYPE_MHT,
LIBMTP_FILETYPE_JP2,
LIBMTP_FILETYPE_JPX,
LIBMTP_FILETYPE_ALBUM,
LIBMTP_FILETYPE_PLAYLIST,
LIBMTP_FILETYPE_UNKNOWN
} LIBMTP_filetype_t;
#define LIBMTP_FILETYPE_IS_AUDIO(a)\
(a == LIBMTP_FILETYPE_WAV ||\
a == LIBMTP_FILETYPE_MP3 ||\
a == LIBMTP_FILETYPE_MP2 ||\
a == LIBMTP_FILETYPE_WMA ||\
a == LIBMTP_FILETYPE_OGG ||\
a == LIBMTP_FILETYPE_FLAC ||\
a == LIBMTP_FILETYPE_AAC ||\
a == LIBMTP_FILETYPE_M4A ||\
a == LIBMTP_FILETYPE_AUDIBLE ||\
a == LIBMTP_FILETYPE_UNDEF_AUDIO)
#define LIBMTP_FILETYPE_IS_VIDEO(a)\
(a == LIBMTP_FILETYPE_WMV ||\
a == LIBMTP_FILETYPE_AVI ||\
a == LIBMTP_FILETYPE_MPEG ||\
a == LIBMTP_FILETYPE_UNDEF_VIDEO)
#define LIBMTP_FILETYPE_IS_AUDIOVIDEO(a)\
(a == LIBMTP_FILETYPE_MP4 ||\
a == LIBMTP_FILETYPE_ASF ||\
a == LIBMTP_FILETYPE_QT)
#define LIBMTP_FILETYPE_IS_TRACK(a)\
(LIBMTP_FILETYPE_IS_AUDIO(a) ||\
LIBMTP_FILETYPE_IS_VIDEO(a) ||\
LIBMTP_FILETYPE_IS_AUDIOVIDEO(a))
#define LIBMTP_FILETYPE_IS_IMAGE(a)\
(a == LIBMTP_FILETYPE_JPEG ||\
a == LIBMTP_FILETYPE_JFIF ||\
a == LIBMTP_FILETYPE_TIFF ||\
a == LIBMTP_FILETYPE_BMP ||\
a == LIBMTP_FILETYPE_GIF ||\
a == LIBMTP_FILETYPE_PICT ||\
a == LIBMTP_FILETYPE_PNG ||\
a == LIBMTP_FILETYPE_JP2 ||\
a == LIBMTP_FILETYPE_JPX ||\
a == LIBMTP_FILETYPE_WINDOWSIMAGEFORMAT)
#define LIBMTP_FILETYPE_IS_ADDRESSBOOK(a)\
(a == LIBMTP_FILETYPE_VCARD2 ||\
a == LIBMTP_FILETYPE_VCARD3)
#define LIBMTP_FILETYPE_IS_CALENDAR(a)\
(a == LIBMTP_FILETYPE_VCALENDAR1 ||\
a == LIBMTP_FILETYPE_VCALENDAR2)
typedef enum {
LIBMTP_PROPERTY_StorageID,
LIBMTP_PROPERTY_ObjectFormat,
LIBMTP_PROPERTY_ProtectionStatus,
LIBMTP_PROPERTY_ObjectSize,
LIBMTP_PROPERTY_AssociationType,
LIBMTP_PROPERTY_AssociationDesc,
LIBMTP_PROPERTY_ObjectFileName,
LIBMTP_PROPERTY_DateCreated,
LIBMTP_PROPERTY_DateModified,
LIBMTP_PROPERTY_Keywords,
LIBMTP_PROPERTY_ParentObject,
LIBMTP_PROPERTY_AllowedFolderContents,
LIBMTP_PROPERTY_Hidden,
LIBMTP_PROPERTY_SystemObject,
LIBMTP_PROPERTY_PersistantUniqueObjectIdentifier,
LIBMTP_PROPERTY_SyncID,
LIBMTP_PROPERTY_PropertyBag,
LIBMTP_PROPERTY_Name,
LIBMTP_PROPERTY_CreatedBy,
LIBMTP_PROPERTY_Artist,
LIBMTP_PROPERTY_DateAuthored,
LIBMTP_PROPERTY_Description,
LIBMTP_PROPERTY_URLReference,
LIBMTP_PROPERTY_LanguageLocale,
LIBMTP_PROPERTY_CopyrightInformation,
LIBMTP_PROPERTY_Source,
LIBMTP_PROPERTY_OriginLocation,
LIBMTP_PROPERTY_DateAdded,
LIBMTP_PROPERTY_NonConsumable,
LIBMTP_PROPERTY_CorruptOrUnplayable,
LIBMTP_PROPERTY_ProducerSerialNumber,
LIBMTP_PROPERTY_RepresentativeSampleFormat,
LIBMTP_PROPERTY_RepresentativeSampleSize,
LIBMTP_PROPERTY_RepresentativeSampleHeight,
LIBMTP_PROPERTY_RepresentativeSampleWidth,
LIBMTP_PROPERTY_RepresentativeSampleDuration,
LIBMTP_PROPERTY_RepresentativeSampleData,
LIBMTP_PROPERTY_Width,
LIBMTP_PROPERTY_Height,
LIBMTP_PROPERTY_Duration,
LIBMTP_PROPERTY_Rating,
LIBMTP_PROPERTY_Track,
LIBMTP_PROPERTY_Genre,
LIBMTP_PROPERTY_Credits,
LIBMTP_PROPERTY_Lyrics,
LIBMTP_PROPERTY_SubscriptionContentID,
LIBMTP_PROPERTY_ProducedBy,
LIBMTP_PROPERTY_UseCount,
LIBMTP_PROPERTY_SkipCount,
LIBMTP_PROPERTY_LastAccessed,
LIBMTP_PROPERTY_ParentalRating,
LIBMTP_PROPERTY_MetaGenre,
LIBMTP_PROPERTY_Composer,
LIBMTP_PROPERTY_EffectiveRating,
LIBMTP_PROPERTY_Subtitle,
LIBMTP_PROPERTY_OriginalReleaseDate,
LIBMTP_PROPERTY_AlbumName,
LIBMTP_PROPERTY_AlbumArtist,
LIBMTP_PROPERTY_Mood,
LIBMTP_PROPERTY_DRMStatus,
LIBMTP_PROPERTY_SubDescription,
LIBMTP_PROPERTY_IsCropped,
LIBMTP_PROPERTY_IsColorCorrected,
LIBMTP_PROPERTY_ImageBitDepth,
LIBMTP_PROPERTY_Fnumber,
LIBMTP_PROPERTY_ExposureTime,
LIBMTP_PROPERTY_ExposureIndex,
LIBMTP_PROPERTY_DisplayName,
LIBMTP_PROPERTY_BodyText,
LIBMTP_PROPERTY_Subject,
LIBMTP_PROPERTY_Priority,
LIBMTP_PROPERTY_GivenName,
LIBMTP_PROPERTY_MiddleNames,
LIBMTP_PROPERTY_FamilyName,
LIBMTP_PROPERTY_Prefix,
LIBMTP_PROPERTY_Suffix,
LIBMTP_PROPERTY_PhoneticGivenName,
LIBMTP_PROPERTY_PhoneticFamilyName,
LIBMTP_PROPERTY_EmailPrimary,
LIBMTP_PROPERTY_EmailPersonal1,
LIBMTP_PROPERTY_EmailPersonal2,
LIBMTP_PROPERTY_EmailBusiness1,
LIBMTP_PROPERTY_EmailBusiness2,
LIBMTP_PROPERTY_EmailOthers,
LIBMTP_PROPERTY_PhoneNumberPrimary,
LIBMTP_PROPERTY_PhoneNumberPersonal,
LIBMTP_PROPERTY_PhoneNumberPersonal2,
LIBMTP_PROPERTY_PhoneNumberBusiness,
LIBMTP_PROPERTY_PhoneNumberBusiness2,
LIBMTP_PROPERTY_PhoneNumberMobile,
LIBMTP_PROPERTY_PhoneNumberMobile2,
LIBMTP_PROPERTY_FaxNumberPrimary,
LIBMTP_PROPERTY_FaxNumberPersonal,
LIBMTP_PROPERTY_FaxNumberBusiness,
LIBMTP_PROPERTY_PagerNumber,
LIBMTP_PROPERTY_PhoneNumberOthers,
LIBMTP_PROPERTY_PrimaryWebAddress,
LIBMTP_PROPERTY_PersonalWebAddress,
LIBMTP_PROPERTY_BusinessWebAddress,
LIBMTP_PROPERTY_InstantMessengerAddress,
LIBMTP_PROPERTY_InstantMessengerAddress2,
LIBMTP_PROPERTY_InstantMessengerAddress3,
LIBMTP_PROPERTY_PostalAddressPersonalFull,
LIBMTP_PROPERTY_PostalAddressPersonalFullLine1,
LIBMTP_PROPERTY_PostalAddressPersonalFullLine2,
LIBMTP_PROPERTY_PostalAddressPersonalFullCity,
LIBMTP_PROPERTY_PostalAddressPersonalFullRegion,
LIBMTP_PROPERTY_PostalAddressPersonalFullPostalCode,
LIBMTP_PROPERTY_PostalAddressPersonalFullCountry,
LIBMTP_PROPERTY_PostalAddressBusinessFull,
LIBMTP_PROPERTY_PostalAddressBusinessLine1,
LIBMTP_PROPERTY_PostalAddressBusinessLine2,
LIBMTP_PROPERTY_PostalAddressBusinessCity,
LIBMTP_PROPERTY_PostalAddressBusinessRegion,
LIBMTP_PROPERTY_PostalAddressBusinessPostalCode,
LIBMTP_PROPERTY_PostalAddressBusinessCountry,
LIBMTP_PROPERTY_PostalAddressOtherFull,
LIBMTP_PROPERTY_PostalAddressOtherLine1,
LIBMTP_PROPERTY_PostalAddressOtherLine2,
LIBMTP_PROPERTY_PostalAddressOtherCity,
LIBMTP_PROPERTY_PostalAddressOtherRegion,
LIBMTP_PROPERTY_PostalAddressOtherPostalCode,
LIBMTP_PROPERTY_PostalAddressOtherCountry,
LIBMTP_PROPERTY_OrganizationName,
LIBMTP_PROPERTY_PhoneticOrganizationName,
LIBMTP_PROPERTY_Role,
LIBMTP_PROPERTY_Birthdate,
LIBMTP_PROPERTY_MessageTo,
LIBMTP_PROPERTY_MessageCC,
LIBMTP_PROPERTY_MessageBCC,
LIBMTP_PROPERTY_MessageRead,
LIBMTP_PROPERTY_MessageReceivedTime,
LIBMTP_PROPERTY_MessageSender,
LIBMTP_PROPERTY_ActivityBeginTime,
LIBMTP_PROPERTY_ActivityEndTime,
LIBMTP_PROPERTY_ActivityLocation,
LIBMTP_PROPERTY_ActivityRequiredAttendees,
LIBMTP_PROPERTY_ActivityOptionalAttendees,
LIBMTP_PROPERTY_ActivityResources,
LIBMTP_PROPERTY_ActivityAccepted,
LIBMTP_PROPERTY_Owner,
LIBMTP_PROPERTY_Editor,
LIBMTP_PROPERTY_Webmaster,
LIBMTP_PROPERTY_URLSource,
LIBMTP_PROPERTY_URLDestination,
LIBMTP_PROPERTY_TimeBookmark,
LIBMTP_PROPERTY_ObjectBookmark,
LIBMTP_PROPERTY_ByteBookmark,
LIBMTP_PROPERTY_LastBuildDate,
LIBMTP_PROPERTY_TimetoLive,
LIBMTP_PROPERTY_MediaGUID,
LIBMTP_PROPERTY_TotalBitRate,
LIBMTP_PROPERTY_BitRateType,
LIBMTP_PROPERTY_SampleRate,
LIBMTP_PROPERTY_NumberOfChannels,
LIBMTP_PROPERTY_AudioBitDepth,
LIBMTP_PROPERTY_ScanDepth,
LIBMTP_PROPERTY_AudioWAVECodec,
LIBMTP_PROPERTY_AudioBitRate,
LIBMTP_PROPERTY_VideoFourCCCodec,
LIBMTP_PROPERTY_VideoBitRate,
LIBMTP_PROPERTY_FramesPerThousandSeconds,
LIBMTP_PROPERTY_KeyFrameDistance,
LIBMTP_PROPERTY_BufferSize,
LIBMTP_PROPERTY_EncodingQuality,
LIBMTP_PROPERTY_EncodingProfile,
LIBMTP_PROPERTY_BuyFlag,
LIBMTP_PROPERTY_UNKNOWN
} LIBMTP_property_t;
typedef enum {
LIBMTP_DATATYPE_INT8,
LIBMTP_DATATYPE_UINT8,
LIBMTP_DATATYPE_INT16,
LIBMTP_DATATYPE_UINT16,
LIBMTP_DATATYPE_INT32,
LIBMTP_DATATYPE_UINT32,
LIBMTP_DATATYPE_INT64,
LIBMTP_DATATYPE_UINT64,
} LIBMTP_datatype_t;
typedef enum {
LIBMTP_DEVICECAP_GetPartialObject,
LIBMTP_DEVICECAP_SendPartialObject,
LIBMTP_DEVICECAP_EditObjects,
LIBMTP_DEVICECAP_MoveObject,
LIBMTP_DEVICECAP_CopyObject,
} LIBMTP_devicecap_t;
typedef enum {
LIBMTP_ERROR_NONE,
LIBMTP_ERROR_GENERAL,
LIBMTP_ERROR_PTP_LAYER,
LIBMTP_ERROR_USB_LAYER,
LIBMTP_ERROR_MEMORY_ALLOCATION,
LIBMTP_ERROR_NO_DEVICE_ATTACHED,
LIBMTP_ERROR_STORAGE_FULL,
LIBMTP_ERROR_CONNECTING,
LIBMTP_ERROR_CANCELLED
} LIBMTP_error_number_t;
typedef struct LIBMTP_device_entry_struct LIBMTP_device_entry_t;
typedef struct LIBMTP_raw_device_struct LIBMTP_raw_device_t;
typedef struct LIBMTP_error_struct LIBMTP_error_t;
typedef struct LIBMTP_allowed_values_struct LIBMTP_allowed_values_t;
typedef struct LIBMTP_device_extension_struct LIBMTP_device_extension_t;
typedef struct LIBMTP_mtpdevice_struct LIBMTP_mtpdevice_t;
typedef struct LIBMTP_file_struct LIBMTP_file_t;
typedef struct LIBMTP_track_struct LIBMTP_track_t;
typedef struct LIBMTP_playlist_struct LIBMTP_playlist_t;
typedef struct LIBMTP_album_struct LIBMTP_album_t;
typedef struct LIBMTP_folder_struct LIBMTP_folder_t;
typedef struct LIBMTP_filesampledata_struct LIBMTP_filesampledata_t;
typedef struct LIBMTP_devicestorage_struct LIBMTP_devicestorage_t;
typedef int (* LIBMTP_progressfunc_t) (uint64_t const sent, uint64_t const total,
void const * const data);
typedef uint16_t (* MTPDataGetFunc) (void* params, void* priv,
uint32_t wantlen, unsigned char *data, uint32_t *gotlen);
typedef uint16_t (* MTPDataPutFunc) (void* params, void* priv,
uint32_t sendlen, unsigned char *data, uint32_t *putlen);
#define LIBMTP_HANDLER_RETURN_OK 0
#define LIBMTP_HANDLER_RETURN_ERROR 1
#define LIBMTP_HANDLER_RETURN_CANCEL 2
struct LIBMTP_device_entry_struct {
char *vendor;
uint16_t vendor_id;
char *product;
uint16_t product_id;
uint32_t device_flags;
};
struct LIBMTP_raw_device_struct {
LIBMTP_device_entry_t device_entry;
uint32_t bus_location;
uint8_t devnum;
};
struct LIBMTP_error_struct {
LIBMTP_error_number_t errornumber;
char *error_text;
LIBMTP_error_t *next;
};
struct LIBMTP_allowed_values_struct {
uint8_t u8max;
uint8_t u8min;
uint8_t u8step;
uint8_t* u8vals;
int8_t i8max;
int8_t i8min;
int8_t i8step;
int8_t* i8vals;
uint16_t u16max;
uint16_t u16min;
uint16_t u16step;
uint16_t* u16vals;
int16_t i16max;
int16_t i16min;
int16_t i16step;
int16_t* i16vals;
uint32_t u32max;
uint32_t u32min;
uint32_t u32step;
uint32_t* u32vals;
int32_t i32max;
int32_t i32min;
int32_t i32step;
int32_t* i32vals;
uint64_t u64max;
uint64_t u64min;
uint64_t u64step;
uint64_t* u64vals;
int64_t i64max;
int64_t i64min;
int64_t i64step;
int64_t* i64vals;
uint16_t num_entries;
LIBMTP_datatype_t datatype;
int is_range;
};
struct LIBMTP_device_extension_struct {
char *name;
int major;
int minor;
LIBMTP_device_extension_t *next;
};
struct LIBMTP_mtpdevice_struct {
uint8_t object_bitsize;
void *params;
void *usbinfo;
LIBMTP_devicestorage_t *storage;
LIBMTP_error_t *errorstack;
uint8_t maximum_battery_level;
uint32_t default_music_folder;
uint32_t default_playlist_folder;
uint32_t default_picture_folder;
uint32_t default_video_folder;
uint32_t default_organizer_folder;
uint32_t default_zencast_folder;
uint32_t default_album_folder;
uint32_t default_text_folder;
void *cd;
LIBMTP_device_extension_t *extensions;
int cached;
LIBMTP_mtpdevice_t *next;
};
struct LIBMTP_file_struct {
uint32_t item_id;
uint32_t parent_id;
uint32_t storage_id;
char *filename;
uint64_t filesize;
time_t modificationdate;
LIBMTP_filetype_t filetype;
LIBMTP_file_t *next;
};
struct LIBMTP_track_struct {
uint32_t item_id;
uint32_t parent_id;
uint32_t storage_id;
char *title;
char *artist;
char *composer;
char *genre;
char *album;
char *date;
char *filename;
uint16_t tracknumber;
uint32_t duration;
uint32_t samplerate;
uint16_t nochannels;
uint32_t wavecodec;
uint32_t bitrate;
uint16_t bitratetype;
uint16_t rating;
uint32_t usecount;
uint64_t filesize;
time_t modificationdate;
LIBMTP_filetype_t filetype;
LIBMTP_track_t *next;
};
struct LIBMTP_playlist_struct {
uint32_t playlist_id;
uint32_t parent_id;
uint32_t storage_id;
char *name;
uint32_t *tracks;
uint32_t no_tracks;
LIBMTP_playlist_t *next;
};
struct LIBMTP_album_struct {
uint32_t album_id;
uint32_t parent_id;
uint32_t storage_id;
char *name;
char *artist;
char *composer;
char *genre;
uint32_t *tracks;
uint32_t no_tracks;
LIBMTP_album_t *next;
};
struct LIBMTP_folder_struct {
uint32_t folder_id;
uint32_t parent_id;
uint32_t storage_id;
char *name;
LIBMTP_folder_t *sibling;
LIBMTP_folder_t *child;
};
struct LIBMTP_filesampledata_struct {
uint32_t width;
uint32_t height;
uint32_t duration;
LIBMTP_filetype_t filetype;
uint64_t size;
char *data;
};
struct LIBMTP_devicestorage_struct {
uint32_t id;
uint16_t StorageType;
uint16_t FilesystemType;
uint16_t AccessCapability;
uint64_t MaxCapacity;
uint64_t FreeSpaceInBytes;
uint64_t FreeSpaceInObjects;
char *StorageDescription;
char *VolumeIdentifier;
LIBMTP_devicestorage_t *next;
LIBMTP_devicestorage_t *prev;
};
enum LIBMTP_event_enum {
LIBMTP_EVENT_NONE,
LIBMTP_EVENT_STORE_ADDED,
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;
/* Make functions available for C++ */
#ifdef __cplusplus
extern "C" {
#endif
extern int LIBMTP_debug;
void LIBMTP_Set_Debug(int);
void LIBMTP_Init(void);
int LIBMTP_Get_Supported_Devices_List(LIBMTP_device_entry_t ** const, int * const);
LIBMTP_error_number_t LIBMTP_Detect_Raw_Devices(LIBMTP_raw_device_t **, int *);
int LIBMTP_Check_Specific_Device(int busno, int devno);
LIBMTP_mtpdevice_t *LIBMTP_Open_Raw_Device(LIBMTP_raw_device_t *);
LIBMTP_mtpdevice_t *LIBMTP_Open_Raw_Device_Uncached(LIBMTP_raw_device_t *);
/* Begin old, legacy interface */
LIBMTP_mtpdevice_t *LIBMTP_Get_Device(int);
LIBMTP_mtpdevice_t *LIBMTP_Get_First_Device(void);
LIBMTP_mtpdevice_t *LIBMTP_Get_Device_By_SerialNumber(char *);
LIBMTP_mtpdevice_t *LIBMTP_Get_Device_By_ID(char *);
LIBMTP_error_number_t LIBMTP_Get_Connected_Devices(LIBMTP_mtpdevice_t **);
uint32_t LIBMTP_Number_Devices_In_List(LIBMTP_mtpdevice_t *);
void LIBMTP_Release_Device_List(LIBMTP_mtpdevice_t*);
/* End old, legacy interface */
void LIBMTP_Release_Device(LIBMTP_mtpdevice_t*);
void LIBMTP_Dump_Device_Info(LIBMTP_mtpdevice_t*);
int LIBMTP_Reset_Device(LIBMTP_mtpdevice_t*);
char *LIBMTP_Get_Manufacturername(LIBMTP_mtpdevice_t*);
char *LIBMTP_Get_Modelname(LIBMTP_mtpdevice_t*);
char *LIBMTP_Get_Serialnumber(LIBMTP_mtpdevice_t*);
char *LIBMTP_Get_Deviceversion(LIBMTP_mtpdevice_t*);
char *LIBMTP_Get_Friendlyname(LIBMTP_mtpdevice_t*);
int LIBMTP_Set_Friendlyname(LIBMTP_mtpdevice_t*, char const * const);
char *LIBMTP_Get_Syncpartner(LIBMTP_mtpdevice_t*);
int LIBMTP_Set_Syncpartner(LIBMTP_mtpdevice_t*, char const * const);
int LIBMTP_Get_Batterylevel(LIBMTP_mtpdevice_t *,
uint8_t * const,
uint8_t * const);
int LIBMTP_Get_Secure_Time(LIBMTP_mtpdevice_t *, char ** const);
int LIBMTP_Get_Device_Certificate(LIBMTP_mtpdevice_t *, char ** const);
int LIBMTP_Get_Supported_Filetypes(LIBMTP_mtpdevice_t *, uint16_t ** const, uint16_t * const);
int LIBMTP_Check_Capability(LIBMTP_mtpdevice_t *, LIBMTP_devicecap_t);
LIBMTP_error_t *LIBMTP_Get_Errorstack(LIBMTP_mtpdevice_t*);
void LIBMTP_Clear_Errorstack(LIBMTP_mtpdevice_t*);
void LIBMTP_Dump_Errorstack(LIBMTP_mtpdevice_t*);
void LIBMTP_FreeMemory(void *);
#define LIBMTP_STORAGE_SORTBY_NOTSORTED 0
#define LIBMTP_STORAGE_SORTBY_FREESPACE 1
#define LIBMTP_STORAGE_SORTBY_MAXSPACE 2
int LIBMTP_Get_Storage(LIBMTP_mtpdevice_t *, int const);
int LIBMTP_Format_Storage(LIBMTP_mtpdevice_t *, LIBMTP_devicestorage_t *);
char *LIBMTP_Get_String_From_Object(LIBMTP_mtpdevice_t *, uint32_t const, LIBMTP_property_t const);
uint64_t LIBMTP_Get_u64_From_Object(LIBMTP_mtpdevice_t *, uint32_t const,
LIBMTP_property_t const, uint64_t const);
uint32_t LIBMTP_Get_u32_From_Object(LIBMTP_mtpdevice_t *, uint32_t const,
LIBMTP_property_t const, uint32_t const);
uint16_t LIBMTP_Get_u16_From_Object(LIBMTP_mtpdevice_t *, uint32_t const,
LIBMTP_property_t const, uint16_t const);
uint8_t LIBMTP_Get_u8_From_Object(LIBMTP_mtpdevice_t *, uint32_t const,
LIBMTP_property_t const, uint8_t const);
int LIBMTP_Set_Object_String(LIBMTP_mtpdevice_t *, uint32_t const,
LIBMTP_property_t const, char const * const);
int LIBMTP_Set_Object_u32(LIBMTP_mtpdevice_t *, uint32_t const,
LIBMTP_property_t const, uint32_t const);
int LIBMTP_Set_Object_u16(LIBMTP_mtpdevice_t *, uint32_t const,
LIBMTP_property_t const, uint16_t const);
int LIBMTP_Set_Object_u8(LIBMTP_mtpdevice_t *, uint32_t const,
LIBMTP_property_t const, uint8_t const);
char const * LIBMTP_Get_Property_Description(LIBMTP_property_t inproperty);
int LIBMTP_Is_Property_Supported(LIBMTP_mtpdevice_t*, LIBMTP_property_t const,
LIBMTP_filetype_t const);
int LIBMTP_Get_Allowed_Property_Values(LIBMTP_mtpdevice_t*, LIBMTP_property_t const,
LIBMTP_filetype_t const, LIBMTP_allowed_values_t*);
void LIBMTP_destroy_allowed_values_t(LIBMTP_allowed_values_t*);
LIBMTP_file_t *LIBMTP_new_file_t(void);
void LIBMTP_destroy_file_t(LIBMTP_file_t*);
char const * LIBMTP_Get_Filetype_Description(LIBMTP_filetype_t);
LIBMTP_file_t *LIBMTP_Get_Filelisting(LIBMTP_mtpdevice_t *);
LIBMTP_file_t *LIBMTP_Get_Filelisting_With_Callback(LIBMTP_mtpdevice_t *,
LIBMTP_progressfunc_t const, void const * const);
#define LIBMTP_FILES_AND_FOLDERS_ROOT 0xffffffff
LIBMTP_file_t * LIBMTP_Get_Files_And_Folders(LIBMTP_mtpdevice_t *,
uint32_t const,
uint32_t const);
int LIBMTP_Get_Children(LIBMTP_mtpdevice_t *,
uint32_t const,
uint32_t const,
uint32_t **);
LIBMTP_file_t *LIBMTP_Get_Filemetadata(LIBMTP_mtpdevice_t *, uint32_t const);
int LIBMTP_Get_File_To_File(LIBMTP_mtpdevice_t*, uint32_t, char const * const,
LIBMTP_progressfunc_t const, void const * const);
int LIBMTP_Get_File_To_File_Descriptor(LIBMTP_mtpdevice_t*,
uint32_t const,
int const,
LIBMTP_progressfunc_t const,
void const * const);
int LIBMTP_Get_File_To_Handler(LIBMTP_mtpdevice_t *,
uint32_t const,
MTPDataPutFunc,
void *,
LIBMTP_progressfunc_t const,
void const * const);
int LIBMTP_Send_File_From_File(LIBMTP_mtpdevice_t *,
char const * const,
LIBMTP_file_t * const,
LIBMTP_progressfunc_t const,
void const * const);
int LIBMTP_Send_File_From_File_Descriptor(LIBMTP_mtpdevice_t *,
int const,
LIBMTP_file_t * const,
LIBMTP_progressfunc_t const,
void const * const);
int LIBMTP_Send_File_From_Handler(LIBMTP_mtpdevice_t *,
MTPDataGetFunc, void *,
LIBMTP_file_t * const,
LIBMTP_progressfunc_t const,
void const * const);
int LIBMTP_Set_File_Name(LIBMTP_mtpdevice_t *,
LIBMTP_file_t *,
const char *);
LIBMTP_filesampledata_t *LIBMTP_new_filesampledata_t(void);
void LIBMTP_destroy_filesampledata_t(LIBMTP_filesampledata_t *);
int LIBMTP_Get_Representative_Sample_Format(LIBMTP_mtpdevice_t *,
LIBMTP_filetype_t const,
LIBMTP_filesampledata_t **);
int LIBMTP_Send_Representative_Sample(LIBMTP_mtpdevice_t *, uint32_t const,
LIBMTP_filesampledata_t *);
int LIBMTP_Get_Representative_Sample(LIBMTP_mtpdevice_t *, uint32_t const,
LIBMTP_filesampledata_t *);
int LIBMTP_Get_Thumbnail(LIBMTP_mtpdevice_t *, uint32_t const,
unsigned char **data, unsigned int *size);
LIBMTP_track_t *LIBMTP_new_track_t(void);
void LIBMTP_destroy_track_t(LIBMTP_track_t*);
LIBMTP_track_t *LIBMTP_Get_Tracklisting(LIBMTP_mtpdevice_t*);
LIBMTP_track_t *LIBMTP_Get_Tracklisting_With_Callback(LIBMTP_mtpdevice_t*,
LIBMTP_progressfunc_t const, void const * const);
LIBMTP_track_t *LIBMTP_Get_Tracklisting_With_Callback_For_Storage(LIBMTP_mtpdevice_t*, uint32_t const,
LIBMTP_progressfunc_t const, void const * const);
LIBMTP_track_t *LIBMTP_Get_Trackmetadata(LIBMTP_mtpdevice_t*, uint32_t const);
int LIBMTP_Get_Track_To_File(LIBMTP_mtpdevice_t*, uint32_t, char const * const,
LIBMTP_progressfunc_t const, void const * const);
int LIBMTP_Get_Track_To_File_Descriptor(LIBMTP_mtpdevice_t*, uint32_t const, int const,
LIBMTP_progressfunc_t const, void const * const);
int LIBMTP_Get_Track_To_Handler(LIBMTP_mtpdevice_t *, uint32_t const, MTPDataPutFunc,
void *, LIBMTP_progressfunc_t const, void const * const);
int LIBMTP_Send_Track_From_File(LIBMTP_mtpdevice_t *,
char const * const, LIBMTP_track_t * const,
LIBMTP_progressfunc_t const,
void const * const);
int LIBMTP_Send_Track_From_File_Descriptor(LIBMTP_mtpdevice_t *,
int const, LIBMTP_track_t * const,
LIBMTP_progressfunc_t const,
void const * const);
int LIBMTP_Send_Track_From_Handler(LIBMTP_mtpdevice_t *,
MTPDataGetFunc, void *, LIBMTP_track_t * const,
LIBMTP_progressfunc_t const,
void const * const);
int LIBMTP_Update_Track_Metadata(LIBMTP_mtpdevice_t *,
LIBMTP_track_t const * const);
int LIBMTP_Track_Exists(LIBMTP_mtpdevice_t *, uint32_t const);
int LIBMTP_Set_Track_Name(LIBMTP_mtpdevice_t *, LIBMTP_track_t *, const char *);
LIBMTP_folder_t *LIBMTP_new_folder_t(void);
void LIBMTP_destroy_folder_t(LIBMTP_folder_t*);
LIBMTP_folder_t *LIBMTP_Get_Folder_List(LIBMTP_mtpdevice_t*);
LIBMTP_folder_t *LIBMTP_Get_Folder_List_For_Storage(LIBMTP_mtpdevice_t*,
uint32_t const);
LIBMTP_folder_t *LIBMTP_Find_Folder(LIBMTP_folder_t*, uint32_t const);
uint32_t LIBMTP_Create_Folder(LIBMTP_mtpdevice_t*, char *, uint32_t, uint32_t);
int LIBMTP_Set_Folder_Name(LIBMTP_mtpdevice_t *, LIBMTP_folder_t *, const char *);
LIBMTP_playlist_t *LIBMTP_new_playlist_t(void);
void LIBMTP_destroy_playlist_t(LIBMTP_playlist_t *);
LIBMTP_playlist_t *LIBMTP_Get_Playlist_List(LIBMTP_mtpdevice_t *);
LIBMTP_playlist_t *LIBMTP_Get_Playlist(LIBMTP_mtpdevice_t *, uint32_t const);
int LIBMTP_Create_New_Playlist(LIBMTP_mtpdevice_t *, LIBMTP_playlist_t * const);
int LIBMTP_Update_Playlist(LIBMTP_mtpdevice_t *, LIBMTP_playlist_t * const);
int LIBMTP_Set_Playlist_Name(LIBMTP_mtpdevice_t *, LIBMTP_playlist_t *, const char *);
LIBMTP_album_t *LIBMTP_new_album_t(void);
void LIBMTP_destroy_album_t(LIBMTP_album_t *);
LIBMTP_album_t *LIBMTP_Get_Album_List(LIBMTP_mtpdevice_t *);
LIBMTP_album_t *LIBMTP_Get_Album_List_For_Storage(LIBMTP_mtpdevice_t *, uint32_t const);
LIBMTP_album_t *LIBMTP_Get_Album(LIBMTP_mtpdevice_t *, uint32_t const);
int LIBMTP_Create_New_Album(LIBMTP_mtpdevice_t *, LIBMTP_album_t * const);
int LIBMTP_Update_Album(LIBMTP_mtpdevice_t *, LIBMTP_album_t const * const);
int LIBMTP_Set_Album_Name(LIBMTP_mtpdevice_t *, LIBMTP_album_t *, const char *);
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,
unsigned char **, unsigned int *);
int LIBMTP_SendPartialObject(LIBMTP_mtpdevice_t *, uint32_t const,
uint64_t, unsigned char *, unsigned int);
int LIBMTP_BeginEditObject(LIBMTP_mtpdevice_t *, uint32_t const);
int LIBMTP_EndEditObject(LIBMTP_mtpdevice_t *, uint32_t const);
int LIBMTP_TruncateObject(LIBMTP_mtpdevice_t *, uint32_t const, uint64_t);
typedef void(* LIBMTP_event_cb_fn) (int, LIBMTP_event_t, uint32_t, void *);
int LIBMTP_Read_Event(LIBMTP_mtpdevice_t *, LIBMTP_event_t *, uint32_t *);
int LIBMTP_Read_Event_Async(LIBMTP_mtpdevice_t *, LIBMTP_event_cb_fn, void *);
int LIBMTP_Handle_Events_Timeout_Completed(struct timeval *, int *);
int LIBMTP_Custom_Operation(LIBMTP_mtpdevice_t *, uint16_t, int, ...);
/* End of C++ exports */
#ifdef __cplusplus
}
#endif
#endif /* LIBMTP_H_INCLUSION_GUARD */
LIBMTP_Get_Album_List_For_Storage
LIBMTP_album_t * LIBMTP_Get_Album_List_For_Storage(LIBMTP_mtpdevice_t *, uint32_t const)
Definition libmtp.c:8692
LIBMTP_Create_New_Album
int LIBMTP_Create_New_Album(LIBMTP_mtpdevice_t *, LIBMTP_album_t *const)
Definition libmtp.c:8820
LIBMTP_destroy_album_t
void LIBMTP_destroy_album_t(LIBMTP_album_t *)
Definition libmtp.c:8537
LIBMTP_Update_Album
int LIBMTP_Update_Album(LIBMTP_mtpdevice_t *, LIBMTP_album_t const *const)
Definition libmtp.c:9382
LIBMTP_Get_Album
LIBMTP_album_t * LIBMTP_Get_Album(LIBMTP_mtpdevice_t *, uint32_t const)
Definition libmtp.c:8755
LIBMTP_new_album_t
LIBMTP_album_t * LIBMTP_new_album_t(void)
Definition libmtp.c:8512
LIBMTP_Get_Album_List
LIBMTP_album_t * LIBMTP_Get_Album_List(LIBMTP_mtpdevice_t *)
Definition libmtp.c:8674
LIBMTP_Set_Album_Name
int LIBMTP_Set_Album_Name(LIBMTP_mtpdevice_t *, LIBMTP_album_t *, const char *)
Definition libmtp.c:7254
LIBMTP_Get_u64_From_Object
uint64_t LIBMTP_Get_u64_From_Object(LIBMTP_mtpdevice_t *, uint32_t const, LIBMTP_property_t const, uint64_t const)
Definition libmtp.c:1216
LIBMTP_Get_Secure_Time
int LIBMTP_Get_Secure_Time(LIBMTP_mtpdevice_t *, char **const)
Definition libmtp.c:4042
LIBMTP_FreeMemory
void LIBMTP_FreeMemory(void *)
Definition libmtp.c:9471
LIBMTP_Format_Storage
int LIBMTP_Format_Storage(LIBMTP_mtpdevice_t *, LIBMTP_devicestorage_t *)
Definition libmtp.c:3958
LIBMTP_Get_First_Device
LIBMTP_mtpdevice_t * LIBMTP_Get_First_Device(void)
Definition libmtp.c:1719
LIBMTP_Number_Devices_In_List
uint32_t LIBMTP_Number_Devices_In_List(LIBMTP_mtpdevice_t *)
Definition libmtp.c:2443
LIBMTP_Set_Object_u32
int LIBMTP_Set_Object_u32(LIBMTP_mtpdevice_t *, uint32_t const, LIBMTP_property_t const, uint32_t const)
Definition libmtp.c:1292
LIBMTP_Get_u8_From_Object
uint8_t LIBMTP_Get_u8_From_Object(LIBMTP_mtpdevice_t *, uint32_t const, LIBMTP_property_t const, uint8_t const)
Definition libmtp.c:1261
LIBMTP_Open_Raw_Device_Uncached
LIBMTP_mtpdevice_t * LIBMTP_Open_Raw_Device_Uncached(LIBMTP_raw_device_t *)
Definition libmtp.c:1921
LIBMTP_Get_Errorstack
LIBMTP_error_t * LIBMTP_Get_Errorstack(LIBMTP_mtpdevice_t *)
Definition libmtp.c:2617
LIBMTP_Release_Device
void LIBMTP_Release_Device(LIBMTP_mtpdevice_t *)
Definition libmtp.c:2513
LIBMTP_Get_Deviceversion
char * LIBMTP_Get_Deviceversion(LIBMTP_mtpdevice_t *)
Definition libmtp.c:3724
LIBMTP_Get_Manufacturername
char * LIBMTP_Get_Manufacturername(LIBMTP_mtpdevice_t *)
Definition libmtp.c:3668
LIBMTP_Dump_Errorstack
void LIBMTP_Dump_Errorstack(LIBMTP_mtpdevice_t *)
Definition libmtp.c:2660
LIBMTP_Clear_Errorstack
void LIBMTP_Clear_Errorstack(LIBMTP_mtpdevice_t *)
Definition libmtp.c:2633
LIBMTP_Release_Device_List
void LIBMTP_Release_Device_List(LIBMTP_mtpdevice_t *)
Definition libmtp.c:2496
LIBMTP_Get_Device_Certificate
int LIBMTP_Get_Device_Certificate(LIBMTP_mtpdevice_t *, char **const)
Definition libmtp.c:4056
LIBMTP_Get_Friendlyname
char * LIBMTP_Get_Friendlyname(LIBMTP_mtpdevice_t *)
Definition libmtp.c:3746
LIBMTP_Get_Storage
int LIBMTP_Get_Storage(LIBMTP_mtpdevice_t *, int const)
Definition libmtp.c:4194
LIBMTP_Get_Supported_Filetypes
int LIBMTP_Get_Supported_Filetypes(LIBMTP_mtpdevice_t *, uint16_t **const, uint16_t *const)
Definition libmtp.c:4077
LIBMTP_Get_Property_Description
char const * LIBMTP_Get_Property_Description(LIBMTP_property_t inproperty)
Definition libmtp.c:830
LIBMTP_Reset_Device
int LIBMTP_Reset_Device(LIBMTP_mtpdevice_t *)
Definition libmtp.c:3642
LIBMTP_destroy_allowed_values_t
void LIBMTP_destroy_allowed_values_t(LIBMTP_allowed_values_t *)
Definition libmtp.c:1111
LIBMTP_Get_Modelname
char * LIBMTP_Get_Modelname(LIBMTP_mtpdevice_t *)
Definition libmtp.c:3687
LIBMTP_Get_Device_By_SerialNumber
LIBMTP_mtpdevice_t * LIBMTP_Get_Device_By_SerialNumber(char *)
Definition libmtp.c:1729
LIBMTP_Get_Device
LIBMTP_mtpdevice_t * LIBMTP_Get_Device(int)
Definition libmtp.c:1687
LIBMTP_Get_u32_From_Object
uint32_t LIBMTP_Get_u32_From_Object(LIBMTP_mtpdevice_t *, uint32_t const, LIBMTP_property_t const, uint32_t const)
Definition libmtp.c:1231
LIBMTP_Set_Object_u16
int LIBMTP_Set_Object_u16(LIBMTP_mtpdevice_t *, uint32_t const, LIBMTP_property_t const, uint16_t const)
Definition libmtp.c:1307
LIBMTP_Get_Allowed_Property_Values
int LIBMTP_Get_Allowed_Property_Values(LIBMTP_mtpdevice_t *, LIBMTP_property_t const, LIBMTP_filetype_t const, LIBMTP_allowed_values_t *)
Definition libmtp.c:963
LIBMTP_Set_Syncpartner
int LIBMTP_Set_Syncpartner(LIBMTP_mtpdevice_t *, char const *const)
Definition libmtp.c:3847
LIBMTP_Get_String_From_Object
char * LIBMTP_Get_String_From_Object(LIBMTP_mtpdevice_t *, uint32_t const, LIBMTP_property_t const)
Definition libmtp.c:1201
LIBMTP_Get_u16_From_Object
uint16_t LIBMTP_Get_u16_From_Object(LIBMTP_mtpdevice_t *, uint32_t const, LIBMTP_property_t const, uint16_t const)
Definition libmtp.c:1246
LIBMTP_Check_Specific_Device
int LIBMTP_Check_Specific_Device(int busno, int devno)
Definition libopenusb1-glue.c:556
LIBMTP_Get_Serialnumber
char * LIBMTP_Get_Serialnumber(LIBMTP_mtpdevice_t *)
Definition libmtp.c:3705
LIBMTP_Set_Object_u8
int LIBMTP_Set_Object_u8(LIBMTP_mtpdevice_t *, uint32_t const, LIBMTP_property_t const, uint8_t const)
Definition libmtp.c:1322
LIBMTP_Get_Syncpartner
char * LIBMTP_Get_Syncpartner(LIBMTP_mtpdevice_t *)
Definition libmtp.c:3809
LIBMTP_Get_Device_By_ID
LIBMTP_mtpdevice_t * LIBMTP_Get_Device_By_ID(char *)
Definition libmtp.c:1778
LIBMTP_Check_Capability
int LIBMTP_Check_Capability(LIBMTP_mtpdevice_t *, LIBMTP_devicecap_t)
Definition libmtp.c:4133
LIBMTP_Is_Property_Supported
int LIBMTP_Is_Property_Supported(LIBMTP_mtpdevice_t *, LIBMTP_property_t const, LIBMTP_filetype_t const)
Definition libmtp.c:1160
LIBMTP_Detect_Raw_Devices
LIBMTP_error_number_t LIBMTP_Detect_Raw_Devices(LIBMTP_raw_device_t **, int *)
Definition libopenusb1-glue.c:592
LIBMTP_Get_Batterylevel
int LIBMTP_Get_Batterylevel(LIBMTP_mtpdevice_t *, uint8_t *const, uint8_t *const)
Definition libmtp.c:3916
LIBMTP_Dump_Device_Info
void LIBMTP_Dump_Device_Info(LIBMTP_mtpdevice_t *)
Definition libmtp.c:3243
LIBMTP_Set_Object_String
int LIBMTP_Set_Object_String(LIBMTP_mtpdevice_t *, uint32_t const, LIBMTP_property_t const, char const *const)
Definition libmtp.c:1276
LIBMTP_Set_Friendlyname
int LIBMTP_Set_Friendlyname(LIBMTP_mtpdevice_t *, char const *const)
Definition libmtp.c:3779
LIBMTP_Get_Connected_Devices
LIBMTP_error_number_t LIBMTP_Get_Connected_Devices(LIBMTP_mtpdevice_t **)
Definition libmtp.c:2461
LIBMTP_Custom_Operation
int LIBMTP_Custom_Operation(LIBMTP_mtpdevice_t *, uint16_t, int,...)
Definition libmtp.c:9442
LIBMTP_Get_File_To_Handler
int LIBMTP_Get_File_To_Handler(LIBMTP_mtpdevice_t *, uint32_t const, MTPDataPutFunc, void *, LIBMTP_progressfunc_t const, void const *const)
Definition libmtp.c:5468
LIBMTP_Get_Filemetadata
LIBMTP_file_t * LIBMTP_Get_Filemetadata(LIBMTP_mtpdevice_t *, uint32_t const)
Definition libmtp.c:4457
LIBMTP_Get_Representative_Sample
int LIBMTP_Get_Representative_Sample(LIBMTP_mtpdevice_t *, uint32_t const, LIBMTP_filesampledata_t *)
Definition libmtp.c:9139
LIBMTP_destroy_file_t
void LIBMTP_destroy_file_t(LIBMTP_file_t *)
Definition libmtp.c:4324
LIBMTP_Get_Filelisting_With_Callback
LIBMTP_file_t * LIBMTP_Get_Filelisting_With_Callback(LIBMTP_mtpdevice_t *, LIBMTP_progressfunc_t const, void const *const)
Definition libmtp.c:4529
LIBMTP_Set_File_Name
int LIBMTP_Set_File_Name(LIBMTP_mtpdevice_t *, LIBMTP_file_t *, const char *)
Definition libmtp.c:7120
LIBMTP_Send_File_From_File_Descriptor
int LIBMTP_Send_File_From_File_Descriptor(LIBMTP_mtpdevice_t *, int const, LIBMTP_file_t *const, LIBMTP_progressfunc_t const, void const *const)
Definition libmtp.c:6059
LIBMTP_Get_Files_And_Folders
LIBMTP_file_t * LIBMTP_Get_Files_And_Folders(LIBMTP_mtpdevice_t *, uint32_t const, uint32_t const)
Definition libmtp.c:4594
LIBMTP_Get_Filelisting
LIBMTP_file_t * LIBMTP_Get_Filelisting(LIBMTP_mtpdevice_t *)
Definition libmtp.c:4481
LIBMTP_Read_Event
int LIBMTP_Read_Event(LIBMTP_mtpdevice_t *, LIBMTP_event_t *, uint32_t *)
Definition libmtp.c:2248
LIBMTP_Get_File_To_File_Descriptor
int LIBMTP_Get_File_To_File_Descriptor(LIBMTP_mtpdevice_t *, uint32_t const, int const, LIBMTP_progressfunc_t const, void const *const)
Definition libmtp.c:5401
LIBMTP_Send_File_From_File
int LIBMTP_Send_File_From_File(LIBMTP_mtpdevice_t *, char const *const, LIBMTP_file_t *const, LIBMTP_progressfunc_t const, void const *const)
Definition libmtp.c:5981
LIBMTP_Get_Thumbnail
int LIBMTP_Get_Thumbnail(LIBMTP_mtpdevice_t *, uint32_t const, unsigned char **data, unsigned int *size)
Definition libmtp.c:9211
LIBMTP_new_file_t
LIBMTP_file_t * LIBMTP_new_file_t(void)
Definition libmtp.c:4300
LIBMTP_Get_File_To_File
int LIBMTP_Get_File_To_File(LIBMTP_mtpdevice_t *, uint32_t, char const *const, LIBMTP_progressfunc_t const, void const *const)
Definition libmtp.c:5341
LIBMTP_Get_Children
int LIBMTP_Get_Children(LIBMTP_mtpdevice_t *, uint32_t const, uint32_t const, uint32_t **)
Definition libmtp.c:4678
LIBMTP_Get_Filetype_Description
char const * LIBMTP_Get_Filetype_Description(LIBMTP_filetype_t)
Definition libmtp.c:807
LIBMTP_new_filesampledata_t
LIBMTP_filesampledata_t * LIBMTP_new_filesampledata_t(void)
Definition libmtp.c:8859
LIBMTP_Send_File_From_Handler
int LIBMTP_Send_File_From_Handler(LIBMTP_mtpdevice_t *, MTPDataGetFunc, void *, LIBMTP_file_t *const, LIBMTP_progressfunc_t const, void const *const)
Definition libmtp.c:6176
LIBMTP_Send_Representative_Sample
int LIBMTP_Send_Representative_Sample(LIBMTP_mtpdevice_t *, uint32_t const, LIBMTP_filesampledata_t *)
Definition libmtp.c:9044
LIBMTP_Read_Event_Async
int LIBMTP_Read_Event_Async(LIBMTP_mtpdevice_t *, LIBMTP_event_cb_fn, void *)
Definition libmtp.c:2393
LIBMTP_Get_Representative_Sample_Format
int LIBMTP_Get_Representative_Sample_Format(LIBMTP_mtpdevice_t *, LIBMTP_filetype_t const, LIBMTP_filesampledata_t **)
Definition libmtp.c:8911
LIBMTP_destroy_filesampledata_t
void LIBMTP_destroy_filesampledata_t(LIBMTP_filesampledata_t *)
Definition libmtp.c:8877
LIBMTP_Handle_Events_Timeout_Completed
int LIBMTP_Handle_Events_Timeout_Completed(struct timeval *, int *)
Definition libopenusb1-glue.c:1713
LIBMTP_Set_Folder_Name
int LIBMTP_Set_Folder_Name(LIBMTP_mtpdevice_t *, LIBMTP_folder_t *, const char *)
Definition libmtp.c:7150
LIBMTP_new_folder_t
LIBMTP_folder_t * LIBMTP_new_folder_t(void)
Definition libmtp.c:7332
LIBMTP_Find_Folder
LIBMTP_folder_t * LIBMTP_Find_Folder(LIBMTP_folder_t *, uint32_t const)
Definition libmtp.c:7386
LIBMTP_Get_Folder_List_For_Storage
LIBMTP_folder_t * LIBMTP_Get_Folder_List_For_Storage(LIBMTP_mtpdevice_t *, uint32_t const)
Definition libmtp.c:7455
LIBMTP_Create_Folder
uint32_t LIBMTP_Create_Folder(LIBMTP_mtpdevice_t *, char *, uint32_t, uint32_t)
Definition libmtp.c:7585
LIBMTP_Get_Folder_List
LIBMTP_folder_t * LIBMTP_Get_Folder_List(LIBMTP_mtpdevice_t *)
Definition libmtp.c:7561
LIBMTP_destroy_folder_t
void LIBMTP_destroy_folder_t(LIBMTP_folder_t *)
Definition libmtp.c:7355
LIBMTP_Get_Supported_Devices_List
int LIBMTP_Get_Supported_Devices_List(LIBMTP_device_entry_t **const, int *const)
Definition libopenusb1-glue.c:131
LIBMTP_Init
void LIBMTP_Init(void)
Definition libmtp.c:774
LIBMTP_Set_Debug
void LIBMTP_Set_Debug(int)
Definition libmtp.c:756
LIBMTP_Move_Object
int LIBMTP_Move_Object(LIBMTP_mtpdevice_t *, uint32_t, uint32_t, uint32_t)
Definition libmtp.c:6973
LIBMTP_Set_Object_Filename
int LIBMTP_Set_Object_Filename(LIBMTP_mtpdevice_t *, uint32_t, char *)
Definition libmtp.c:7282
LIBMTP_Copy_Object
int LIBMTP_Copy_Object(LIBMTP_mtpdevice_t *, uint32_t, uint32_t, uint32_t)
Definition libmtp.c:7009
LIBMTP_Delete_Object
int LIBMTP_Delete_Object(LIBMTP_mtpdevice_t *, uint32_t)
Definition libmtp.c:6938
LIBMTP_Update_Playlist
int LIBMTP_Update_Playlist(LIBMTP_mtpdevice_t *, LIBMTP_playlist_t *const)
Definition libmtp.c:8481
LIBMTP_Set_Playlist_Name
int LIBMTP_Set_Playlist_Name(LIBMTP_mtpdevice_t *, LIBMTP_playlist_t *, const char *)
Definition libmtp.c:7217
LIBMTP_new_playlist_t
LIBMTP_playlist_t * LIBMTP_new_playlist_t(void)
Definition libmtp.c:7668
LIBMTP_Create_New_Playlist
int LIBMTP_Create_New_Playlist(LIBMTP_mtpdevice_t *, LIBMTP_playlist_t *const)
Definition libmtp.c:8429
LIBMTP_destroy_playlist_t
void LIBMTP_destroy_playlist_t(LIBMTP_playlist_t *)
Definition libmtp.c:7691
LIBMTP_Get_Playlist
LIBMTP_playlist_t * LIBMTP_Get_Playlist(LIBMTP_mtpdevice_t *, uint32_t const)
Definition libmtp.c:7794
LIBMTP_Get_Playlist_List
LIBMTP_playlist_t * LIBMTP_Get_Playlist_List(LIBMTP_mtpdevice_t *)
Definition libmtp.c:7716
LIBMTP_event_enum
LIBMTP_event_enum
Definition libmtp.h:808
LIBMTP_Get_Track_To_File_Descriptor
int LIBMTP_Get_Track_To_File_Descriptor(LIBMTP_mtpdevice_t *, uint32_t const, int const, LIBMTP_progressfunc_t const, void const *const)
Definition libmtp.c:5570
LIBMTP_Update_Track_Metadata
int LIBMTP_Update_Track_Metadata(LIBMTP_mtpdevice_t *, LIBMTP_track_t const *const)
Definition libmtp.c:6547
LIBMTP_Get_Trackmetadata
LIBMTP_track_t * LIBMTP_Get_Trackmetadata(LIBMTP_mtpdevice_t *, uint32_t const)
Definition libmtp.c:5197
LIBMTP_Track_Exists
int LIBMTP_Track_Exists(LIBMTP_mtpdevice_t *, uint32_t const)
Definition libmtp.c:7309
LIBMTP_Get_Track_To_Handler
int LIBMTP_Get_Track_To_Handler(LIBMTP_mtpdevice_t *, uint32_t const, MTPDataPutFunc, void *, LIBMTP_progressfunc_t const, void const *const)
Definition libmtp.c:5597
LIBMTP_Get_Track_To_File
int LIBMTP_Get_Track_To_File(LIBMTP_mtpdevice_t *, uint32_t, char const *const, LIBMTP_progressfunc_t const, void const *const)
Definition libmtp.c:5546
LIBMTP_Send_Track_From_File
int LIBMTP_Send_Track_From_File(LIBMTP_mtpdevice_t *, char const *const, LIBMTP_track_t *const, LIBMTP_progressfunc_t const, void const *const)
Definition libmtp.c:5645
LIBMTP_Get_Tracklisting_With_Callback
LIBMTP_track_t * LIBMTP_Get_Tracklisting_With_Callback(LIBMTP_mtpdevice_t *, LIBMTP_progressfunc_t const, void const *const)
Definition libmtp.c:5029
LIBMTP_Get_Tracklisting_With_Callback_For_Storage
LIBMTP_track_t * LIBMTP_Get_Tracklisting_With_Callback_For_Storage(LIBMTP_mtpdevice_t *, uint32_t const, LIBMTP_progressfunc_t const, void const *const)
Definition libmtp.c:5079
LIBMTP_Send_Track_From_File_Descriptor
int LIBMTP_Send_Track_From_File_Descriptor(LIBMTP_mtpdevice_t *, int const, LIBMTP_track_t *const, LIBMTP_progressfunc_t const, void const *const)
Definition libmtp.c:5778
LIBMTP_new_track_t
LIBMTP_track_t * LIBMTP_new_track_t(void)
Definition libmtp.c:4735
LIBMTP_Send_Track_From_Handler
int LIBMTP_Send_Track_From_Handler(LIBMTP_mtpdevice_t *, MTPDataGetFunc, void *, LIBMTP_track_t *const, LIBMTP_progressfunc_t const, void const *const)
Definition libmtp.c:5882
LIBMTP_Get_Tracklisting
LIBMTP_track_t * LIBMTP_Get_Tracklisting(LIBMTP_mtpdevice_t *)
Definition libmtp.c:4981
LIBMTP_Set_Track_Name
int LIBMTP_Set_Track_Name(LIBMTP_mtpdevice_t *, LIBMTP_track_t *, const char *)
Definition libmtp.c:7180
LIBMTP_destroy_track_t
void LIBMTP_destroy_track_t(LIBMTP_track_t *)
Definition libmtp.c:4774
LIBMTP_error_number_t
LIBMTP_error_number_t
Definition libmtp.h:447
LIBMTP_property_t
LIBMTP_property_t
Definition libmtp.h:224
LIBMTP_filetype_t
LIBMTP_filetype_t
Definition libmtp.h:88
LIBMTP_datatype_t
LIBMTP_datatype_t
Definition libmtp.h:398
LIBMTP_devicecap_t
LIBMTP_devicecap_t
Definition libmtp.h:412
LIBMTP_progressfunc_t
int(* LIBMTP_progressfunc_t)(uint64_t const sent, uint64_t const total, void const *const data)
Definition libmtp.h:483
MTPDataGetFunc
uint16_t(* MTPDataGetFunc)(void *params, void *priv, uint32_t wantlen, unsigned char *data, uint32_t *gotlen)
Definition libmtp.h:498
MTPDataPutFunc
uint16_t(* MTPDataPutFunc)(void *params, void *priv, uint32_t sendlen, unsigned char *data, uint32_t *putlen)
Definition libmtp.h:513
LIBMTP_DEVICECAP_GetPartialObject
@ LIBMTP_DEVICECAP_GetPartialObject
Definition libmtp.h:417
LIBMTP_DEVICECAP_EditObjects
@ LIBMTP_DEVICECAP_EditObjects
Definition libmtp.h:430
LIBMTP_DEVICECAP_MoveObject
@ LIBMTP_DEVICECAP_MoveObject
Definition libmtp.h:435
LIBMTP_DEVICECAP_CopyObject
@ LIBMTP_DEVICECAP_CopyObject
Definition libmtp.h:440
LIBMTP_DEVICECAP_SendPartialObject
@ LIBMTP_DEVICECAP_SendPartialObject
Definition libmtp.h:422
LIBMTP_debug
int LIBMTP_debug
Definition libmtp.c:89
LIBMTP_album_struct
Definition libmtp.h:750
LIBMTP_album_struct::next
LIBMTP_album_t * next
Definition libmtp.h:760
LIBMTP_album_struct::parent_id
uint32_t parent_id
Definition libmtp.h:752
LIBMTP_album_struct::tracks
uint32_t * tracks
Definition libmtp.h:758
LIBMTP_album_struct::storage_id
uint32_t storage_id
Definition libmtp.h:753
LIBMTP_album_struct::no_tracks
uint32_t no_tracks
Definition libmtp.h:759
LIBMTP_album_struct::name
char * name
Definition libmtp.h:754
LIBMTP_album_struct::album_id
uint32_t album_id
Definition libmtp.h:751
LIBMTP_album_struct::artist
char * artist
Definition libmtp.h:755
LIBMTP_album_struct::composer
char * composer
Definition libmtp.h:756
LIBMTP_album_struct::genre
char * genre
Definition libmtp.h:757
LIBMTP_allowed_values_struct
Definition libmtp.h:562
LIBMTP_allowed_values_struct::num_entries
uint16_t num_entries
Definition libmtp.h:598
LIBMTP_allowed_values_struct::is_range
int is_range
Definition libmtp.h:606
LIBMTP_allowed_values_struct::datatype
LIBMTP_datatype_t datatype
Definition libmtp.h:602
LIBMTP_device_entry_struct
Definition libmtp.h:532
LIBMTP_device_entry_struct::vendor_id
uint16_t vendor_id
Definition libmtp.h:534
LIBMTP_device_entry_struct::product_id
uint16_t product_id
Definition libmtp.h:536
LIBMTP_device_entry_struct::vendor
char * vendor
Definition libmtp.h:533
LIBMTP_device_entry_struct::device_flags
uint32_t device_flags
Definition libmtp.h:537
LIBMTP_device_entry_struct::product
char * product
Definition libmtp.h:535
LIBMTP_device_extension_struct
Definition libmtp.h:612
LIBMTP_device_extension_struct::minor
int minor
Definition libmtp.h:624
LIBMTP_device_extension_struct::name
char * name
Definition libmtp.h:616
LIBMTP_device_extension_struct::major
int major
Definition libmtp.h:620
LIBMTP_device_extension_struct::next
LIBMTP_device_extension_t * next
Definition libmtp.h:629
LIBMTP_devicestorage_struct
Definition libmtp.h:790
LIBMTP_devicestorage_struct::AccessCapability
uint16_t AccessCapability
Definition libmtp.h:794
LIBMTP_devicestorage_struct::VolumeIdentifier
char * VolumeIdentifier
Definition libmtp.h:799
LIBMTP_devicestorage_struct::FreeSpaceInBytes
uint64_t FreeSpaceInBytes
Definition libmtp.h:796
LIBMTP_devicestorage_struct::FreeSpaceInObjects
uint64_t FreeSpaceInObjects
Definition libmtp.h:797
LIBMTP_devicestorage_struct::StorageDescription
char * StorageDescription
Definition libmtp.h:798
LIBMTP_devicestorage_struct::MaxCapacity
uint64_t MaxCapacity
Definition libmtp.h:795
LIBMTP_devicestorage_struct::prev
LIBMTP_devicestorage_t * prev
Definition libmtp.h:801
LIBMTP_devicestorage_struct::StorageType
uint16_t StorageType
Definition libmtp.h:792
LIBMTP_devicestorage_struct::FilesystemType
uint16_t FilesystemType
Definition libmtp.h:793
LIBMTP_devicestorage_struct::next
LIBMTP_devicestorage_t * next
Definition libmtp.h:800
LIBMTP_devicestorage_struct::id
uint32_t id
Definition libmtp.h:791
LIBMTP_error_struct
Definition libmtp.h:553
LIBMTP_file_struct
Definition libmtp.h:694
LIBMTP_file_struct::modificationdate
time_t modificationdate
Definition libmtp.h:700
LIBMTP_file_struct::next
LIBMTP_file_t * next
Definition libmtp.h:702
LIBMTP_file_struct::filename
char * filename
Definition libmtp.h:698
LIBMTP_file_struct::filesize
uint64_t filesize
Definition libmtp.h:699
LIBMTP_file_struct::parent_id
uint32_t parent_id
Definition libmtp.h:696
LIBMTP_file_struct::item_id
uint32_t item_id
Definition libmtp.h:695
LIBMTP_file_struct::storage_id
uint32_t storage_id
Definition libmtp.h:697
LIBMTP_file_struct::filetype
LIBMTP_filetype_t filetype
Definition libmtp.h:701
LIBMTP_filesampledata_struct
Definition libmtp.h:778
LIBMTP_filesampledata_struct::width
uint32_t width
Definition libmtp.h:779
LIBMTP_filesampledata_struct::filetype
LIBMTP_filetype_t filetype
Definition libmtp.h:782
LIBMTP_filesampledata_struct::height
uint32_t height
Definition libmtp.h:780
LIBMTP_filesampledata_struct::data
char * data
Definition libmtp.h:784
LIBMTP_filesampledata_struct::size
uint64_t size
Definition libmtp.h:783
LIBMTP_filesampledata_struct::duration
uint32_t duration
Definition libmtp.h:781
LIBMTP_folder_struct
Definition libmtp.h:766
LIBMTP_folder_struct::folder_id
uint32_t folder_id
Definition libmtp.h:767
LIBMTP_folder_struct::sibling
LIBMTP_folder_t * sibling
Definition libmtp.h:771
LIBMTP_folder_struct::child
LIBMTP_folder_t * child
Definition libmtp.h:772
LIBMTP_folder_struct::parent_id
uint32_t parent_id
Definition libmtp.h:768
LIBMTP_folder_struct::name
char * name
Definition libmtp.h:770
LIBMTP_folder_struct::storage_id
uint32_t storage_id
Definition libmtp.h:769
LIBMTP_mtpdevice_struct
Definition libmtp.h:635
LIBMTP_mtpdevice_struct::maximum_battery_level
uint8_t maximum_battery_level
Definition libmtp.h:663
LIBMTP_mtpdevice_struct::object_bitsize
uint8_t object_bitsize
Definition libmtp.h:639
LIBMTP_mtpdevice_struct::default_zencast_folder
uint32_t default_zencast_folder
Definition libmtp.h:675
LIBMTP_mtpdevice_struct::errorstack
LIBMTP_error_t * errorstack
Definition libmtp.h:661
LIBMTP_mtpdevice_struct::cached
int cached
Definition libmtp.h:685
LIBMTP_mtpdevice_struct::extensions
LIBMTP_device_extension_t * extensions
Definition libmtp.h:683
LIBMTP_mtpdevice_struct::cd
void * cd
Definition libmtp.h:681
LIBMTP_mtpdevice_struct::usbinfo
void * usbinfo
Definition libmtp.h:649
LIBMTP_mtpdevice_struct::next
LIBMTP_mtpdevice_t * next
Definition libmtp.h:688
LIBMTP_mtpdevice_struct::default_playlist_folder
uint32_t default_playlist_folder
Definition libmtp.h:667
LIBMTP_mtpdevice_struct::default_text_folder
uint32_t default_text_folder
Definition libmtp.h:679
LIBMTP_mtpdevice_struct::default_organizer_folder
uint32_t default_organizer_folder
Definition libmtp.h:673
LIBMTP_mtpdevice_struct::default_album_folder
uint32_t default_album_folder
Definition libmtp.h:677
LIBMTP_mtpdevice_struct::default_music_folder
uint32_t default_music_folder
Definition libmtp.h:665
LIBMTP_mtpdevice_struct::default_picture_folder
uint32_t default_picture_folder
Definition libmtp.h:669
LIBMTP_mtpdevice_struct::params
void * params
Definition libmtp.h:644
LIBMTP_mtpdevice_struct::storage
LIBMTP_devicestorage_t * storage
Definition libmtp.h:656
LIBMTP_mtpdevice_struct::default_video_folder
uint32_t default_video_folder
Definition libmtp.h:671
LIBMTP_playlist_struct
Definition libmtp.h:737
LIBMTP_playlist_struct::next
LIBMTP_playlist_t * next
Definition libmtp.h:744
LIBMTP_playlist_struct::playlist_id
uint32_t playlist_id
Definition libmtp.h:738
LIBMTP_playlist_struct::name
char * name
Definition libmtp.h:741
LIBMTP_playlist_struct::parent_id
uint32_t parent_id
Definition libmtp.h:739
LIBMTP_playlist_struct::no_tracks
uint32_t no_tracks
Definition libmtp.h:743
LIBMTP_playlist_struct::tracks
uint32_t * tracks
Definition libmtp.h:742
LIBMTP_playlist_struct::storage_id
uint32_t storage_id
Definition libmtp.h:740
LIBMTP_raw_device_struct
Definition libmtp.h:544
LIBMTP_raw_device_struct::devnum
uint8_t devnum
Definition libmtp.h:547
LIBMTP_raw_device_struct::device_entry
LIBMTP_device_entry_t device_entry
Definition libmtp.h:545
LIBMTP_raw_device_struct::bus_location
uint32_t bus_location
Definition libmtp.h:546
LIBMTP_track_struct
Definition libmtp.h:708
LIBMTP_track_struct::title
char * title
Definition libmtp.h:712
LIBMTP_track_struct::genre
char * genre
Definition libmtp.h:715
LIBMTP_track_struct::storage_id
uint32_t storage_id
Definition libmtp.h:711
LIBMTP_track_struct::composer
char * composer
Definition libmtp.h:714
LIBMTP_track_struct::samplerate
uint32_t samplerate
Definition libmtp.h:721
LIBMTP_track_struct::bitratetype
uint16_t bitratetype
Definition libmtp.h:725
LIBMTP_track_struct::date
char * date
Definition libmtp.h:717
LIBMTP_track_struct::filesize
uint64_t filesize
Definition libmtp.h:728
LIBMTP_track_struct::nochannels
uint16_t nochannels
Definition libmtp.h:722
LIBMTP_track_struct::parent_id
uint32_t parent_id
Definition libmtp.h:710
LIBMTP_track_struct::item_id
uint32_t item_id
Definition libmtp.h:709
LIBMTP_track_struct::usecount
uint32_t usecount
Definition libmtp.h:727
LIBMTP_track_struct::tracknumber
uint16_t tracknumber
Definition libmtp.h:719
LIBMTP_track_struct::filename
char * filename
Definition libmtp.h:718
LIBMTP_track_struct::album
char * album
Definition libmtp.h:716
LIBMTP_track_struct::duration
uint32_t duration
Definition libmtp.h:720
LIBMTP_track_struct::bitrate
uint32_t bitrate
Definition libmtp.h:724
LIBMTP_track_struct::modificationdate
time_t modificationdate
Definition libmtp.h:729
LIBMTP_track_struct::rating
uint16_t rating
Definition libmtp.h:726
LIBMTP_track_struct::next
LIBMTP_track_t * next
Definition libmtp.h:731
LIBMTP_track_struct::wavecodec
uint32_t wavecodec
Definition libmtp.h:723
LIBMTP_track_struct::filetype
LIBMTP_filetype_t filetype
Definition libmtp.h:730
LIBMTP_track_struct::artist
char * artist
Definition libmtp.h:713