Module: mtp

mtp

mtp struct types
Source:

Members

<inner> cached

Whether the device uses caching, only used internally
Source:

<inner> cd

Per device iconv() converters, only used internally
Source:

<inner> datatype

The datatype specifying which of the above is used. LIBMTP_datatype_t
Source:

<inner> default_album_folder

Default Album folder
Source:

<inner> default_music_folder

Default music folder
Source:

<inner> default_organizer_folder

Default organizer folder
Source:

<inner> default_picture_folder

Default picture folder
Source:

<inner> default_playlist_folder

Default playlist folder
Source:

<inner> default_text_folder

Default Text folder
Source:

<inner> default_video_folder

Default video folder
Source:

<inner> default_zencast_folder

Default ZENcast folder (only Creative devices...)
Source:

<inner> errorstack

The error stack. This shall be handled using the error getting and clearing functions, not by dereferencing this list.
Source:

<inner> extensions

Extension list
Source:

<inner> is_range

Non zero for range, 0 for enum
Source:

<inner> major

Major revision of extension
Source:

<inner> maximum_battery_level

The maximum battery level for this device
Source:

<inner> minor

Minor revision of extension
Source:

<inner> name

Name of extension e.g. "foo.com"
Source:

<inner> num_entries

Number of entries in the vals array
Source:

<inner> object_bitsize

Object bitsize, typically 32 or 64.
Source:

<inner> params

Parameters for this device, must be cast into \c (PTPParams*) before internal use.
Source:

<inner> storage

The storage for this device, do not use strings in here without copying them first, and beware that this list may be rebuilt at any time.
Source:
See:
  • LIBMTP_Get_Storage()

<inner> usbinfo

USB device for this device, must be cast into \c (PTP_USB*) before internal use.
Source:

Methods

<inner> LIBMTP_Clear_Errorstack() → {void}

LIBMTP_Clear_Errorstack
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
Source:
Returns:
Type
void

<inner> LIBMTP_Detect_Raw_Devices() → {int}

LIBMTP_Detect_Raw_Devices
Parameters:
Type Description
LIBMTP_raw_device_structPtrPtr
intPtr
Source:
Returns:
Type
int

<inner> LIBMTP_Dump_Device_Info() → {void}

LIBMTP_Dump_Device_Info'
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
Source:
Returns:
Type
void

<inner> LIBMTP_Dump_Errorstack() → {void}

LIBMTP_Dump_Errorstack
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
Source:
Returns:
Type
void

<inner> LIBMTP_Get_Batterylevel() → {int}

LIBMTP_Get_Batterylevel
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
uint8Ptr
uint8Ptr
Source:
Returns:
Type
int

<inner> LIBMTP_Get_Device_Certificate() → {int}

LIBMTP_Get_Device_Certificate
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
stringPtr
Source:
Returns:
Type
int

<inner> LIBMTP_Get_Deviceversion() → {string}

LIBMTP_Get_Deviceversion
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
Source:
Returns:
Type
string

<inner> LIBMTP_Get_Filelisting_With_Callback() → {LIBMTP_file_structPtr}

LIBMTP_Get_Filelisting_With_Callback
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
LIBMTP_progressfunc_t
voidPtr
Source:
Returns:
Type
LIBMTP_file_structPtr

<inner> LIBMTP_Get_Filetype_Description() → {string}

LIBMTP_Get_Filetype_Description
Parameters:
Type Description
int
Source:
Returns:
Type
string

<inner> LIBMTP_Get_Friendlyname() → {string}

LIBMTP_Get_Friendlyname
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
Source:
Returns:
Type
string

<inner> LIBMTP_Get_Manufacturername() → {string}

LIBMTP_Get_Manufacturername
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
Source:
Returns:
Type
string

<inner> LIBMTP_Get_Modelname() → {string}

LIBMTP_Get_Modelname
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
Source:
Returns:
Type
string

<inner> LIBMTP_Get_Secure_Time() → {int}

LIBMTP_Get_Secure_Time Crashes Samsung Galaxy S5.
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
stringPtr
Source:
Returns:
Type
int

<inner> LIBMTP_Get_Serialnumber() → {string}

LIBMTP_Get_Serialnumber
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
Source:
Returns:
Type
string

<inner> LIBMTP_Get_Supported_Filetypes() → {int}

LIBMTP_Get_Supported_Filetypes
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
uint16PtrPtr
uint16Ptr
Source:
Returns:
Type
int

<inner> LIBMTP_Get_Syncpartner() → {string}

LIBMTP_Get_Syncpartner
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
Source:
Returns:
Type
string

<inner> LIBMTP_Get_Track_To_File_Descriptor() → {int}

LIBMTP_Get_Track_To_File_Descriptor
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
uint32
int
LIBMTP_progressfunc_t
voidPtr
Source:
Returns:
Type
int

<inner> LIBMTP_Init() → {void}

LIBMTP_Init
Source:
Returns:
Type
void

<inner> LIBMTP_Open_Raw_Device() → {LIBMTP_mtpdevice_structPtr}

LIBMTP_Open_Raw_Device
Parameters:
Type Description
LIBMTP_raw_device_structPtr
Source:
Returns:
Type
LIBMTP_mtpdevice_structPtr

<inner> LIBMTP_progressfunc_t(sent, total, data) → {int}

The callback type definition. Notice that a progress percentage ratio is easy to calculate by dividing sent by total.
Parameters:
Name Type Description
sent uint64 the number of bytes sent so far
total uint64 the total number of bytes to send
data voidPtr a user-defined dereferencable pointer
Source:
Returns:
if anything else than 0 is returned, the current transfer will be interrupted / cancelled.
Type
int

<inner> LIBMTP_Release_Device() → {void}

LIBMTP_Release_Device
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
Source:
Returns:
Type
void

<inner> LIBMTP_Set_Debug() → {void}

LIBMTP_Set_Debug
Parameters:
Type Description
int
Source:
Returns:
Type
void

mtp

Media transfer protocol module for Node.js
Source:

Members

<inner> cached

Whether the device uses caching, only used internally
Source:

<inner> cd

Per device iconv() converters, only used internally
Source:

<inner> datatype

The datatype specifying which of the above is used. LIBMTP_datatype_t
Source:

<inner> default_album_folder

Default Album folder
Source:

<inner> default_music_folder

Default music folder
Source:

<inner> default_organizer_folder

Default organizer folder
Source:

<inner> default_picture_folder

Default picture folder
Source:

<inner> default_playlist_folder

Default playlist folder
Source:

<inner> default_text_folder

Default Text folder
Source:

<inner> default_video_folder

Default video folder
Source:

<inner> default_zencast_folder

Default ZENcast folder (only Creative devices...)
Source:

<inner> errorstack

The error stack. This shall be handled using the error getting and clearing functions, not by dereferencing this list.
Source:

<inner> extensions

Extension list
Source:

<inner> is_range

Non zero for range, 0 for enum
Source:

<inner> major

Major revision of extension
Source:

<inner> maximum_battery_level

The maximum battery level for this device
Source:

<inner> minor

Minor revision of extension
Source:

<inner> name

Name of extension e.g. "foo.com"
Source:

<inner> num_entries

Number of entries in the vals array
Source:

<inner> object_bitsize

Object bitsize, typically 32 or 64.
Source:

<inner> params

Parameters for this device, must be cast into \c (PTPParams*) before internal use.
Source:

<inner> storage

The storage for this device, do not use strings in here without copying them first, and beware that this list may be rebuilt at any time.
Source:
See:
  • LIBMTP_Get_Storage()

<inner> usbinfo

USB device for this device, must be cast into \c (PTP_USB*) before internal use.
Source:

Methods

<inner> LIBMTP_Clear_Errorstack() → {void}

LIBMTP_Clear_Errorstack
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
Source:
Returns:
Type
void

<inner> LIBMTP_Detect_Raw_Devices() → {int}

LIBMTP_Detect_Raw_Devices
Parameters:
Type Description
LIBMTP_raw_device_structPtrPtr
intPtr
Source:
Returns:
Type
int

<inner> LIBMTP_Dump_Device_Info() → {void}

LIBMTP_Dump_Device_Info'
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
Source:
Returns:
Type
void

<inner> LIBMTP_Dump_Errorstack() → {void}

LIBMTP_Dump_Errorstack
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
Source:
Returns:
Type
void

<inner> LIBMTP_Get_Batterylevel() → {int}

LIBMTP_Get_Batterylevel
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
uint8Ptr
uint8Ptr
Source:
Returns:
Type
int

<inner> LIBMTP_Get_Device_Certificate() → {int}

LIBMTP_Get_Device_Certificate
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
stringPtr
Source:
Returns:
Type
int

<inner> LIBMTP_Get_Deviceversion() → {string}

LIBMTP_Get_Deviceversion
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
Source:
Returns:
Type
string

<inner> LIBMTP_Get_Filelisting_With_Callback() → {LIBMTP_file_structPtr}

LIBMTP_Get_Filelisting_With_Callback
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
LIBMTP_progressfunc_t
voidPtr
Source:
Returns:
Type
LIBMTP_file_structPtr

<inner> LIBMTP_Get_Filetype_Description() → {string}

LIBMTP_Get_Filetype_Description
Parameters:
Type Description
int
Source:
Returns:
Type
string

<inner> LIBMTP_Get_Friendlyname() → {string}

LIBMTP_Get_Friendlyname
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
Source:
Returns:
Type
string

<inner> LIBMTP_Get_Manufacturername() → {string}

LIBMTP_Get_Manufacturername
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
Source:
Returns:
Type
string

<inner> LIBMTP_Get_Modelname() → {string}

LIBMTP_Get_Modelname
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
Source:
Returns:
Type
string

<inner> LIBMTP_Get_Secure_Time() → {int}

LIBMTP_Get_Secure_Time Crashes Samsung Galaxy S5.
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
stringPtr
Source:
Returns:
Type
int

<inner> LIBMTP_Get_Serialnumber() → {string}

LIBMTP_Get_Serialnumber
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
Source:
Returns:
Type
string

<inner> LIBMTP_Get_Supported_Filetypes() → {int}

LIBMTP_Get_Supported_Filetypes
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
uint16PtrPtr
uint16Ptr
Source:
Returns:
Type
int

<inner> LIBMTP_Get_Syncpartner() → {string}

LIBMTP_Get_Syncpartner
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
Source:
Returns:
Type
string

<inner> LIBMTP_Get_Track_To_File_Descriptor() → {int}

LIBMTP_Get_Track_To_File_Descriptor
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
uint32
int
LIBMTP_progressfunc_t
voidPtr
Source:
Returns:
Type
int

<inner> LIBMTP_Init() → {void}

LIBMTP_Init
Source:
Returns:
Type
void

<inner> LIBMTP_Open_Raw_Device() → {LIBMTP_mtpdevice_structPtr}

LIBMTP_Open_Raw_Device
Parameters:
Type Description
LIBMTP_raw_device_structPtr
Source:
Returns:
Type
LIBMTP_mtpdevice_structPtr

<inner> LIBMTP_progressfunc_t(sent, total, data) → {int}

The callback type definition. Notice that a progress percentage ratio is easy to calculate by dividing sent by total.
Parameters:
Name Type Description
sent uint64 the number of bytes sent so far
total uint64 the total number of bytes to send
data voidPtr a user-defined dereferencable pointer
Source:
Returns:
if anything else than 0 is returned, the current transfer will be interrupted / cancelled.
Type
int

<inner> LIBMTP_Release_Device() → {void}

LIBMTP_Release_Device
Parameters:
Type Description
LIBMTP_mtpdevice_structPtr
Source:
Returns:
Type
void

<inner> LIBMTP_Set_Debug() → {void}

LIBMTP_Set_Debug
Parameters:
Type Description
int
Source:
Returns:
Type
void