libitunesdb Reference Manual |
---|
File transfer functions — Transfer files to an iPod
#include <libitunesdb/ipoddb.h> int ipod_transfer_uri (const char *mount_point, const gchar *uri_str, gchar **ipod_filename); gboolean ipod_is_mime_type_supported (const char *mime_type);
This helper function can be used to transfer a file from a local or remote URI to an iPod. The music files need to be put in a special tree structure to be usable from the iPod, this function will handle all of that transparently.
Please note that this function WILL NOT update the iPod database, you need to do it by yourself to get the songs to appear in the iPod user interface. You need to extract the tags from the song being copied somehow, and to add the new song to the iPod database using the iPodDB manipulation functions.
int ipod_transfer_uri (const char *mount_point, const gchar *uri_str, gchar **ipod_filename);
ipod_transfer_uri() will copy uri_str to the iPod mounted at mount_point. If ipod_filename is non NULL, the absolute path to the file which was created on the iPod is stored in it. The copy is done using Gnome-VFS functions, so any URI supported by Gnome-VFS should work.
mount_point : | absolute path where the iPod is mounted. |
uri_str : | URI of the file to copy to the iPod. |
ipod_filename : | absolute path to the file stored on the iPod. |
Returns : | -1 on failure, 0 if all went well. ipod_filename is NULL on failures. |
gboolean ipod_is_mime_type_supported (const char *mime_type);
Tells whether a file with the given mime type can be played back by the iPod or not.
mime_type : | a mime type. |
Returns : | TRUE if the iPod can playback files with this mime type. |
<< iPod Database | iPod detection functions >> |