MNcdNodeContainer Class Reference

class MNcdNodeContainer : public MCatalogsBase

Container may contain other nodes. This interface provides functions that can be used to get the nodes of the container. Also, a convenience function to load the content for the child nodes is provided.

This interface can be queried from node objects that are containers, after the node has been initialized.

Inherits from

Constructor & Destructor Documentation

~MNcdNodeContainer()

~MNcdNodeContainer ( ) [protected, inline, virtual]

Member Functions Documentation

ChildCount()

TInt ChildCount ( ) const [pure virtual]

Returns the child node count for this container. The count may be used to get the upper limit for indexing the contained child nodes with the ChildL() method.

ChildL(TInt)

MNcdNode * ChildL ( TInt aIndex ) [pure virtual]

Returns a child (contained node) of this container.

Note:

The reference count of the node is increased by one. So, Release function of the node should be called when the node is not needed anymore.

Exceptions
Leave

System wide error code.

Panic

ENcdPanicIndexOutOfRange Index out of range.

Parameters

TInt aIndex is the index to the child of this container.

ContainerType()

TNcdContainerType ContainerType ( ) const [pure virtual]

Tells the type of the folder. It may be a normal folder or a catalog.

LoadChildrenL(TInt, TInt, TNcdChildLoadMode, MNcdLoadNodeOperationObserver &)

MNcdLoadNodeOperation * LoadChildrenL ( TInt aIndex,
TInt aSize,
TNcdChildLoadMode aMode,
MNcdLoadNodeOperationObserver & aObserver
) [pure virtual]

Loads node information from the content provider for the children of this container.

The loading of children is started from the given index. Size informs the maximum number of children that are loaded.

Exceptions
Leave

System wide error code. KErrNotFound if trying to load metadata and no structure is present. KNcdErrorParallelOperationNotAllowed if a parallel client is running an operation for the same metadata, see MNcdOperation for full explanation.

Parameters

TInt aIndex The index of the child that will be the first one to be loaded.
TInt aSize The maximum number of children to load. For special cases: if KMaxTInt is given, then it will be interpreted so that all the children after aIndex should be loaded. By using KMaxTInt, a parent container refresh may be skipped and all the children may be requested from server even if parent's child count information may not be valid. In normal cases, usage of KMaxTInt should be avoided. Instead, refresh the parent first and use the correct child count value. KMaxTInt may not be supported for all type of containers. If not supported, then a leave will occur.
TNcdChildLoadMode aMode Load mode, determines whether structure, metadata or both will be loaded.
MNcdLoadNodeOperationObserver & aObserver Observer for the operation.