コード例 #1
0
ファイル: FileTransfer.java プロジェクト: larces/rcsjta
 /**
  * Aborts the file transfer
  *
  * @throws RcsPermissionDeniedException
  * @throws RcsGenericException
  */
 public void abortTransfer() throws RcsPermissionDeniedException, RcsGenericException {
   try {
     mTransferInf.abortTransfer();
   } catch (Exception e) {
     RcsPermissionDeniedException.assertException(e);
     throw new RcsGenericException(e);
   }
 }
コード例 #2
0
ファイル: FileTransfer.java プロジェクト: larces/rcsjta
  /**
   * Returns true if it is possible to pause this file transfer right now, else returns false. If
   * this filetransfer corresponds to a file transfer that is no longer present in the persistent
   * storage false will be returned (this is no error)
   *
   * @return boolean
   * @throws RcsGenericException
   */
  public boolean isAllowedToPauseTransfer() throws RcsGenericException {
    try {
      return mTransferInf.isAllowedToPauseTransfer();

    } catch (Exception e) {
      throw new RcsGenericException(e);
    }
  }
コード例 #3
0
ファイル: FileTransfer.java プロジェクト: larces/rcsjta
  /**
   * Returns the file transfer ID of the file transfer
   *
   * @return String Transfer ID
   * @throws RcsGenericException
   */
  public String getTransferId() throws RcsGenericException {
    try {
      return mTransferInf.getTransferId();

    } catch (Exception e) {
      throw new RcsGenericException(e);
    }
  }
コード例 #4
0
ファイル: FileTransfer.java プロジェクト: larces/rcsjta
  /**
   * Returns true if delivery for this file has expired or false otherwise. Note: false means either
   * that delivery for this file has not yet expired, delivery has been successful, delivery
   * expiration has been cleared (see clearFileTransferDeliveryExpiration) or that this particular
   * file is not eligible for delivery expiration in the first place.
   *
   * @return boolean
   * @throws RcsPersistentStorageException
   * @throws RcsGenericException
   */
  public boolean isExpiredDelivery() throws RcsPersistentStorageException, RcsGenericException {
    try {
      return mTransferInf.isExpiredDelivery();

    } catch (Exception e) {
      RcsPersistentStorageException.assertException(e);
      throw new RcsGenericException(e);
    }
  }
コード例 #5
0
ファイル: FileTransfer.java プロジェクト: larces/rcsjta
  /**
   * Returns the time for when file icon on the content server is no longer valid to download.
   *
   * @return long time in milliseconds or 0 if not applicable or -1 if unknown
   * @throws RcsPersistentStorageException
   * @throws RcsGenericException
   */
  public long getFileIconExpiration() throws RcsPersistentStorageException, RcsGenericException {
    try {
      return mTransferInf.getFileIconExpiration();

    } catch (Exception e) {
      RcsPersistentStorageException.assertException(e);
      throw new RcsGenericException(e);
    }
  }
コード例 #6
0
ファイル: FileTransfer.java プロジェクト: larces/rcsjta
 /**
  * Resend a file transfer which was previously failed. This only for 1-1 file transfer, an
  * exception is thrown in case of a file transfer to group.
  *
  * @throws RcsPermissionDeniedException
  * @throws RcsGenericException
  */
 public void resendTransfer() throws RcsPermissionDeniedException, RcsGenericException {
   try {
     mTransferInf.resendTransfer();
   } catch (Exception e) {
     RcsPermissionDeniedException.assertException(e);
     RcsUnsupportedOperationException.assertException(e);
     throw new RcsGenericException(e);
   }
 }
コード例 #7
0
ファイル: FileTransfer.java プロジェクト: larces/rcsjta
  /**
   * Returns the local timestamp of when the file transfer was displayed for outgoing file transfers
   * or 0 for incoming file transfers or it was not yet displayed
   *
   * @return long
   * @throws RcsPersistentStorageException
   * @throws RcsGenericException
   */
  public long getTimestampDisplayed() throws RcsPersistentStorageException, RcsGenericException {
    try {
      return mTransferInf.getTimestampDisplayed();

    } catch (Exception e) {
      RcsPersistentStorageException.assertException(e);
      throw new RcsGenericException(e);
    }
  }
コード例 #8
0
ファイル: FileTransfer.java プロジェクト: larces/rcsjta
  /**
   * Returns the direction of the transfer
   *
   * @return Direction
   * @see Direction
   * @throws RcsPersistentStorageException
   * @throws RcsGenericException
   */
  public Direction getDirection() throws RcsPersistentStorageException, RcsGenericException {
    try {
      return Direction.valueOf(mTransferInf.getDirection());

    } catch (Exception e) {
      RcsPersistentStorageException.assertException(e);
      throw new RcsGenericException(e);
    }
  }
コード例 #9
0
ファイル: FileTransfer.java プロジェクト: larces/rcsjta
  /**
   * Returns the reason code of the state of the sharing
   *
   * @return ReasonCode
   * @see ReasonCode
   * @see FileTransfer.ReasonCode
   * @throws RcsPersistentStorageException
   * @throws RcsGenericException
   */
  public ReasonCode getReasonCode() throws RcsPersistentStorageException, RcsGenericException {
    try {
      return ReasonCode.valueOf(mTransferInf.getReasonCode());

    } catch (Exception e) {
      RcsPersistentStorageException.assertException(e);
      throw new RcsGenericException(e);
    }
  }
コード例 #10
0
ファイル: FileTransfer.java プロジェクト: larces/rcsjta
  /**
   * Returns the MIME type of the file to be transferred
   *
   * @return String Type
   * @throws RcsPersistentStorageException
   * @throws RcsGenericException
   */
  public String getMimeType() throws RcsPersistentStorageException, RcsGenericException {
    try {
      return mTransferInf.getMimeType();

    } catch (Exception e) {
      RcsPersistentStorageException.assertException(e);
      throw new RcsGenericException(e);
    }
  }
コード例 #11
0
ファイル: FileTransfer.java プロジェクト: larces/rcsjta
  /**
   * Returns the remote contact identifier
   *
   * @return ContactId
   * @throws RcsPersistentStorageException
   * @throws RcsGenericException
   */
  public ContactId getRemoteContact() throws RcsPersistentStorageException, RcsGenericException {
    try {
      return mTransferInf.getRemoteContact();

    } catch (Exception e) {
      RcsPersistentStorageException.assertException(e);
      throw new RcsGenericException(e);
    }
  }
コード例 #12
0
ファイル: FileTransfer.java プロジェクト: larces/rcsjta
  /**
   * Returns whether you can resend the transfer.
   *
   * @return boolean
   * @throws RcsPersistentStorageException
   * @throws RcsGenericException
   */
  public boolean isAllowedToResendTransfer()
      throws RcsPersistentStorageException, RcsGenericException {
    try {
      return mTransferInf.isAllowedToResendTransfer();

    } catch (Exception e) {
      RcsPersistentStorageException.assertException(e);
      throw new RcsGenericException(e);
    }
  }
コード例 #13
0
ファイル: FileTransfer.java プロジェクト: larces/rcsjta
 /**
  * Resumes the file transfer
  *
  * @throws RcsPermissionDeniedException
  * @throws RcsPersistentStorageException
  * @throws RcsGenericException
  */
 public void resumeTransfer()
     throws RcsPermissionDeniedException, RcsPersistentStorageException, RcsGenericException {
   try {
     mTransferInf.resumeTransfer();
   } catch (Exception e) {
     RcsPermissionDeniedException.assertException(e);
     RcsPersistentStorageException.assertException(e);
     throw new RcsGenericException(e);
   }
 }
コード例 #14
0
ファイル: FileTransfer.java プロジェクト: larces/rcsjta
 /**
  * Rejects file transfer invitation
  *
  * @throws RcsPersistentStorageException
  * @throws RcsPermissionDeniedException
  * @throws RcsGenericException
  */
 public void rejectInvitation()
     throws RcsPersistentStorageException, RcsPermissionDeniedException, RcsGenericException {
   try {
     mTransferInf.rejectInvitation();
   } catch (Exception e) {
     RcsUnsupportedOperationException.assertException(e);
     RcsPersistentStorageException.assertException(e);
     RcsPermissionDeniedException.assertException(e);
     throw new RcsGenericException(e);
   }
 }