4
public class BeatBox.iPodDevice : GLib.Object, BeatBox.Device {
11
public iPodDevice(LibraryManager lm, Mount mount) {
13
icon = mount.get_icon();
16
public bool initialize() {
18
db = iTunesDB.parse(get_path());
21
stdout.printf("Error parsing db at %s: %s\n", get_path(), err.message);
25
var trToSo = new LinkedList<Song>();
28
for(int i = 0; i < db.tracks.length(); ++i) {
29
trToSo.add(new Song.from_track(db.tracks.nth_data(i)));
32
lm.add_songs(trToSo, false);
34
foreach(var s in tSongs)
37
d.device_unmounted.connect( () => {
38
foreach(Song s in tSongs) {
39
s.unique_status_image = null;
40
lm.update_songs(tSongs, false);
48
return mount.get_default_location().get_parse_name().has_prefix("afc://");
51
public string getContentType() {
58
public string getDisplayName() {
59
return mount.get_name();
62
public void set_mount(Mount mount) {
66
public Mount get_mount() {
70
public string get_path() {
71
return mount.get_default_location().get_path();
74
public void set_icon(GLib.Icon icon) {
78
public GLib.Icon get_icon() {
82
public int64 get_capacity() {
86
public int64 get_used_space() {
90
public int64 get_free_space() {
94
public void unmount() {
102
public void get_device_type() {