import "nsINavHistoryService.idl";
Public Member Functions | |
| AString | getPageTitle (in nsIURI aURI) |
| void | markPageAsFollowedBookmark (in nsIURI aURI) |
| AString | getCharsetForURI (in nsIURI aURI) |
| void | setCharsetForURI (in nsIURI aURI, in AString aCharset) |
| boolean | canAddURI (in nsIURI aURI) |
| long long | addVisit (in nsIURI aURI, in PRTime aTime, in nsIURI aReferringURI, in long aTransitionType, in boolean aIsRedirect, in long long aSessionID) |
| nsINavHistoryQuery | getNewQuery () |
| nsINavHistoryQueryOptions | getNewQueryOptions () |
| nsINavHistoryResult | executeQuery (in nsINavHistoryQuery aQuery, in nsINavHistoryQueryOptions options) |
| nsINavHistoryResult | executeQueries ([array, size_is(aQueryCount)] in nsINavHistoryQuery aQueries, in unsigned long aQueryCount, in nsINavHistoryQueryOptions options) |
| void | queryStringToQueries (in AUTF8String aQueryString,[array, size_is(aResultCount)] out nsINavHistoryQuery aQueries, out unsigned long aResultCount, out nsINavHistoryQueryOptions options) |
| AUTF8String | queriesToQueryString ([array, size_is(aQueryCount)] in nsINavHistoryQuery aQueries, in unsigned long aQueryCount, in nsINavHistoryQueryOptions options) |
| void | addObserver (in nsINavHistoryObserver observer, in boolean ownsWeak) |
| void | removeObserver (in nsINavHistoryObserver observer) |
| void | runInBatchMode (in nsINavHistoryBatchCallback aCallback, in nsISupports aClosure) |
| void | importHistory (in nsIFile file) |
Public Attributes | |
| const unsigned long | TRANSITION_LINK = 1 |
| const unsigned long | TRANSITION_TYPED = 2 |
| const unsigned long | TRANSITION_BOOKMARK = 3 |
| const unsigned long | TRANSITION_EMBED = 4 |
| const unsigned long | TRANSITION_REDIRECT_PERMANENT = 5 |
| const unsigned long | TRANSITION_REDIRECT_TEMPORARY = 6 |
| const unsigned long | TRANSITION_DOWNLOAD = 7 |
| const unsigned short | DATABASE_STATUS_OK = 0 |
| const unsigned short | DATABASE_STATUS_CREATE = 1 |
| const unsigned short | DATABASE_STATUS_CORRUPT = 2 |
| const unsigned short | DATABASE_STATUS_UPGRADED = 3 |
| readonly attribute unsigned short | databaseStatus |
| readonly attribute boolean | hasHistoryEntries |
| readonly attribute boolean | historyDisabled |
Definition at line 1069 of file nsINavHistoryService.idl.
| void nsINavHistoryService::addObserver | ( | in nsINavHistoryObserver | observer, | |
| in boolean | ownsWeak | |||
| ) |
Adds a history observer. If ownsWeak is false, the history service will keep an owning reference to the observer. If ownsWeak is true, then aObserver must implement nsISupportsWeakReference, and the history service will keep a weak reference to the observer.
| long long nsINavHistoryService::addVisit | ( | in nsIURI | aURI, | |
| in PRTime | aTime, | |||
| in nsIURI | aReferringURI, | |||
| in long | aTransitionType, | |||
| in boolean | aIsRedirect, | |||
| in long long | aSessionID | |||
| ) |
Call to manually add a visit for a specific page. This will probably not be commonly used other than for backup/restore type operations. If the URI does not have an entry in the history database already, one will be created with no visits, no title, hidden, not typed. Adding a visit will automatically increment the visit count for the visited page and will unhide it and/or mark it typed according to the transition type.
| aURI | Visited page | |
| aTime | Time page was visited (microseconds) | |
| aReferringURI | The URI of the visit that generated this one. Use null for no referrer. | |
| aTranstitionType | Type of transition: one of TRANSITION_* above | |
| aIsRedirect | True if the given visit redirects to somewhere else. (ie you will create an visit out of here that is a redirect transition). This causes this page to be hidden in normal history views (unless it has been unhidden by visiting it with a non-redirect). | |
| aSessionID | The session ID that this page belongs to. Use 0 for no session. |
| boolean nsINavHistoryService::canAddURI | ( | in nsIURI | aURI | ) |
Returns true if this URI would be added to the history. You don't have to worry about calling this, addPageToSession/addURI 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).
| nsINavHistoryResult nsINavHistoryService::executeQueries | ( | [array, size_is(aQueryCount)] in nsINavHistoryQuery | aQueries, | |
| in unsigned long | aQueryCount, | |||
| in nsINavHistoryQueryOptions | options | |||
| ) |
Executes an array of queries. All of the query objects are ORed together. Within a query, all the terms are ANDed together as in executeQuery. See executeQuery()
| nsINavHistoryResult nsINavHistoryService::executeQuery | ( | in nsINavHistoryQuery | aQuery, | |
| in nsINavHistoryQueryOptions | options | |||
| ) |
Executes a single query.
| AString nsINavHistoryService::getCharsetForURI | ( | in nsIURI | aURI | ) |
Gets the stored character-set for an URI.
| aURI | URI to retrieve character-set for |
| nsINavHistoryQuery nsINavHistoryService::getNewQuery | ( | ) |
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).
| nsINavHistoryQueryOptions nsINavHistoryService::getNewQueryOptions | ( | ) |
This returns a new options object that you can pass to executeQuer[y/ies] after setting the desired options.
| AString nsINavHistoryService::getPageTitle | ( | in nsIURI | aURI | ) |
Gets the original title of the page.
| void nsINavHistoryService::importHistory | ( | in nsIFile | file | ) |
Import the given Mork history file.
| file | The Mork history file to import |
| void nsINavHistoryService::markPageAsFollowedBookmark | ( | in nsIURI | aURI | ) |
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.
| AUTF8String nsINavHistoryService::queriesToQueryString | ( | [array, size_is(aQueryCount)] in nsINavHistoryQuery | aQueries, | |
| in unsigned long | aQueryCount, | |||
| in nsINavHistoryQueryOptions | options | |||
| ) |
Converts a query into an equivalent string that can be persisted. Inverse of queryStringToQueries()
| void nsINavHistoryService::queryStringToQueries | ( | in AUTF8String | aQueryString, | |
| [array, size_is(aResultCount)] out nsINavHistoryQuery | aQueries, | |||
| out unsigned long | aResultCount, | |||
| out nsINavHistoryQueryOptions | options | |||
| ) |
Converts a query URI-like string to an array of actual query objects for use to executeQueries(). The output query array may be empty if there is no information. However, there will always be an options structure returned (if nothing is defined, it will just have the default values).
| void nsINavHistoryService::removeObserver | ( | in nsINavHistoryObserver | observer | ) |
Removes a history observer.
| void nsINavHistoryService::runInBatchMode | ( | in nsINavHistoryBatchCallback | aCallback, | |
| in nsISupports | aClosure | |||
| ) |
Runs the passed callback in batch mode. Use this when a lot of things are about to change. Calls can be nested, observers will only be notified when all batches begin/end.
| aCallback | nsINavHistoryBatchCallback interface to call. | |
| aUserData | Opaque parameter passed to nsINavBookmarksBatchCallback |
| void nsINavHistoryService::setCharsetForURI | ( | in nsIURI | aURI, | |
| in AString | aCharset | |||
| ) |
Sets the character-set for an URI.
| aURI | URI to set the character-set for | |
| aCharset | character-set to be set |
| const unsigned short nsINavHistoryService::DATABASE_STATUS_CORRUPT = 2 |
Set when database was corrupt and we replaced it
Definition at line 1137 of file nsINavHistoryService.idl.
| const unsigned short nsINavHistoryService::DATABASE_STATUS_CREATE = 1 |
Set when database did not exist and we created a new one
Definition at line 1132 of file nsINavHistoryService.idl.
| const unsigned short nsINavHistoryService::DATABASE_STATUS_OK = 0 |
Set when database is coherent
Definition at line 1127 of file nsINavHistoryService.idl.
| const unsigned short nsINavHistoryService::DATABASE_STATUS_UPGRADED = 3 |
Set when database schema has been upgraded
Definition at line 1142 of file nsINavHistoryService.idl.
| readonly attribute unsigned short nsINavHistoryService::databaseStatus |
Returns the current database status
Definition at line 1147 of file nsINavHistoryService.idl.
| readonly attribute boolean 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.
Definition at line 1155 of file nsINavHistoryService.idl.
| readonly attribute boolean nsINavHistoryService::historyDisabled |
True if history is disabled. currently, history is disabled if the browser.history_expire_days pref is 0
Definition at line 1304 of file nsINavHistoryService.idl.
| const unsigned long nsINavHistoryService::TRANSITION_BOOKMARK = 3 |
This transition is set when the user followed a bookmark to get to the page.
Definition at line 1099 of file nsINavHistoryService.idl.
| const unsigned long nsINavHistoryService::TRANSITION_DOWNLOAD = 7 |
Set when the transition is a download.
Definition at line 1122 of file nsINavHistoryService.idl.
| const unsigned long nsINavHistoryService::TRANSITION_EMBED = 4 |
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.
Definition at line 1107 of file nsINavHistoryService.idl.
| const unsigned long nsINavHistoryService::TRANSITION_LINK = 1 |
System Notifications:
places-init-complete - Sent once the History service is completely initialized successfully. places-database-locked - Sent if initialization of the History service failed due to the inability to open the places.sqlite for access reasons. This transition type means the user followed a link and got a new toplevel window.
Definition at line 1085 of file nsINavHistoryService.idl.
| const unsigned long nsINavHistoryService::TRANSITION_REDIRECT_PERMANENT = 5 |
Set when the transition was a permanent redirect.
Definition at line 1112 of file nsINavHistoryService.idl.
| const unsigned long nsINavHistoryService::TRANSITION_REDIRECT_TEMPORARY = 6 |
Set when the transition was a temporary redirect.
Definition at line 1117 of file nsINavHistoryService.idl.
| const unsigned long nsINavHistoryService::TRANSITION_TYPED = 2 |
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.
Definition at line 1093 of file nsINavHistoryService.idl.
1.5.8