summaryrefslogtreecommitdiffstats
path: root/src/itdb.h
diff options
context:
space:
mode:
authorJorg Schuler <jcsjcs@users.sourceforge.net>2007-05-06 15:00:03 +0000
committerJorg Schuler <jcsjcs@users.sourceforge.net>2007-05-06 15:00:03 +0000
commited1a636d722b8195013f890ea7e86e3439c3c6b9 (patch)
treeb93fee84cb706d537fe92d084ac80663d808338d /src/itdb.h
parented49ab8fb85375b277b97c6025aaad2d55186d1b (diff)
downloadlibgpod-ed1a636d722b8195013f890ea7e86e3439c3c6b9.tar.gz
libgpod-ed1a636d722b8195013f890ea7e86e3439c3c6b9.tar.xz
libgpod-ed1a636d722b8195013f890ea7e86e3439c3c6b9.zip
* src/itdb_itunesdb.c
src/itdb_device.c src/itdb_private.h src/itdb.h: New API functions to facilitate copying to the iPod in a background thread and implementation of own copying code. itdb_cp_get_dest_filename(): obtain a valid filename on the iPod to where a track can be copied. This function can be used in a thread-safe way. itdb_cp_finalize(): to be called after the track was copied to the iPod to update some fields in the Itdb_Track structure. This function can also be used in a thread-safe way. You can use the already existing function itdb_cp() to copy a track to the iPod and itdb_cp_track_to_ipod() remains available unchanged in functionality. git-svn-id: https://gtkpod.svn.sf.net/svnroot/gtkpod/libgpod/trunk@1426 f01d2545-417e-4e96-918e-98f8d0dbbcb6
Diffstat (limited to 'src/itdb.h')
-rw-r--r--src/itdb.h22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/itdb.h b/src/itdb.h
index 6bb6c45..9a33bcb 100644
--- a/src/itdb.h
+++ b/src/itdb.h
@@ -968,11 +968,11 @@ struct _Itdb_Track
\* ------------------------------------------------------------ */
typedef enum
{
- ITDB_FILE_ERROR_SEEK, /* file corrupt: illegal seek occured */
- ITDB_FILE_ERROR_CORRUPT, /* file corrupt */
- ITDB_FILE_ERROR_NOTFOUND, /* file not found */
- ITDB_FILE_ERROR_RENAME, /* file could not be renamed */
- ITDB_FILE_ERROR_ITDB_CORRUPT /* iTunesDB in memory corrupt */
+ ITDB_FILE_ERROR_SEEK, /* file corrupt: illegal seek occured */
+ ITDB_FILE_ERROR_CORRUPT, /* file corrupt */
+ ITDB_FILE_ERROR_NOTFOUND, /* file not found */
+ ITDB_FILE_ERROR_RENAME, /* file could not be renamed */
+ ITDB_FILE_ERROR_ITDB_CORRUPT /* iTunesDB in memory corrupt */
} ItdbFileError;
@@ -1008,10 +1008,18 @@ gint itdb_musicdirs_number (Itdb_iTunesDB *itdb);
gchar *itdb_resolve_path (const gchar *root,
const gchar * const * components);
gboolean itdb_rename_files (const gchar *mp, GError **error);
-gboolean itdb_cp_track_to_ipod (Itdb_Track *track,
- const gchar *filename, GError **error);
+gchar *itdb_cp_get_dest_filename (Itdb_Track *track,
+ const gchar *mountpoint,
+ const gchar *filename,
+ GError **error);
gboolean itdb_cp (const gchar *from_file, const gchar *to_file,
GError **error);
+Itdb_Track *itdb_cp_finalize (Itdb_Track *track,
+ const gchar *mountpoint,
+ const gchar *dest_filename,
+ GError **error);
+gboolean itdb_cp_track_to_ipod (Itdb_Track *track,
+ const gchar *filename, GError **error);
void itdb_filename_fs2ipod (gchar *filename);
void itdb_filename_ipod2fs (gchar *ipod_file);
gchar *itdb_filename_on_ipod (Itdb_Track *track);