nsINavHistoryResultNode 编辑
toolkit/components/places/public/nsINavHistoryService.idl
Scriptable This is the base class for all Places history result nodes, containing the URI, title, and other general information. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports
Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1)Attributes
Attribute | Type | Description |
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. |
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. |
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. |
icon | AUTF8String | 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. Read only. Note: Prior to Gecko 1.9.2, this was annsIURI . |
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. |
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. |
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. Note: When an item is addedlastModified is set to the same value as dateAdded . Read only. |
parent |
| Identifies the parent result node in the result set. The value is null for top level nodes. Read only. |
parentResult |
| The history-result to which this node belongs. Read only. |
propertyBag |
| 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. Obsolete since Gecko 2.0 |
tags | AString | For uri nodes, this is a sorted list of the tags , delimited with commans, for the uri represented by this node. Otherwise this is an empty string. 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. |
title | AUTF8String | Title of the web page or of the node's grouping (day, host, folder, and so on.). Read only. |
type | unsigned long | Identifies the type of node. You can use QueryInterface to access the corresponding specialized result node interface. Read only. |
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. |
viewIndex | long | Value with undefined meaning for use by the view. Its initial value will be -1. The result implementation treats nodes with this property set to -1 as invisible! View-implementations may use this value to track the node index in the view, for example the tree view uses this value to indicate the row in the tree that this node is at. Other views may choose not to use this, but should inititalize this value to anything but -1 for visible nodes. Obsolete since Gecko 1.9.2 |
Constants
Constant | Value | Description |
RESULT_TYPE_URI | 0 | nsINavHistoryResultNode . |
RESULT_TYPE_VISIT | 1 | nsINavHistoryVisitResultNode . |
RESULT_TYPE_FULL_VISIT | 2 | nsINavHistoryFullVisitResultNode . |
RESULT_TYPE_DYNAMIC_CONTAINER | 4 | nsINavHistoryContainerResultNode . |
RESULT_TYPE_QUERY | 5 | nsINavHistoryQueryResultNode . |
RESULT_TYPE_FOLDER | 6 | nsINavHistoryQueryResultNode . |
RESULT_TYPE_SEPARATOR | 7 | nsINavHistoryResultNode . |
RESULT_TYPE_FOLDER_SHORTCUT | 9 | nsINavHistoryQueryResultNode . |
Remarks
This is a base class; you should use one of the derived classes instead.
Using Places services after quit-application is not reliable, so make sure to do any shutdown work on quit-application, or history synchronization could fail, losing latest changes.
See also
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论