WARNING: Most of this content (with the exception of the Mozilla 1.9 XPCOM reference) is very old, and can be expected to be out of date and possibly obsolete. For better XUL documentation, please visit the XUL hub at the Mozilla Developer Center.

@mozilla.org/browser/nav-history-service;1

This component implements the following interfaces:

Constants

This transition type means the user followed a link and got a new toplevel window.
PRUint32 nsINavHistoryService.TRANSITION_LINK = 1
This transition type means that the user typed the page's URL in the URL bar or selected it from URL bar autocomplete results, clicked on it from a history query (from the History sidebar, History menu, or history query in the personal toolbar or Places organizer.
PRUint32 nsINavHistoryService.TRANSITION_TYPED = 2
This transition is set when the user followed a bookmark to get to the page.
PRUint32 nsINavHistoryService.TRANSITION_BOOKMARK = 3
This transition type is set when some inner content is loaded. This is true of all images on a page, and the contents of the iframe. It is also true of any content in a frame, regardless if whether or not the user clicked something to get there.
PRUint32 nsINavHistoryService.TRANSITION_EMBED = 4
Set when the transition was a permanent redirect.
PRUint32 nsINavHistoryService.TRANSITION_REDIRECT_PERMANENT = 5
Set when the transition was a temporary redirect.
PRUint32 nsINavHistoryService.TRANSITION_REDIRECT_TEMPORARY = 6
Set when the transition is a download.
PRUint32 nsINavHistoryService.TRANSITION_DOWNLOAD = 7

Properties

readonly PRUint32 nsIBrowserHistory.count

Count The number of entries in global history

readonly PRBool nsINavHistoryService.hasHistoryEntries

True if there is any history. This can be used in UI to determine whether the "clear history" button should be enabled or not. This is much better than using BrowserHistory.count since that can be very slow if there is a lot of history (it must enumerate each item). This is pretty fast.

readonly PRBool nsINavHistoryService.historyDisabled

True if history is disabled. currently, history is disabled if the browser.history_expire_days pref is 0

readonly AUTF8String nsIBrowserHistory.lastPageVisited

LastPageVisited The last page that was visited in a top-level window.

Methods

InterfaceMethod
nsIGlobalHistory3 void addDocumentRedirect ( nsIChannel oldChannel , nsIChannel newChannel , PRInt32 flags , PRBool topLevel )
nsIDownloadHistory void addDownload ( nsIURI source , nsIURI referrer , PRTime startTime )
nsINavHistoryService void addObserver ( nsINavHistoryObserver observer , PRBool ownsWeak )
nsIGlobalHistory2 void addURI ( nsIURI URI , PRBool redirect , PRBool toplevel , nsIURI referrer )
nsINavHistoryService PRInt64 addVisit ( nsIURI URI , PRTime time , nsIURI referringURI , PRInt32 transitionType , PRBool isRedirect , PRInt64 sessionID )
nsINavHistoryService PRBool canAddURI ( nsIURI URI )
nsINavHistoryService nsINavHistoryResult executeQueries ( nsINavHistoryQuery queries , PRUint32 queryCount , nsINavHistoryQueryOptions options )
nsINavHistoryService nsINavHistoryResult executeQuery ( nsINavHistoryQuery query , nsINavHistoryQueryOptions options )
nsINavHistoryService nsINavHistoryQuery getNewQuery ( )
nsINavHistoryService nsINavHistoryQueryOptions getNewQueryOptions ( )
nsINavHistoryService AString getPageTitle ( nsIURI URI )
nsIGlobalHistory3 PRUint32 getURIGeckoFlags ( nsIURI URI )
nsISupportsWeakReference nsIWeakReference GetWeakReference ( )
nsIBrowserHistory void hidePage ( nsIURI URI )
nsINavHistoryService void importHistory ( nsIFile file )
nsIGlobalHistory2 PRBool isVisited ( nsIURI URI )
nsINavHistoryService void markPageAsFollowedBookmark ( nsIURI URI )
nsIBrowserHistory void markPageAsTyped ( nsIURI URI )
nsIObserver void observe ( nsISupports subject , char* topic , PRUnichar* data )
nsIAutoCompleteSimpleResultListener void onValueRemoved ( nsIAutoCompleteSimpleResult result , AString value , PRBool removeFromDb )
nsINavHistoryService AUTF8String queriesToQueryString ( nsINavHistoryQuery queries , PRUint32 queryCount , nsINavHistoryQueryOptions options )
nsINavHistoryService void queryStringToQueries ( AUTF8String queryString , out nsINavHistoryQuery queries , out PRUint32 resultCount , out nsINavHistoryQueryOptions options )
nsIBrowserHistory void removeAllPages ( )
nsINavHistoryService void removeObserver ( nsINavHistoryObserver observer )
nsIBrowserHistory void removePage ( nsIURI URI )
nsIBrowserHistory void removePagesFromHost ( AUTF8String host , PRBool entireDomain )
nsINavHistoryService void runInBatchMode ( nsINavHistoryBatchCallback callback , nsISupports closure )
nsINavHistoryService void setPageDetails ( nsIURI URI , AString title , PRUint32 visitCount , PRBool hidden , PRBool typed )
nsIGlobalHistory2 void setPageTitle ( nsIURI URI , AString title )
nsIGlobalHistory3 void setURIGeckoFlags ( nsIURI URI , PRUint32 flags )
nsIAutoCompleteSearch void startSearch ( AString searchString , AString searchParam , nsIAutoCompleteResult previousResult , nsIAutoCompleteObserver listener )
nsIAutoCompleteSearch void stopSearch ( )

Reference documentation is generated from Mozilla's source.

Copyright © 1999-2006 XULPlanet.com