Interface nsINavHistoryServiceType

Hierarchy

Properties

DBConnection: mozIStorageConnection

The database connection used by Places.

connectionShutdownClient: nsIAsyncShutdownClient

Hook for internal clients who need to perform actions just before the connection gets closed. May be null if it's too late to get one.

databaseStatus: number

Returns the current database status

historyDisabled: boolean

True if history is disabled. currently, history is disabled if the places.history.enabled pref is false.

isFrecencyDecaying: boolean

Whether frecency is in the process of being decayed. The value can also be read through the is_frecency_decaying() SQL function exposed by Places database connections.

shouldStartFrecencyRecalculation: boolean

This is set to true when a frecency is invalidated and set back to false when all the outdated values have been recalculated.

shutdownClient: nsIAsyncShutdownClient

Hook for clients who need to perform actions during/by the end of the shutdown of the database. May be null if it's too late to get one.

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

  • Asynchronously executes the statement created from a query.

    See

    nsINavHistoryService::executeQuery

    Note

    THIS IS A TEMPORARY API. Don't rely on it, since it will be replaced in future versions by a real async querying API.

    Note

    Results obtained from this method differ from results obtained from executeQuery, because there is additional filtering and sorting done by the latter. Thus you should use executeQuery, unless you are absolutely sure that the returned results are fine for your use-case.

    Parameters

    • aQuery: nsINavHistoryQuery
    • aOptions: nsINavHistoryQueryOptions
    • aCallback: mozIStorageStatementCallback

    Returns mozIStoragePendingStatement

  • Returns true if this URI would be added to the history. You don't have to worry about calling this, adding a visit will always check before actually adding the page. This function is public because some components may want to check if this page would go in the history (i.e. for annotations).

    Parameters

    • aURI: nsIURI

    Returns boolean

  • Executes a single query.

    Parameters

    • aQuery: nsINavHistoryQuery
    • options: nsINavHistoryQueryOptions

    Returns nsINavHistoryResult

  • This returns a new query object that you can pass to executeQuer[y/ies]. It will be initialized to all empty (so using it will give you all history).

    Returns nsINavHistoryQuery

  • This returns a new options object that you can pass to executeQuer[y/ies] after setting the desired options.

    Returns nsINavHistoryQueryOptions

  • Returns a 48-bit hash for a URI spec.

    Parameters

    • aSpec: string

      The URI spec to hash.

    • aMode: string

      The hash mode: "" (default), "prefix_lo", or "prefix_hi".

    Returns number

  • Generate a guid. Guids can be used for any places purposes (history, bookmarks, etc.) Returns null if the generation of the guid failed.

    Returns string

  • This is just like markPageAsTyped (in nsIBrowserHistory, also implemented by the history service), but for bookmarks. It declares that the given URI is being opened as a result of following a bookmark. If this URI is loaded soon after this message has been received, that transition will be marked as following a bookmark.

    Parameters

    • aURI: nsIURI

    Returns void

  • Designates the url as coming from a link explicitly followed by the user (for example by clicking on it).

    Parameters

    • aURI: nsIURI

      URI of the page to be marked.

    Returns void

  • Designates the url as having been explicitly typed in by the user.

    Parameters

    • aURI: nsIURI

      URI of the page to be marked.

    Returns void

  • Converts a query URI-like string to a query object.

    Parameters

    • aQueryString: string
    • aQuery: nsINavHistoryQuery
    • options: nsINavHistoryQueryOptions

    Returns void

  • Converts a query into an equivalent string that can be persisted. Inverse of queryStringToQuery()

    Parameters

    • aQuery: nsINavHistoryQuery
    • options: nsINavHistoryQueryOptions

    Returns string

  • Resets and recalculates the origin frecency statistics that are kept in the moz_meta table.

    Parameters

    • aCallback: nsIObserver

      Called when the recalculation is complete. The arguments passed to the observer are not defined.

    Returns void

Generated using TypeDoc