CMMFObjectContainer Class Reference

#include "mmfcontroller.h"

Link against: mmfcontrollerframework.lib

class CMMFObjectContainer : public CBase

Inherits from

  • CMMFObjectContainer

    Detailed Description

    Container class to hold the CMMFObject-derived objects in the controller framework.

    Since
    7.0s

    Constructor & Destructor Documentation

    CMMFObjectContainer ( )

    IMPORT_CCMMFObjectContainer()

    Constructor.

    Since
    7.0s

    ~CMMFObjectContainer ( )

    IMPORT_C~CMMFObjectContainer()

    Destructor.

    Deletes all objects owned by the container.

    Since
    7.0s

    Member Function Documentation

    AddMMFObject ( CMMFObject & )

    IMPORT_C TIntAddMMFObject(CMMFObject &aObject)

    Add an object to the container.

    Once the object has been added, its ownership is transferred to the container.

    Since
    7.0s
    ParameterDescription
    aObjectA reference to the object to be added to the container.

    Returns: An error code indicating if the function call was successful. If the return code is not KErrNone, then ownership of the object still remains with the caller.

    DeleteAllObjects ( )

    IMPORT_C voidDeleteAllObjects()

    Removes and destroys all objects from the container.

    Since
    7.0s

    FindMMFObject ( const TMMFMessageDestination &, CMMFObject *& )

    IMPORT_C TIntFindMMFObject(const TMMFMessageDestination &aObjectHandle,
    CMMFObject *&aObjectFound
    )

    Finds an object in the container using a handle.

    Since
    7.0s
    ParameterDescription
    aObjectHandleThe handle of the object to be located.
    aObjectFoundA reference to a pointer to the object found in the container.

    Returns: An error code indicating if the function call was successful. KErrNone on success, otherwise another of the system-wide error codes.

    MMFObjects ( )

    const RPointerArray< CMMFObject > &MMFObjects()

    RemoveAndDestroyMMFObject ( CMMFObject & )

    IMPORT_C voidRemoveAndDestroyMMFObject(CMMFObject &aObject)

    Removes and destroys an object from the container.

    This method ensures that the object is no longer in the container, and that it gets deleted. Even if the object is not found in the container's array of objects, it will be deleted.

    Since
    7.0s
    ParameterDescription
    aObjectA reference to the object to be deleted.