protected override void Destroy() { if (!Borrowed) { Itdb_iTunesDB.itdb_free(Handle); } }
private static IntPtr itdb_parse_wrapped(string mountpoint) { IntPtr gerror; IntPtr retval = Itdb_iTunesDB.itdb_parse(mountpoint, out gerror); if (gerror != IntPtr.Zero) { throw new GException(gerror); } return(retval); }
public bool Write() { IntPtr gerror; bool res = Itdb_iTunesDB.itdb_write(Handle, out gerror); if (gerror != IntPtr.Zero) { throw new GException(gerror); } return(res); }
public bool CopyTrackToIPod(Track track, string localPath) { IntPtr gerror = IntPtr.Zero; bool result = Itdb_iTunesDB.itdb_cp_track_to_ipod(track.Handle, localPath, ref gerror); if (gerror != IntPtr.Zero) { throw new GException(gerror); } return(result); }
public static bool InitIpod(string mountpoint, string model_number, string ipod_name) { IntPtr gerror; bool res = Itdb_iTunesDB.itdb_init_ipod(mountpoint, model_number, ipod_name, out gerror); if (gerror != IntPtr.Zero) { throw new GException(gerror); } return(res); }
public static string GetDestFileName(Device device, string localFile) { // itdb_cp_get_dest_filename(HandleRef track, string mountpoint, string filename, ref IntPtr error); IntPtr error = IntPtr.Zero; string result = Itdb_iTunesDB.itdb_cp_get_dest_filename(IntPtr.Zero, device.Mountpoint, localFile, ref error); if (error != IntPtr.Zero) { throw new GException(error); } return(result); }
public bool StopSync() { return(Itdb_iTunesDB.itdb_stop_sync(Native)); }
public bool StartSync() { return(Itdb_iTunesDB.itdb_start_sync(Native)); }
public ITDB() : base(Itdb_iTunesDB.itdb_new(), false) { }
public static string GetMusicPath(Device device) { return(Itdb_iTunesDB.itdb_get_music_dir(device.Mountpoint)); }
public static string GetControlPath(Device device) { return(Itdb_iTunesDB.itdb_get_control_dir(device.Mountpoint)); }
protected override void DoUnlink(int index) { Itdb_iTunesDB.itdb_playlist_unlink(this[index].Handle); }
protected override void DoAdd(int index, Playlist item) { Itdb_iTunesDB.itdb_playlist_add(this.handle, item.Handle, index); }
protected override void DoAdd(int index, Track item) { Itdb_iTunesDB.itdb_track_add(this.handle, item.Handle, index); }