Package com.jitcaforwin.basic.api

Examples of com.jitcaforwin.basic.api.IITTrack


  // TestTODO
  public IITTrack addTrack(IITTrack trackToAdd) throws JitcaTrackException, PlaylistDeletedException, PlaylistReadOnlyException {
    try {
      ResultObject result = this.iTunesCom.callFunction("AddTrack", trackToAdd.getDispatchObject());
      IITTrack track = ITTrackImpl.create(result.getDispatch());
      if (track == null) {
        throw new JitcaTrackException("Error occured during addTrack. Track could not be added.");
      }
      return track;
    } catch (ITUNES_E_OBJECTDELETED e) {
View Full Code Here


  // TestTODO
  public IITTrack addTrack(IITTrack trackToAdd) throws JitcaGeneralException {
    ResultObject result = this.iTunesCom.callFunction("AddTrack",
        trackToAdd.getDispatchObject());
    IITTrack track = ITTrackImpl.newIITTrack(result.getDispatch());
    if (track == null) {
      throw new JitcaGeneralException(
          "Error occured during addTrack. Track could not be added.");
    }
    return track;
View Full Code Here

    this.listener = listener;
  }
 
  public void OnPlayerPlayEvent(Variant args[]) {
    try {
      IITTrack track = this.getTrack(args);
      this.listener.onPlayerPlayEvent(track);
    } catch (Exception ex) {
      this.handleException(ex);
    }
  }
View Full Code Here

    }
  }

  public void OnPlayerStopEvent(Variant args[]) {
    try {
      IITTrack track = this.getTrack(args);
      this.listener.onPlayerStopEvent(track);
    } catch (Exception ex) {
      this.handleException(ex);
    }
  }
View Full Code Here

    }
  }

  public void OnPlayerPlayingTrackChangedEvent(Variant args[]) {
    try {
      IITTrack track = this.getTrack(args);
      this.listener.onPlayerPlayingTrackChangedEvent(track);
    } catch (Exception ex) {
      this.handleException(ex);
    }
  }
View Full Code Here

public class CurrentTrackDemo {

  public static void main(String args[]) {
    try {
      IiTunes iTunes = new iTunesApp();
      IITTrack track = iTunes.getCurrentTrack();

      if (track == null) {
        System.out.println("Currently no track played!");
      } else {
        System.out.println(track.getName() + " by " + track.getArtist()
            + " is currently played. \n");
        ;
      }

      iTunes.close();
View Full Code Here

        boolean hasNext = true;
        int i = 1;

        while (hasNext) {
          IITTrack track = selectedTracks.item(i);
          if (track == null) {
            hasNext = false;
          } else {
            System.out.println(track.getName() + " by "
                + track.getArtist() + " added to playlist.");
            newPlaylist.addTrack(track);
            i++;
          }
        }
View Full Code Here

    this.listener = listener;
  }
 
  public void OnPlayerPlayEvent(Variant args[]) {
    try {
      IITTrack track = this.getTrack(args);
      this.listener.onPlayerPlayEvent(track);
    } catch (Exception ex) {
      this.handleException(ex);
    }
  }
View Full Code Here

    }
  }

  public void OnPlayerStopEvent(Variant args[]) {
    try {
      IITTrack track = this.getTrack(args);
      this.listener.onPlayerStopEvent(track);
    } catch (Exception ex) {
      this.handleException(ex);
    }
  }
View Full Code Here

    }
  }

  public void OnPlayerPlayingTrackChangedEvent(Variant args[]) {
    try {
      IITTrack track = this.getTrack(args);
      this.listener.onPlayerPlayingTrackChangedEvent(track);
    } catch (Exception ex) {
      this.handleException(ex);
    }
  }
View Full Code Here

TOP

Related Classes of com.jitcaforwin.basic.api.IITTrack

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.