libmtp.h
Go to the documentation of this file.
#ifndef LIBMTP_H_INCLUSION_GUARD
#define LIBMTP_H_INCLUSION_GUARD
#define LIBMTP_VERSION 0.1.4
/* This handles MSVC pecularities */
#ifdef _MSC_VER
#include <windows.h>
#define __WIN32__
#define snprintf _snprintf
#define ssize_t SSIZE_T
#endif
#include <stdio.h>
#include <usb.h>
#include <stdint.h>
#ifdef __WIN32__
/*
* Windows specific code, types that do not exist in Windows
* 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;
#endif
typedef enum {
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_UNKNOWN
} LIBMTP_filetype_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_number_t;
typedef struct LIBMTP_device_entry_struct LIBMTP_device_entry_t;
typedef struct LIBMTP_error_struct LIBMTP_error_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_object_struct LIBMTP_object_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);
struct LIBMTP_device_entry_struct {
char *name;
uint16_t vendor_id;
uint16_t product_id;
uint32_t device_flags;
};
struct LIBMTP_error_struct {
LIBMTP_error_number_t errornumber;
char *error_text;
LIBMTP_error_t *next;
};
struct LIBMTP_mtpdevice_struct {
uint8_t interface_number;
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_mtpdevice_t *next;
};
struct LIBMTP_file_struct {
uint32_t item_id;
uint32_t parent_id;
char *filename;
uint64_t filesize;
LIBMTP_filetype_t filetype;
LIBMTP_file_t *next;
};
struct LIBMTP_track_struct {
uint32_t item_id;
uint32_t parent_id;
char *title;
char *artist;
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;
LIBMTP_filetype_t filetype;
LIBMTP_track_t *next;
};
struct LIBMTP_playlist_struct {
uint32_t playlist_id;
char *name;
uint32_t *tracks;
uint32_t no_tracks;
LIBMTP_playlist_t *next;
};
struct LIBMTP_album_struct {
uint32_t album_id;
char *name;
uint32_t *tracks;
uint32_t no_tracks;
LIBMTP_album_t *next;
};
struct LIBMTP_folder_struct {
uint32_t folder_id;
uint32_t parent_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;
};
/* Make functions available for C++ */
#ifdef __cplusplus
extern "C" {
#endif
void LIBMTP_Init(void);
int LIBMTP_Get_Supported_Devices_List(LIBMTP_device_entry_t ** const, int * const);
int LIBMTP_Detect_Descriptor(uint16_t*,uint16_t*);
LIBMTP_mtpdevice_t *LIBMTP_Get_First_Device(void);
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*);
void LIBMTP_Release_Device(LIBMTP_mtpdevice_t*);
void LIBMTP_Dump_Device_Info(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);
LIBMTP_error_t *LIBMTP_Get_Errorstack(LIBMTP_mtpdevice_t*);
void LIBMTP_Clear_Errorstack(LIBMTP_mtpdevice_t*);
void LIBMTP_Dump_Errorstack(LIBMTP_mtpdevice_t*);
#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 *);
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);
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_Send_File_From_File(LIBMTP_mtpdevice_t *, char const * const,
LIBMTP_file_t * const, LIBMTP_progressfunc_t const,
void const * const, uint32_t const);
int LIBMTP_Send_File_From_File_Descriptor(LIBMTP_mtpdevice_t *, int const,
LIBMTP_file_t * const, LIBMTP_progressfunc_t const,
void const * const, uint32_t const);
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 *);
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_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_Send_Track_From_File(LIBMTP_mtpdevice_t *,
char const * const, LIBMTP_track_t * const,
LIBMTP_progressfunc_t const,
void const * const, uint32_t const);
int LIBMTP_Send_Track_From_File_Descriptor(LIBMTP_mtpdevice_t *,
int const, LIBMTP_track_t * const,
LIBMTP_progressfunc_t const,
void const * const, uint32_t const);
int LIBMTP_Update_Track_Metadata(LIBMTP_mtpdevice_t *,
LIBMTP_track_t const * const);
int LIBMTP_Track_Exists(LIBMTP_mtpdevice_t *, uint32_t);
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_Find_Folder(LIBMTP_folder_t*, uint32_t const);
uint32_t LIBMTP_Create_Folder(LIBMTP_mtpdevice_t*, char *, uint32_t);
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, uint32_t const);
int LIBMTP_Update_Playlist(LIBMTP_mtpdevice_t *, LIBMTP_playlist_t const * const);
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(LIBMTP_mtpdevice_t *, uint32_t const);
int LIBMTP_Create_New_Album(LIBMTP_mtpdevice_t *, LIBMTP_album_t * const, uint32_t const);
int LIBMTP_Update_Album(LIBMTP_mtpdevice_t *, LIBMTP_album_t const * const);
int LIBMTP_Delete_Object(LIBMTP_mtpdevice_t *, uint32_t);
/* End of C++ exports */
#ifdef __cplusplus
}
#endif
#endif /* LIBMTP_H_INCLUSION_GUARD */
LIBMTP_Get_Album
LIBMTP_album_t * LIBMTP_Get_Album(LIBMTP_mtpdevice_t *, uint32_t const)
Definition: libmtp.c:4455
LIBMTP_mtpdevice_struct::default_music_folder
uint32_t default_music_folder
Definition: libmtp.h:204
LIBMTP_Get_Device_Certificate
int LIBMTP_Get_Device_Certificate(LIBMTP_mtpdevice_t *, char **const)
Definition: libmtp.c:1732
LIBMTP_folder_struct::sibling
LIBMTP_folder_t * sibling
Definition: libmtp.h:293
LIBMTP_Set_Syncpartner
int LIBMTP_Set_Syncpartner(LIBMTP_mtpdevice_t *, char const *const)
Definition: libmtp.c:1538
LIBMTP_devicestorage_struct::AccessCapability
uint16_t AccessCapability
Definition: libmtp.h:316
LIBMTP_track_struct::genre
char * genre
Definition: libmtp.h:246
LIBMTP_track_struct::filetype
LIBMTP_filetype_t filetype
Definition: libmtp.h:260
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, uint32_t const)
Definition: libmtp.c:3188
LIBMTP_Release_Device
void LIBMTP_Release_Device(LIBMTP_mtpdevice_t *)
Definition: libmtp.c:934
LIBMTP_file_struct::next
LIBMTP_file_t * next
Definition: libmtp.h:235
LIBMTP_destroy_file_t
void LIBMTP_destroy_file_t(LIBMTP_file_t *)
Definition: libmtp.c:1917
LIBMTP_track_struct
Definition: libmtp.h:241
LIBMTP_track_struct::next
LIBMTP_track_t * next
Definition: libmtp.h:261
LIBMTP_album_struct
Definition: libmtp.h:278
LIBMTP_Get_Filelisting
LIBMTP_file_t * LIBMTP_Get_Filelisting(LIBMTP_mtpdevice_t *)
Definition: libmtp.c:1933
LIBMTP_Clear_Errorstack
void LIBMTP_Clear_Errorstack(LIBMTP_mtpdevice_t *)
Definition: libmtp.c:1033
LIBMTP_folder_struct::name
char * name
Definition: libmtp.h:292
LIBMTP_devicestorage_struct::FreeSpaceInBytes
uint64_t FreeSpaceInBytes
Definition: libmtp.h:318
LIBMTP_album_struct::next
LIBMTP_album_t * next
Definition: libmtp.h:283
LIBMTP_destroy_track_t
void LIBMTP_destroy_track_t(LIBMTP_track_t *)
Definition: libmtp.c:2164
LIBMTP_Create_New_Album
int LIBMTP_Create_New_Album(LIBMTP_mtpdevice_t *, LIBMTP_album_t *const, uint32_t const)
Definition: libmtp.c:4516
LIBMTP_new_file_t
LIBMTP_file_t * LIBMTP_new_file_t(void)
Definition: libmtp.c:1897
LIBMTP_Get_Filemetadata
LIBMTP_file_t * LIBMTP_Get_Filemetadata(LIBMTP_mtpdevice_t *, uint32_t const)
Definition: libmtp.c:2056
LIBMTP_track_struct::nochannels
uint16_t nochannels
Definition: libmtp.h:253
LIBMTP_folder_struct::parent_id
uint32_t parent_id
Definition: libmtp.h:291
LIBMTP_mtpdevice_struct::maximum_battery_level
uint8_t maximum_battery_level
Definition: libmtp.h:202
LIBMTP_new_filesampledata_t
LIBMTP_filesampledata_t * LIBMTP_new_filesampledata_t(void)
Definition: libmtp.c:4548
LIBMTP_album_struct::name
char * name
Definition: libmtp.h:280
LIBMTP_mtpdevice_struct
Definition: libmtp.h:177
LIBMTP_Create_New_Playlist
int LIBMTP_Create_New_Playlist(LIBMTP_mtpdevice_t *, LIBMTP_playlist_t *const, uint32_t const)
Definition: libmtp.c:4282
LIBMTP_device_entry_struct::product_id
uint16_t product_id
Definition: libmtp.h:161
LIBMTP_object_t
struct LIBMTP_object_struct LIBMTP_object_t
Definition: libmtp.h:132
LIBMTP_track_struct::title
char * title
Definition: libmtp.h:244
LIBMTP_file_struct
Definition: libmtp.h:229
LIBMTP_devicestorage_struct
Definition: libmtp.h:312
LIBMTP_mtpdevice_struct::default_zencast_folder
uint32_t default_zencast_folder
Definition: libmtp.h:214
LIBMTP_devicestorage_struct::FreeSpaceInObjects
uint64_t FreeSpaceInObjects
Definition: libmtp.h:319
LIBMTP_track_struct::bitratetype
uint16_t bitratetype
Definition: libmtp.h:256
LIBMTP_track_struct::bitrate
uint32_t bitrate
Definition: libmtp.h:255
LIBMTP_track_struct::parent_id
uint32_t parent_id
Definition: libmtp.h:243
LIBMTP_error_number_t
LIBMTP_error_number_t
Definition: libmtp.h:114
LIBMTP_Get_Filetype_Description
char const * LIBMTP_Get_Filetype_Description(LIBMTP_filetype_t)
Definition: libmtp.c:313
LIBMTP_Get_Connected_Devices
LIBMTP_error_number_t LIBMTP_Get_Connected_Devices(LIBMTP_mtpdevice_t **)
Definition: libmtp.c:893
LIBMTP_devicestorage_struct::StorageType
uint16_t StorageType
Definition: libmtp.h:314
LIBMTP_track_struct::item_id
uint32_t item_id
Definition: libmtp.h:242
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:2395
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, uint32_t const)
Definition: libmtp.c:2739
LIBMTP_folder_struct::child
LIBMTP_folder_t * child
Definition: libmtp.h:294
LIBMTP_track_struct::rating
uint16_t rating
Definition: libmtp.h:257
LIBMTP_Update_Playlist
int LIBMTP_Update_Playlist(LIBMTP_mtpdevice_t *, LIBMTP_playlist_t const *const)
Definition: libmtp.c:4318
LIBMTP_album_struct::tracks
uint32_t * tracks
Definition: libmtp.h:281
LIBMTP_devicestorage_struct::FilesystemType
uint16_t FilesystemType
Definition: libmtp.h:315
LIBMTP_track_struct::wavecodec
uint32_t wavecodec
Definition: libmtp.h:254
LIBMTP_mtpdevice_struct::usbinfo
void * usbinfo
Definition: libmtp.h:189
LIBMTP_Detect_Descriptor
int LIBMTP_Detect_Descriptor(uint16_t *, uint16_t *)
Definition: libusb-glue.c:508
LIBMTP_mtpdevice_struct::storage
LIBMTP_devicestorage_t * storage
Definition: libmtp.h:195
LIBMTP_mtpdevice_struct::default_video_folder
uint32_t default_video_folder
Definition: libmtp.h:210
LIBMTP_devicestorage_struct::prev
LIBMTP_devicestorage_t * prev
Definition: libmtp.h:323
LIBMTP_Create_Folder
uint32_t LIBMTP_Create_Folder(LIBMTP_mtpdevice_t *, char *, uint32_t)
Definition: libmtp.c:3830
LIBMTP_album_struct::album_id
uint32_t album_id
Definition: libmtp.h:279
LIBMTP_Get_Deviceversion
char * LIBMTP_Get_Deviceversion(LIBMTP_mtpdevice_t *)
Definition: libmtp.c:1415
LIBMTP_mtpdevice_struct::default_organizer_folder
uint32_t default_organizer_folder
Definition: libmtp.h:212
LIBMTP_destroy_filesampledata_t
void LIBMTP_destroy_filesampledata_t(LIBMTP_filesampledata_t *)
Definition: libmtp.c:4566
LIBMTP_destroy_playlist_t
void LIBMTP_destroy_playlist_t(LIBMTP_playlist_t *)
Definition: libmtp.c:3898
LIBMTP_track_struct::duration
uint32_t duration
Definition: libmtp.h:251
LIBMTP_track_struct::samplerate
uint32_t samplerate
Definition: libmtp.h:252
LIBMTP_playlist_struct::next
LIBMTP_playlist_t * next
Definition: libmtp.h:272
LIBMTP_Get_Batterylevel
int LIBMTP_Get_Batterylevel(LIBMTP_mtpdevice_t *, uint8_t *const, uint8_t *const)
Definition: libmtp.c:1603
LIBMTP_mtpdevice_struct::params
void * params
Definition: libmtp.h:184
LIBMTP_track_struct::filename
char * filename
Definition: libmtp.h:249
LIBMTP_playlist_struct
Definition: libmtp.h:267
LIBMTP_Find_Folder
LIBMTP_folder_t * LIBMTP_Find_Folder(LIBMTP_folder_t *, uint32_t const)
Definition: libmtp.c:3728
LIBMTP_device_entry_struct::device_flags
uint32_t device_flags
Definition: libmtp.h:162
LIBMTP_album_struct::no_tracks
uint32_t no_tracks
Definition: libmtp.h:282
LIBMTP_filesampledata_struct::size
uint64_t size
Definition: libmtp.h:305
LIBMTP_mtpdevice_struct::default_playlist_folder
uint32_t default_playlist_folder
Definition: libmtp.h:206
LIBMTP_track_struct::usecount
uint32_t usecount
Definition: libmtp.h:258
LIBMTP_playlist_struct::name
char * name
Definition: libmtp.h:269
LIBMTP_Get_First_Device
LIBMTP_mtpdevice_t * LIBMTP_Get_First_Device(void)
Definition: libmtp.c:612
LIBMTP_device_entry_struct
Definition: libmtp.h:158
LIBMTP_file_struct::filename
char * filename
Definition: libmtp.h:232
LIBMTP_new_track_t
LIBMTP_track_t * LIBMTP_new_track_t(void)
Definition: libmtp.c:2130
LIBMTP_destroy_folder_t
void LIBMTP_destroy_folder_t(LIBMTP_folder_t *)
Definition: libmtp.c:3697
LIBMTP_Get_Syncpartner
char * LIBMTP_Get_Syncpartner(LIBMTP_mtpdevice_t *)
Definition: libmtp.c:1500
LIBMTP_Get_Friendlyname
char * LIBMTP_Get_Friendlyname(LIBMTP_mtpdevice_t *)
Definition: libmtp.c:1437
LIBMTP_playlist_struct::playlist_id
uint32_t playlist_id
Definition: libmtp.h:268
LIBMTP_Dump_Device_Info
void LIBMTP_Dump_Device_Info(LIBMTP_mtpdevice_t *)
Definition: libmtp.c:1274
LIBMTP_new_folder_t
LIBMTP_folder_t * LIBMTP_new_folder_t(void)
Definition: libmtp.c:3677
LIBMTP_Dump_Errorstack
void LIBMTP_Dump_Errorstack(LIBMTP_mtpdevice_t *)
Definition: libmtp.c:1060
LIBMTP_Get_Playlist_List
LIBMTP_playlist_t * LIBMTP_Get_Playlist_List(LIBMTP_mtpdevice_t *)
Definition: libmtp.c:3923
LIBMTP_mtpdevice_struct::errorstack
LIBMTP_error_t * errorstack
Definition: libmtp.h:200
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, uint32_t const)
Definition: libmtp.c:3113
LIBMTP_mtpdevice_struct::default_picture_folder
uint32_t default_picture_folder
Definition: libmtp.h:208
LIBMTP_Get_Supported_Devices_List
int LIBMTP_Get_Supported_Devices_List(LIBMTP_device_entry_t **const, int *const)
Definition: libusb-glue.c:297
LIBMTP_Number_Devices_In_List
uint32_t LIBMTP_Number_Devices_In_List(LIBMTP_mtpdevice_t *)
Definition: libmtp.c:875
LIBMTP_Get_Trackmetadata
LIBMTP_track_t * LIBMTP_Get_Trackmetadata(LIBMTP_mtpdevice_t *, uint32_t const)
Definition: libmtp.c:2489
LIBMTP_Get_Modelname
char * LIBMTP_Get_Modelname(LIBMTP_mtpdevice_t *)
Definition: libmtp.c:1378
LIBMTP_mtpdevice_struct::default_album_folder
uint32_t default_album_folder
Definition: libmtp.h:216
LIBMTP_Get_Album_List
LIBMTP_album_t * LIBMTP_Get_Album_List(LIBMTP_mtpdevice_t *)
Definition: libmtp.c:4394
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, uint32_t const)
Definition: libmtp.c:2824
LIBMTP_Get_Tracklisting
LIBMTP_track_t * LIBMTP_Get_Tracklisting(LIBMTP_mtpdevice_t *)
Definition: libmtp.c:2355
LIBMTP_Send_Representative_Sample
int LIBMTP_Send_Representative_Sample(LIBMTP_mtpdevice_t *, uint32_t const, LIBMTP_filesampledata_t *)
Definition: libmtp.c:4692
LIBMTP_filesampledata_struct::filetype
LIBMTP_filetype_t filetype
Definition: libmtp.h:304
LIBMTP_track_struct::filesize
uint64_t filesize
Definition: libmtp.h:259
LIBMTP_playlist_struct::no_tracks
uint32_t no_tracks
Definition: libmtp.h:271
LIBMTP_track_struct::date
char * date
Definition: libmtp.h:248
LIBMTP_Get_Playlist
LIBMTP_playlist_t * LIBMTP_Get_Playlist(LIBMTP_mtpdevice_t *, uint32_t const)
Definition: libmtp.c:3991
LIBMTP_Format_Storage
int LIBMTP_Format_Storage(LIBMTP_mtpdevice_t *, LIBMTP_devicestorage_t *)
Definition: libmtp.c:1640
LIBMTP_mtpdevice_struct::default_text_folder
uint32_t default_text_folder
Definition: libmtp.h:218
LIBMTP_Get_Serialnumber
char * LIBMTP_Get_Serialnumber(LIBMTP_mtpdevice_t *)
Definition: libmtp.c:1396
LIBMTP_Track_Exists
int LIBMTP_Track_Exists(LIBMTP_mtpdevice_t *, uint32_t)
Definition: libmtp.c:3655
LIBMTP_Init
void LIBMTP_Init(void)
Definition: libmtp.c:299
LIBMTP_filesampledata_struct
Definition: libmtp.h:300
LIBMTP_file_struct::parent_id
uint32_t parent_id
Definition: libmtp.h:231
LIBMTP_Get_Supported_Filetypes
int LIBMTP_Get_Supported_Filetypes(LIBMTP_mtpdevice_t *, uint16_t **const, uint16_t *const)
Definition: libmtp.c:1752
LIBMTP_file_struct::filesize
uint64_t filesize
Definition: libmtp.h:233
LIBMTP_devicestorage_struct::id
uint32_t id
Definition: libmtp.h:313
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:2567
LIBMTP_error_struct
Definition: libmtp.h:168
LIBMTP_filesampledata_struct::data
char * data
Definition: libmtp.h:306
LIBMTP_filesampledata_struct::height
uint32_t height
Definition: libmtp.h:302
LIBMTP_mtpdevice_struct::cd
void * cd
Definition: libmtp.h:220
LIBMTP_Delete_Object
int LIBMTP_Delete_Object(LIBMTP_mtpdevice_t *, uint32_t)
Definition: libmtp.c:3633
LIBMTP_new_playlist_t
LIBMTP_playlist_t * LIBMTP_new_playlist_t(void)
Definition: libmtp.c:3877
LIBMTP_devicestorage_struct::VolumeIdentifier
char * VolumeIdentifier
Definition: libmtp.h:321
LIBMTP_filesampledata_struct::width
uint32_t width
Definition: libmtp.h:301
LIBMTP_folder_struct::folder_id
uint32_t folder_id
Definition: libmtp.h:290
LIBMTP_track_struct::tracknumber
uint16_t tracknumber
Definition: libmtp.h:250
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:2706
LIBMTP_progressfunc_t
int(* LIBMTP_progressfunc_t)(uint64_t const sent, uint64_t const total, void const *const data)
Definition: libmtp.h:146
LIBMTP_mtpdevice_struct::interface_number
uint8_t interface_number
Definition: libmtp.h:179
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:2682
LIBMTP_Release_Device_List
void LIBMTP_Release_Device_List(LIBMTP_mtpdevice_t *)
Definition: libmtp.c:917
LIBMTP_devicestorage_struct::MaxCapacity
uint64_t MaxCapacity
Definition: libmtp.h:317
LIBMTP_filesampledata_struct::duration
uint32_t duration
Definition: libmtp.h:303
LIBMTP_devicestorage_struct::next
LIBMTP_devicestorage_t * next
Definition: libmtp.h:322
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:2622
LIBMTP_playlist_struct::tracks
uint32_t * tracks
Definition: libmtp.h:270
LIBMTP_new_album_t
LIBMTP_album_t * LIBMTP_new_album_t(void)
Definition: libmtp.c:4352
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:1973
LIBMTP_Set_Friendlyname
int LIBMTP_Set_Friendlyname(LIBMTP_mtpdevice_t *, char const *const)
Definition: libmtp.c:1470
LIBMTP_device_entry_struct::vendor_id
uint16_t vendor_id
Definition: libmtp.h:160
LIBMTP_track_struct::album
char * album
Definition: libmtp.h:247
LIBMTP_destroy_album_t
void LIBMTP_destroy_album_t(LIBMTP_album_t *)
Definition: libmtp.c:4372
LIBMTP_mtpdevice_struct::next
LIBMTP_mtpdevice_t * next
Definition: libmtp.h:223
LIBMTP_track_struct::artist
char * artist
Definition: libmtp.h:245
LIBMTP_Get_Storage
int LIBMTP_Get_Storage(LIBMTP_mtpdevice_t *, int const)
Definition: libmtp.c:1795
LIBMTP_Get_Secure_Time
int LIBMTP_Get_Secure_Time(LIBMTP_mtpdevice_t *, char **const)
Definition: libmtp.c:1718
LIBMTP_folder_struct
Definition: libmtp.h:289
LIBMTP_devicestorage_struct::StorageDescription
char * StorageDescription
Definition: libmtp.h:320
LIBMTP_file_struct::item_id
uint32_t item_id
Definition: libmtp.h:230
LIBMTP_Update_Album
int LIBMTP_Update_Album(LIBMTP_mtpdevice_t *, LIBMTP_album_t const *const)
Definition: libmtp.c:4793
LIBMTP_Update_Track_Metadata
int LIBMTP_Update_Track_Metadata(LIBMTP_mtpdevice_t *, LIBMTP_track_t const *const)
Definition: libmtp.c:3462
LIBMTP_file_struct::filetype
LIBMTP_filetype_t filetype
Definition: libmtp.h:234
LIBMTP_device_entry_struct::name
char * name
Definition: libmtp.h:159
LIBMTP_Get_Representative_Sample_Format
int LIBMTP_Get_Representative_Sample_Format(LIBMTP_mtpdevice_t *, LIBMTP_filetype_t const, LIBMTP_filesampledata_t **)
Definition: libmtp.c:4600
LIBMTP_Get_Errorstack
LIBMTP_error_t * LIBMTP_Get_Errorstack(LIBMTP_mtpdevice_t *)
Definition: libmtp.c:1018
LIBMTP_Get_Folder_List
LIBMTP_folder_t * LIBMTP_Get_Folder_List(LIBMTP_mtpdevice_t *)
Definition: libmtp.c:3758