Package com.jitcaforwin.cominterface.resultobject

Examples of com.jitcaforwin.cominterface.resultobject.ResultObject


    return result.getLong();
  }

  // TestTODO
  public long getITObjectPersistentIDLow(IITObject object) {
    ResultObject result = this.iTunesCom.callFunction("ITObjectPersistentIDLow", object.getDispatchObject());
    return result.getLong();
  }
View Full Code Here


      throws DispatchObjectNullException {
    super(o);
  }

  public long getCount() throws ObjectDeletedException{
    try{ResultObject count = this.iTunesCom.callFunction("Count");
    return count.getLong();
    } catch (ITUNES_E_OBJECTDELETED e){
      throw new ObjectDeletedException();
    }
  }
View Full Code Here

  protected DispatchObject itemDispatchObject(long index) throws ObjectDeletedException {
    if (index > this.getCount() || index < 1){
      return null; // Index too high / too low
    }
    ResultObject result = this.iTunesCom.callFunction("Item", (int) index);
    return result.getDispatch();
  }
View Full Code Here

    ResultObject result = this.iTunesCom.callFunction("Item", (int) index);
    return result.getDispatch();
  }

  protected DispatchObject itemByNameDispatchObject(String name) {
    ResultObject result = this.iTunesCom.callFunction("ItemByName", name);
    return result.getDispatch();
  }
View Full Code Here

  protected DispatchObject itemByPersistentIDDispatchObject(long highID,
      long lowID) {
    Object params[] = new Object[2];
    params[0] = new Long(highID);
    params[1] = new Long(lowID);
    ResultObject result = this.iTunesCom.callFunction("ItemByName", params);
    return result.getDispatch();
  }
View Full Code Here

  }

  // 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

    }
  }

  public IITTrackCollection getSelectedTracks() throws WindowDeletedException {
    try {
      ResultObject tracks = this.iTunesCom.callFunction("SelectedTracks");
      return new ITTrackCollectionImpl(tracks.getDispatch());
    } catch (ITUNES_E_OBJECTDELETED e) {
      throw new WindowDeletedException(this);
    } catch (DispatchObjectNullException e) {
      return null;
    }
View Full Code Here

  // TestTODO
  public IITOperationStatus convertFile(File file)
      throws JitcaGeneralException {
    try {
      ResultObject result = this.iTunesCom.callFunction("ConvertFile",
          file.getAbsolutePath());
      DispatchObject dispatch = result.getDispatch();
      return new ITOperationStatusImpl(dispatch);
    } catch (DispatchObjectNullException e) {
      throw new ConvertOperationFailed(file);
    }
  }
View Full Code Here

    try {
      String paths[] = new String[files.length];
      for (int i = 0; i < files.length; i++) {
        paths[i] = files[i].getAbsolutePath();
      }
      ResultObject result = this.iTunesCom.callFunction("ConvertFiles",
          paths);
      DispatchObject dispatch = result.getDispatch();
      return new ITOperationStatusImpl(dispatch);
    } catch (DispatchObjectNullException e) {
      throw new ConvertOperationFailed(
          "Convert operation for several files failed!");
    }
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

TOP

Related Classes of com.jitcaforwin.cominterface.resultobject.ResultObject

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.