Class WebExtension.Download

Object
org.mozilla.geckoview.WebExtension.Download
Enclosing class:
WebExtension

public static class WebExtension.Download extends Object
Represents a download for downloads API Instantiate using WebExtensionController.createDownload(int)
  • Field Details

    • id

      public final int id
      Represents a unique identifier for the downloaded item that is persistent across browser sessions
    • STATE_IN_PROGRESS

      public static final int STATE_IN_PROGRESS
      Download is in progress. Default state
      See Also:
    • STATE_INTERRUPTED

      public static final int STATE_INTERRUPTED
      An error broke the connection with the server.
      See Also:
    • STATE_COMPLETE

      public static final int STATE_COMPLETE
      The download completed successfully.
      See Also:
    • INTERRUPT_REASON_NO_INTERRUPT

      public static final int INTERRUPT_REASON_NO_INTERRUPT
      No interruption.
      See Also:
    • INTERRUPT_REASON_FILE_FAILED

      public static final int INTERRUPT_REASON_FILE_FAILED
      Generic file error.
      See Also:
    • INTERRUPT_REASON_FILE_ACCESS_DENIED

      public static final int INTERRUPT_REASON_FILE_ACCESS_DENIED
      File access denied.
      See Also:
    • INTERRUPT_REASON_FILE_NO_SPACE

      public static final int INTERRUPT_REASON_FILE_NO_SPACE
      Insufficient disk space.
      See Also:
    • INTERRUPT_REASON_FILE_NAME_TOO_LONG

      public static final int INTERRUPT_REASON_FILE_NAME_TOO_LONG
      File name too long.
      See Also:
    • INTERRUPT_REASON_FILE_TOO_LARGE

      public static final int INTERRUPT_REASON_FILE_TOO_LARGE
      File too large.
      See Also:
    • INTERRUPT_REASON_FILE_VIRUS_INFECTED

      public static final int INTERRUPT_REASON_FILE_VIRUS_INFECTED
      File infected by virus.
      See Also:
    • INTERRUPT_REASON_FILE_TRANSIENT_ERROR

      public static final int INTERRUPT_REASON_FILE_TRANSIENT_ERROR
      Transient file error.
      See Also:
    • INTERRUPT_REASON_FILE_BLOCKED

      public static final int INTERRUPT_REASON_FILE_BLOCKED
      File blocked.
      See Also:
    • INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED

      public static final int INTERRUPT_REASON_FILE_SECURITY_CHECK_FAILED
      File security check failed.
      See Also:
    • INTERRUPT_REASON_FILE_TOO_SHORT

      public static final int INTERRUPT_REASON_FILE_TOO_SHORT
      File download too short.
      See Also:
    • INTERRUPT_REASON_NETWORK_FAILED

      public static final int INTERRUPT_REASON_NETWORK_FAILED
      Network request failed.
      See Also:
    • INTERRUPT_REASON_NETWORK_TIMEOUT

      public static final int INTERRUPT_REASON_NETWORK_TIMEOUT
      Network timed out.
      See Also:
    • INTERRUPT_REASON_NETWORK_DISCONNECTED

      public static final int INTERRUPT_REASON_NETWORK_DISCONNECTED
      Network disconnected.
      See Also:
    • INTERRUPT_REASON_NETWORK_SERVER_DOWN

      public static final int INTERRUPT_REASON_NETWORK_SERVER_DOWN
      Server is down.
      See Also:
    • INTERRUPT_REASON_NETWORK_INVALID_REQUEST

      public static final int INTERRUPT_REASON_NETWORK_INVALID_REQUEST
      Invalid network request.
      See Also:
    • INTERRUPT_REASON_SERVER_FAILED

      public static final int INTERRUPT_REASON_SERVER_FAILED
      Server returned a generic error.
      See Also:
    • INTERRUPT_REASON_SERVER_NO_RANGE

      public static final int INTERRUPT_REASON_SERVER_NO_RANGE
      Server does not support range requests.
      See Also:
    • INTERRUPT_REASON_SERVER_BAD_CONTENT

      public static final int INTERRUPT_REASON_SERVER_BAD_CONTENT
      Server returned bad content.
      See Also:
    • INTERRUPT_REASON_SERVER_UNAUTHORIZED

      public static final int INTERRUPT_REASON_SERVER_UNAUTHORIZED
      Server unauthorized request.
      See Also:
    • INTERRUPT_REASON_SERVER_CERT_PROBLEM

      public static final int INTERRUPT_REASON_SERVER_CERT_PROBLEM
      Server certificate problem.
      See Also:
    • INTERRUPT_REASON_SERVER_FORBIDDEN

      public static final int INTERRUPT_REASON_SERVER_FORBIDDEN
      Server forbidden request.
      See Also:
    • INTERRUPT_REASON_USER_CANCELED

      public static final int INTERRUPT_REASON_USER_CANCELED
      Download canceled by user.
      See Also:
    • INTERRUPT_REASON_USER_SHUTDOWN

      public static final int INTERRUPT_REASON_USER_SHUTDOWN
      Download terminated due to user shutdown.
      See Also:
    • INTERRUPT_REASON_CRASH

      public static final int INTERRUPT_REASON_CRASH
      Download interrupted by crash.
      See Also:
  • Constructor Details

    • Download

      protected Download(int id)
      For testing.
      Parameters:
      id - - integer id for the download item
  • Method Details