Detailed Description

Macro Definition Documentation

#define LIBMTP_DEBUG_NONE 0x00

The debug flags defined here are the external flags used by the libmtp library interface.

Please keep this list in sync with libmtp.c.

#define LIBMTP_FILETYPE_IS_ADDRESSBOOK(a)

Value:

(a == LIBMTP_FILETYPE_VCARD2 || a == LIBMTP_FILETYPE_VCARD3)

Addressbook and Business card filetype test

#define LIBMTP_FILETYPE_IS_AUDIO(a)

Value:

(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)

Audio filetype test.

For filetypes that can be either audio or video, use LIBMTP_FILETYPE_IS_AUDIOVIDEO

#define LIBMTP_FILETYPE_IS_AUDIOVIDEO(a)

Value:

(a == LIBMTP_FILETYPE_MP4 ||  a == LIBMTP_FILETYPE_ASF ||  a == LIBMTP_FILETYPE_QT)

Audio andor video filetype test.

#define LIBMTP_FILETYPE_IS_CALENDAR(a)

Value:

(a == LIBMTP_FILETYPE_VCALENDAR1 || a == LIBMTP_FILETYPE_VCALENDAR2)

Calendar and Appointment filetype test

#define LIBMTP_FILETYPE_IS_IMAGE(a)

Value:

(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)

Image filetype test

#define LIBMTP_FILETYPE_IS_TRACK(a)

Value:

(LIBMTP_FILETYPE_IS_AUDIO(a) ||\
 LIBMTP_FILETYPE_IS_VIDEO(a) ||\
 LIBMTP_FILETYPE_IS_AUDIOVIDEO(a))

Test if filetype is a track. Use this to determine if the File API or Track API should be used to upload or download an object.

Examples: sendtr.c.

Referenced by LIBMTP_Get_Tracklisting_With_Callback_For_Storage(), LIBMTP_Get_Trackmetadata(), LIBMTP_Send_Track_From_File_Descriptor(), and LIBMTP_Send_Track_From_Handler().

#define LIBMTP_FILETYPE_IS_VIDEO(a)

Value:

(a == LIBMTP_FILETYPE_WMV ||  a == LIBMTP_FILETYPE_AVI ||  a == LIBMTP_FILETYPE_MPEG ||  a == LIBMTP_FILETYPE_UNDEF_VIDEO)

Video filetype test.

For filetypes that can be either audio or video, use LIBMTP_FILETYPE_IS_AUDIOVIDEO

#define LIBMTP_HANDLER_RETURN_OK 0

The return codes for the get/put functions

Typedef Documentation

typedef struct \fBLIBMTP_album_struct\fP \fBLIBMTP_album_t\fP

See also:

LIBMTP_album_struct

typedef struct \fBLIBMTP_allowed_values_struct\fP \fBLIBMTP_allowed_values_t\fP

See also:

LIBMTP_allowed_values_struct

typedef struct \fBLIBMTP_device_entry_struct\fP \fBLIBMTP_device_entry_t\fP

See also:

LIBMTP_device_entry_struct

typedef struct \fBLIBMTP_devicestorage_struct\fP \fBLIBMTP_devicestorage_t\fP

See also:

LIBMTP_devicestorage_t

typedef struct \fBLIBMTP_error_struct\fP \fBLIBMTP_error_t\fP

See also:

LIBMTP_error_struct

typedef struct \fBLIBMTP_file_struct\fP \fBLIBMTP_file_t\fP

See also:

LIBMTP_file_struct

typedef struct \fBLIBMTP_filesampledata_struct\fP \fBLIBMTP_filesampledata_t\fP

See also:

LIBMTP_filesample_t

typedef struct \fBLIBMTP_folder_struct\fP \fBLIBMTP_folder_t\fP

See also:

LIBMTP_folder_t

typedef struct \fBLIBMTP_mtpdevice_struct\fP \fBLIBMTP_mtpdevice_t\fP

<

See also:

LIBMTP_device_extension_struct

LIBMTP_mtpdevice_struct

typedef struct LIBMTP_object_struct \fBLIBMTP_object_t\fP

See also:

LIBMTP_object_t

typedef struct \fBLIBMTP_playlist_struct\fP \fBLIBMTP_playlist_t\fP

See also:

LIBMTP_playlist_struct

typedef int(* LIBMTP_progressfunc_t)(uint64_t const sent, uint64_t const total, void const *const data)

The callback type definition. Notice that a progress percentage ratio is easy to calculate by dividing sent by total.

Parameters:

sent the number of bytes sent so far

total the total number of bytes to send

data a user-defined dereferencable pointer

Returns:

if anything else than 0 is returned, the current transfer will be interrupted / cancelled.

typedef struct \fBLIBMTP_raw_device_struct\fP \fBLIBMTP_raw_device_t\fP

See also:

LIBMTP_raw_device_struct

typedef struct \fBLIBMTP_track_struct\fP \fBLIBMTP_track_t\fP

See also:

LIBMTP_track_struct

typedef uint16_t(* MTPDataGetFunc)(void *params, void *priv, uint32_t wantlen, unsigned char *data, uint32_t *gotlen)

Callback function for get by handler function

Parameters:

params the device parameters

priv a user-defined dereferencable pointer

wantlen the number of bytes wanted

data a buffer to write the data to

gotlen pointer to the number of bytes actually written to data

Returns:

LIBMTP_HANDLER_RETURN_OK if successful, LIBMTP_HANDLER_RETURN_ERROR on error or LIBMTP_HANDLER_RETURN_CANCEL to cancel the transfer

typedef uint16_t(* MTPDataPutFunc)(void *params, void *priv, uint32_t sendlen, unsigned char *data, uint32_t *putlen)

Callback function for put by handler function

Parameters:

params the device parameters

priv a user-defined dereferencable pointer

sendlen the number of bytes available

data a buffer to read the data from

putlen pointer to the number of bytes actually read from data

Returns:

LIBMTP_HANDLER_RETURN_OK if successful, LIBMTP_HANDLER_RETURN_ERROR on error or LIBMTP_HANDLER_RETURN_CANCEL to cancel the transfer

Enumeration Type Documentation

enum \fBLIBMTP_datatype_t\fP

These are the data types

enum \fBLIBMTP_devicecap_t\fP

These are device capabilities

Enumerator

LIBMTP_DEVICECAP_GetPartialObject

This capability tells whether you can call the funcion getting partial objects,

See also:

LIBMTP_GetPartialObject()

LIBMTP_DEVICECAP_SendPartialObject

This capability tells whether you can call the function sending partial objects.

See also:

LIBMTP_SendPartialObject()

LIBMTP_DEVICECAP_EditObjects

This capability tells whether you can call the functions editing objects in-place on a device.

See also:

LIBMTP_BeginEditObject()

LIBMTP_EndEditObject()

LIBMTP_TruncateObject()

enum \fBLIBMTP_error_number_t\fP

These are the numbered error codes. You can also get string representations for errors.

enum \fBLIBMTP_filetype_t\fP

The filetypes defined here are the external types used by the libmtp library interface. The types used internally as PTP-defined enumerator types is something different.

enum \fBLIBMTP_property_t\fP

The properties defined here are the external types used by the libmtp library interface.

Author

Generated automatically by Doxygen for libmtp from the source code.