nsINavHistoryContainerResultNode Interface Reference

import "nsINavHistoryService.idl";

Inherits nsINavHistoryResultNode.

Inherited by nsINavHistoryQueryResultNode.

Collaboration diagram for nsINavHistoryContainerResultNode:

Collaboration graph
[legend]

List of all members.

Public Member Functions

nsINavHistoryResultNode getChild (in unsigned long aIndex)
nsINavHistoryResultNode appendURINode (in AUTF8String aURI, in AUTF8String aTitle, in PRUint32 aAccessCount, in PRTime aTime, in AUTF8String aIconURI)
nsINavHistoryContainerResultNode appendFolderNode (in PRInt64 aFolderId)

Public Attributes

attribute boolean containerOpen
readonly attribute boolean hasChildren
readonly attribute unsigned long childCount
readonly attribute boolean childrenReadOnly
readonly attribute AUTF8String dynamicContainerType


Detailed Description

Base class for container results. This includes all types of groupings. Bookmark folders and places queries will be QueryResultNodes which extends these items.

Definition at line 248 of file nsINavHistoryService.idl.


Member Function Documentation

nsINavHistoryContainerResultNode nsINavHistoryContainerResultNode::appendFolderNode ( in PRInt64  aFolderId  ) 

Appends a full visit node to this container and returns it. For the dynamic container API. TO BE CALLED FROM nsIDynamicContainer::OnContainerOpening() ONLY, and only for non-bookmark-folder containers.

See also:
nsINavHistoryVisitResultNode for parameters.
UNTESTED: Container API functions are commented out until we can test Appends a full visit node to this container and returns it. For the dynamic container API. TO BE CALLED FROM nsIDynamicContainer::OnContainerOpening() ONLY, and only for non-bookmark-folder containers.

See also:
nsINavHistoryFullVisitResultNode for parameters.
UNTESTED: Container API functions are commented out until we can test Appends a container node to this container and returns it. For the dynamic container API. TO BE CALLED FROM nsIDynamicContainer::OnContainerOpening() ONLY, and only for non-bookmark-folder containers.

aContainerType should be RESULT_TYPE_DYNAMIC_CONTAINER. When type is dynamic container you must specify a dynamic container type, otherwise, the dynamic container type must be null. Use appendQueryNode and appendFolderNode for the other container types.

UNTESTED: Container API functions are commented out until we can test Appends a query node to this container and returns it. For the dynamic container API. TO BE CALLED FROM nsIDynamicContainer::OnContainerOpening() ONLY, and only for non-bookmark-folder containers.

Normally you should supply an empty string for IconURI and it will take the default query icon for the current theme.

UNTESTED: Container API functions are commented out until we can test Appends a bookmark folder node to this container and returns it. For the dynamic container API. TO BE CALLED FROM nsIDynamicContainer::OnContainerOpening() ONLY, and only for non-bookmark-folder containers.

All container attributes will come from the boomkarks service for this folder.

nsINavHistoryResultNode nsINavHistoryContainerResultNode::appendURINode ( in AUTF8String  aURI,
in AUTF8String  aTitle,
in PRUint32  aAccessCount,
in PRTime  aTime,
in AUTF8String  aIconURI 
)

Appends a full visit node to this container and returns it. For the dynamic container API. TO BE CALLED FROM nsIDynamicContainer::OnContainerOpening() ONLY, and only for non-bookmark-folder containers.

See also:
nsINavHistoryURIResultNode for parameters.

nsINavHistoryResultNode nsINavHistoryContainerResultNode::getChild ( in unsigned long  aIndex  ) 


Member Data Documentation

readonly attribute unsigned long nsINavHistoryContainerResultNode::childCount

This gives you the children of the nodes. It is preferrable to use this interface over the array one, since it avoids creating an nsIArray object and the interface is already the correct type.

Exceptions:
NS_ERROR_NOT_AVAILABLE if containerOpen is false.

Definition at line 281 of file nsINavHistoryService.idl.

Returns false if this node's list of children can be modified (adding or removing children, or reordering children), or true if the UI should not allow the list of children to be modified. This is false for bookmark folder nodes unless setFolderReadOnly() has been called to override it, and true for non-folder nodes.

Definition at line 291 of file nsINavHistoryService.idl.

Set this to allow descent into the container. When closed, attempting to call getChildren or childCount will result in an error. You should set this to false when you are done reading.

For HOST and DAY groupings, doing this is free since the children have been precomputed. For queries and bookmark folders, being open means they will keep themselves up-to-date by listening for updates and re-querying as needed.

Definition at line 261 of file nsINavHistoryService.idl.

This is a string representing the dynamic container API service that is responsible for this container. This throws if if the node is not a dynamic container.

Definition at line 301 of file nsINavHistoryService.idl.

This indicates whether this node "may" have children, and can be used when the container is open or closed. When the container is closed, it will give you an exact answer if the node can easily be populated (for example, a bookmark folder). If not (for example, a complex history query), it will return true. When the container is open, it will always be accurate. It is intended to be used to see if we should draw the "+" next to a tree item.

Definition at line 272 of file nsINavHistoryService.idl.


The documentation for this interface was generated from the following file:

Generated on Fri Jan 16 21:13:03 2009 for Places by  doxygen 1.5.8