Interface nsICacheEntryOpenCallbackType

Hierarchy

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Callback giving actual result of asyncOpenURI. It may give consumer the cache entry or a failure result when it's not possible to open it from some reason. This callback is ensured to be called on the same thread on which asyncOpenURI has been called.

    IMPORTANT NOTE: This callback may be invoked sooner then respective asyncOpenURI call exits.

    Parameters

    • aEntry: nsICacheEntry

      The entry bound to the originally requested URI.

    • aNew: boolean

      Whether no data so far has been stored for this entry, i.e. reading it will just fail. When aNew is true, a server request should be made and data stored to this new entry.

    • aResult: number

      Result of the request. This may be a failure only when one of these issues occur:

      • the cache storage service could not be started due to some unexpected faulure
      • there is not enough disk space to create new entries

    Returns void

  • Callback to perform any validity checks before the entry should be used. Called before onCacheEntryAvailable callback, depending on the result it may be called more then one time.

    This callback is ensured to be called on the same thread on which asyncOpenURI has been called, unless nsICacheStorage.CHECK_MULTITHREADED flag has been specified. In that case this callback can be invoked on any thread, usually it is the cache I/O or cache management thread.

    IMPORTANT NOTE: This callback may be invoked sooner then respective asyncOpenURI call exits.

    Returns

    State of the entry, see the constants just above.

    Parameters

    • aEntry: nsICacheEntry

      An entry to examine. Consumer has a chance to decide whether the entry is valid or not.

    Returns number

Generated using TypeDoc