libmtp  1.1.6
Functions
The object management API.

Functions

int LIBMTP_Delete_Object (LIBMTP_mtpdevice_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)
 

Detailed Description

Function Documentation

int LIBMTP_Delete_Object ( LIBMTP_mtpdevice_t device,
uint32_t  object_id 
)

This function deletes a single file, track, playlist, folder or any other object off the MTP device, identified by the object ID.

If you delete a folder, there is no guarantee that the device will really delete all the files that were in that folder, rather it is expected that they will not be deleted, and will turn up in object listings with parent set to a non-existant object ID. The safe way to do this is to recursively delete all files (and folders) contained in the folder, then the folder itself.

Parameters
devicea pointer to the device to delete the object from.
object_idthe object to delete.
Returns
0 on success, any other value means failure.

References LIBMTP_mtpdevice_struct::params.

int LIBMTP_Set_Object_Filename ( LIBMTP_mtpdevice_t device,
uint32_t  object_id,
char *  newname 
)