nsINavHistoryResultNode 编辑

toolkit/components/places/public/nsINavHistoryService.idlScriptable 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

AttributeTypeDescription
accessCountunsigned longTotal 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.
bookmarkIndexlongWhen 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.
dateAddedPRTimeIf 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.
iconAUTF8StringThis 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 an nsIURI.
indentLevellongThis 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.
itemIdlong longIf 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.
lastModifiedPRTime

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 added lastModified is set to the same value as dateAdded. Read only.
parentnsINavHistoryContainerResultNodeIdentifies the parent result node in the result set. The value is null for top level nodes. Read only.
parentResultnsINavHistoryResultThe history-result to which this node belongs. Read only.
propertyBagnsIWritablePropertyBagYou 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
tagsAStringFor 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.
timePRTimeThe 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.

titleAUTF8StringTitle of the web page or of the node's grouping (day, host, folder, and so on.). Read only.
typeunsigned longIdentifies the type of node. You can use QueryInterface to access the corresponding specialized result node interface. Read only.
uriAUTF8StringThe 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.
viewIndexlong

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

ConstantValueDescription
RESULT_TYPE_URI0nsINavHistoryResultNode.
RESULT_TYPE_VISIT1nsINavHistoryVisitResultNode.
RESULT_TYPE_FULL_VISIT2nsINavHistoryFullVisitResultNode.
RESULT_TYPE_DYNAMIC_CONTAINER4nsINavHistoryContainerResultNode.
RESULT_TYPE_QUERY5nsINavHistoryQueryResultNode.
RESULT_TYPE_FOLDER6nsINavHistoryQueryResultNode.
RESULT_TYPE_SEPARATOR7nsINavHistoryResultNode.
RESULT_TYPE_FOLDER_SHORTCUT9nsINavHistoryQueryResultNode.

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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据

词条统计

浏览:47 次

字数:10567

最后编辑:7 年前

编辑次数:0 次

    我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
    原文