nsINavHistoryResultNode
From MDC
This article covers features introduced in Firefox 3
Base class for all Places history result nodes, containing the URI, title, and other general information.
Contents |
nsINavHistoryResultNode is defined in toolkit/components/places/public/nsINavHistoryService.idl. It is scriptable and
unfrozen (hasn't changed since Mozilla 1.9).
Inherits from: nsISupports
[edit] Attributes
| Attribute | Type | Description |
parent
| nsINavHistoryContainerResultNode
| Identifies the parent result node in the result set. The value is null for top level nodes. Read-only. |
parentResult
| nsINavHistoryResult
| The history-result to which this node belongs. |
uri
| AUTF8String
| The URI of the resource represented by the node. For visits and URLs, this is the URL of the page. For folders and queries, this is the place: URI of the corresponding folder or query. This may be empty for other types of objects, like host containers. Read-only.
|
type
| unsigned long
| Identifies the type of node. You can use QueryInterface to access the corresponding specialized result node interface. Read-only.
|
title
| AUTF8String
| Title of the web page or of the node's grouping (day, host, folder, etc.). Read-only. |
accessCount
| unsigned long
| Total number of times the URI has been accessed. For hosts, this is the total number of the children under it, rather than the total number of times the host has been accessed (getting that information would require an additional query, so for performance reasons that information isn't given by default). Read-only. |
time
| PRTime
| The time at which the user accessed the page. Read-only.
For visits, this is the exact time at which the page visit occurred. For URIs, this is the most recent time at which the URI was visited. Even if you ask for all URIs for a given date range long ago, this might contain today's date if the URI was visited today. For hosts, or other node types with children, this is the most recent access time for any of the children. For days, this is midnight on the morning of the day in question in UTC. |
icon
| nsIURI
| This URI can be used as an image source URI and will give you the favicon for the page. It is not the actual URI of the favicon, but, rather, is something that will resolve to the actual image.
In most cases, this is an annotation URI that will query the favicon service. If the entry doesn't have a favicon, this is the chrome URI of the default favicon. If the favicon originally lived in chrome, this will be the original chrome URI of the icon. |
indentLevel
| long
| This is the number of levels between this node and the top of the hierarchy. The members of result.children have an indentLevel value of zero, their children have an indentLevel of 1, and so forth. The indent level of the root node is set to -1. Read-only.
|
viewIndex
| long
| This value is used for different purposes by different views; for trees, it is used to indicate the row in the tree at which this node is located. Its initial value is -1. |
propertyBag
| nsIWritablePropertyBag
| You can use this to associate temporary information with the result node. This property bag is associated with the result node and is not persisted in any way. Read-only. |
bookmarkIndex
| long
| When this item is in a bookmark folder (its parent is of type folder), this is the index into that folder at which this node resides. These indices start at 0 and increase in the order at which the nodes appear in the bookmark folder. For items that are not in a bookmark folder, this value is -1. Read-only. |
itemId
| long long
| If the node is an item (bookmark, folder, or separator), this value is the row ID of that bookmark in the database. For other nodes, this value is set to -1. Read-only. |
dateAdded
| PRTime
| If the node is an item (bookmark, folder, or separator), this value is the time at which the item was created. For other nodes, this value is 0. Read-only. |
lastModified
| PRTime
| If the node is an item (bookmark, folder, or separator), this value is the time at which the item was last modified. For other nodes, this value is 0. Read-only. |
[edit] Constants
| Constant | Value | Description |
RESULT_TYPE_URI
| 0 | nsINavHistoryResultNode
|
RESULT_TYPE_VISIT
| 1 | nsINavHistoryVisitResultNode
|
RESULT_TYPE_FULL_VISIT
| 2 | nsINavHistoryFullVisitResultNode
|
RESULT_TYPE_HOST
| 3 | nsINavHistoryContainerResultNode
|
RESULT_TYPE_REMOTE_CONTAINER
| 4 | nsINavHistoryContainerResultNode
|
RESULT_TYPE_QUERY
| 5 | nsINavHistoryQueryResultNode
|
RESULT_TYPE_FOLDER
| 6 | nsINavHistoryQueryResultNode
|
RESULT_TYPE_SEPARATOR
| 7 | nsINavHistoryResultNode
|
RESULT_TYPE_DAY
| 8 | nsINavHistoryContainerResultNode
|
[edit] Remarks
This is a base class; you should use one of the derived classes instead.
[edit] See also
nsINavHistoryVisitResultNode, nsINavHistoryFullVisitResultNode, nsINavHistoryContainerResultNode, nsINavHistoryQueryResultNode