예제 #1
0
 protected override void Destroy()
 {
     if (!Borrowed)
     {
         Itdb_iTunesDB.itdb_free(Handle);
     }
 }
예제 #2
0
        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);
        }
예제 #3
0
        public bool Write()
        {
            IntPtr gerror;
            bool   res = Itdb_iTunesDB.itdb_write(Handle, out gerror);

            if (gerror != IntPtr.Zero)
            {
                throw new GException(gerror);
            }
            return(res);
        }
예제 #4
0
        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);
        }
예제 #5
0
        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);
        }
예제 #6
0
        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);
        }
예제 #7
0
 public bool StopSync()
 {
     return(Itdb_iTunesDB.itdb_stop_sync(Native));
 }
예제 #8
0
 public bool StartSync()
 {
     return(Itdb_iTunesDB.itdb_start_sync(Native));
 }
예제 #9
0
 public ITDB()                                   : base(Itdb_iTunesDB.itdb_new(), false)
 {
 }
예제 #10
0
 public static string GetMusicPath(Device device)
 {
     return(Itdb_iTunesDB.itdb_get_music_dir(device.Mountpoint));
 }
예제 #11
0
 public static string GetControlPath(Device device)
 {
     return(Itdb_iTunesDB.itdb_get_control_dir(device.Mountpoint));
 }
예제 #12
0
 protected override void DoUnlink(int index)
 {
     Itdb_iTunesDB.itdb_playlist_unlink(this[index].Handle);
 }
예제 #13
0
 protected override void DoAdd(int index, Playlist item)
 {
     Itdb_iTunesDB.itdb_playlist_add(this.handle, item.Handle, index);
 }
예제 #14
0
 protected override void DoAdd(int index, Track item)
 {
     Itdb_iTunesDB.itdb_track_add(this.handle, item.Handle, index);
 }