Interface FileBoxItem


public interface FileBoxItem
  • Method Details

    • getId

      long getId()
      Returns:
      the unique id of this item in the file box.
    • getFileName

      String getFileName()
      Returns:
      the name of the file including its extension.
      See Also:
    • getFilePath

      String getFilePath()
      Returns:
      the full file path if the file is available locally (own file or downloaded) else just the file name including its extension.
      See Also:
    • getSizeInBytes

      long getSizeInBytes()
      Returns:
      the file size of this item in bytes.
    • isOwnItem

      boolean isOwnItem()
      Returns:
      true if this item was added to the file box by us, else false.
    • getState

      FileBoxItem.State getState()
      Returns:
      the current FileBoxItem.State of this item.
    • addStateChangeCallback

      void addStateChangeCallback(FileBoxItem.StateChangeCallback callback)
      Register a FileBoxItem.StateChangeCallback instance that receives state changes callbacks.
      Parameters:
      callback - The callback instance to register.
    • removeStateChangeCallback

      void removeStateChangeCallback(FileBoxItem.StateChangeCallback callback)
      Unregister a FileBoxItem.StateChangeCallback previously registered with addStateChangeCallback(). It will not receive any further callbacks.
      Parameters:
      callback - The callback instance to unregister.
    • addTransferProgressCallback

      void addTransferProgressCallback(FileBoxItem.TransferProgressCallback callback)
      Register a FileBoxItem.TransferProgressCallback instance that receives file item transfer progress callbacks.
      Parameters:
      callback - The callback instance to register.
    • removeTransferProgressCallback

      void removeTransferProgressCallback(FileBoxItem.TransferProgressCallback callback)
      Unregister a FileBoxItem.TransferProgressCallback previously registered with addTransferProgressCallback(). It will not receive any further callbacks.
      Parameters:
      callback - The callback instance to unregister.
    • startDownload

      void startDownload()
      Starts downloading the item to an app-local location. If you want to specify the download location use the startDownload(String) method.
      See Also:
    • startDownload

      void startDownload(String savePath)
      Starts downloading the item to a given path.
      Has no effect if called while the item is not in State READY_TO_DOWNLOAD.
      Parameters:
      savePath - The path where the item will be downloaded to. If it's null or empty an app-local location will be used.
      See Also:
    • cancelDownload

      void cancelDownload()
      Cancels a running download.
      Has no effect if called while the item is not in State TRANSFER_IN_PROGRESS.
    • removeItem

      void removeItem()
      Removes this item from the file box. Doesn't remove it locally!
      Has no effect if the item was not added by us.
      See Also: