00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #ifndef __IPOD_H__
00023 #define __IPOD_H__
00024
00025 #include <ipod/ipod_file_utils.h>
00026
00027 #ifdef __cplusplus
00028 extern "C" {
00029 #endif
00030
00035 typedef void *ipod_t;
00036 typedef void *ipod_track_t;
00037 typedef void *ipod_playlist_t;
00038 typedef void *ipod_track_item_t;
00039 typedef void *ipod_eq_preset_t;
00052 extern int ipod_discover(char ***path_array);
00053
00059 extern ipod_t ipod_new(const char *path);
00060
00065 extern void ipod_flush(ipod_t ipod);
00066
00071 extern void ipod_free(ipod_t ipod);
00072
00078 extern uint32_t ipod_version(ipod_t ipod);
00079
00086 extern void ipod_disk_usage(ipod_t ipod, uint64_t *total, uint64_t *free);
00087
00088
00089
00090
00091
00092
00093
00099 extern unsigned int ipod_track_count(ipod_t ipod);
00100
00107 extern ipod_track_t ipod_track_get_by_index(ipod_t ipod, unsigned int index);
00108
00115 extern ipod_track_t ipod_track_get_by_track_id(ipod_t ipod, uint32_t track_id);
00116
00124 extern void ipod_track_free(ipod_track_t track);
00125
00134 extern ipod_track_t ipod_track_add(ipod_t ipod);
00135
00149 extern ipod_track_t ipod_track_add_from(ipod_t ipod, const char *filePath);
00150
00158 extern void ipod_track_remove(ipod_track_t track);
00159
00176 extern char *ipod_track_get_text(ipod_track_t track,int tag,char *s);
00177
00188 extern void ipod_track_set_text(ipod_track_t track,int tag, const char *s);
00189
00196 extern int ipod_track_has_text(ipod_track_t track, int tag);
00197
00204 extern uint32_t ipod_track_get_attribute(ipod_track_t track, int tag);
00205
00212 extern void ipod_track_set_attribute(ipod_track_t track, int tag, uint32_t value);
00213
00221 extern void ipod_track_upload(ipod_track_t track,const char *filePath,ipod_file_transfer_func callback,void *userData);
00222
00230 extern void ipod_track_download(ipod_track_t track,const char *filePath,ipod_file_transfer_func callback,void *userData);
00231
00232
00233
00234
00235
00236
00237
00243 extern unsigned int ipod_playlist_count(ipod_t ipod);
00244
00251 extern ipod_playlist_t ipod_playlist_get_by_index(ipod_t ipod, unsigned int index);
00252
00260 extern void ipod_playlist_free(ipod_playlist_t playlist);
00261
00270 extern ipod_playlist_t ipod_playlist_add(ipod_t ipod);
00271
00276 extern void ipod_playlist_remove(ipod_playlist_t playlist);
00277
00294 extern char *ipod_playlist_get_text(ipod_playlist_t playlist,int tag,char *s);
00295
00306 extern void ipod_playlist_set_text(ipod_playlist_t playlist,int tag,const char *s);
00307
00314 extern int ipod_playlist_has_text(ipod_playlist_t playlist, int tag);
00315
00322 extern uint32_t ipod_playlist_get_attribute(ipod_playlist_t playlist, int tag);
00323
00330 extern void ipod_playlist_set_attribute(ipod_playlist_t playlist, int tag, uint32_t value);
00331
00332
00333
00334
00335
00336
00337
00343 extern unsigned int ipod_track_item_count(ipod_playlist_t playlist);
00344
00351 extern ipod_track_item_t ipod_track_item_get_by_index(ipod_playlist_t playlist, unsigned int index);
00352
00360 extern void ipod_track_item_free(ipod_track_item_t trackItem);
00361
00370 extern ipod_track_item_t ipod_track_item_add(ipod_playlist_t playlist);
00371
00376 extern void ipod_track_item_remove(ipod_track_item_t trackItem);
00377
00384 extern uint32_t ipod_track_item_get_attribute(ipod_track_item_t trackItem, int tag);
00385
00392 extern void ipod_track_item_set_attribute(ipod_track_item_t trackItem, int tag, uint32_t value);
00393
00394
00395
00396
00397
00398
00399
00405 extern unsigned int ipod_eq_preset_count(ipod_t ipod);
00406
00413 extern ipod_eq_preset_t ipod_eq_preset_get_by_index(ipod_t ipod, unsigned int index);
00414
00422 extern void ipod_eq_preset_free(ipod_eq_preset_t preset);
00423
00432 extern ipod_eq_preset_t ipod_eq_preset_add(ipod_t ipod);
00433
00438 extern void ipod_eq_preset_remove(ipod_eq_preset_t preset);
00439
00456 extern char *ipod_eq_preset_get_text(ipod_eq_preset_t preset,int tag,char *s);
00457
00468 extern void ipod_eq_preset_set_text(ipod_eq_preset_t preset,int tag,const char *s);
00469
00476 extern int ipod_eq_preset_has_text(ipod_eq_preset_t preset, int tag);
00477
00484 extern int32_t ipod_eq_preset_get_attribute(ipod_eq_preset_t preset, int tag);
00485
00492 extern void ipod_eq_preset_set_attribute(ipod_eq_preset_t preset, int tag, int32_t value);
00493
00494
00495
00496
00497
00498
00499
00500
00501
00504 extern void ipod_report(void);
00505
00506 #ifdef __cplusplus
00507 };
00508 #endif
00509
00510 #endif