RMenu Class Reference

class RMenu : public RSessionBase
Menu session. The menu is an ID-based tree structure of menu folders and items. mcsmenu.lib
Since
S60 v5.0

Inherits from

Nested Classes and Structures

Public Member Functions
RMenu()
IMPORT_C voidClose()
IMPORT_C voidGetItemsL(RArray< TMenuItem > &, TInt, const CMenuFilter *, TBool)
IMPORT_C voidGetRunningAppsL(RArray< TUid > &)
IMPORT_C CMenuOperation *MoveToFolderL(const RArray< TInt > &, TInt, TInt, TRequestStatus &)
IMPORT_C voidOpenL(const TDesC &)
IMPORT_C CMenuOperation *RemoveL(TInt, TRequestStatus &)
IMPORT_C CMenuOperation *ReorderL(TInt, TInt, TRequestStatus &)
IMPORT_C voidResourceCheck()
IMPORT_C TIntResourceCount()
IMPORT_C voidResourceMark()
IMPORT_C TIntRootFolderL()
IMPORT_C void__DbgSetAllocFail(RAllocator::TAllocFail, TInt)
Private Member Functions
TInt ConnectSession()
HBufC *GetAttributeL(TInt, const TDesC &)
voidGetAttributeListL(TInt, RArray< TAttributeName > &)
const TMenuItem &GetHdrL(TInt)
CMenuOperation *HandleCommandL(CMenuItem &, const TDesC8 &, const TDesC8 &, TRequestStatus &)
Inherited Functions
RHandleBase::Attributes()const
RHandleBase::BTraceId()const
RHandleBase::DoExtendedClose()
RHandleBase::Duplicate(const RThread &,TOwnerType)
RHandleBase::FullName()const
RHandleBase::FullName(TDes &)const
RHandleBase::Handle()const
RHandleBase::HandleInfo(THandleInfo *)
RHandleBase::Name()const
RHandleBase::NotifyDestruction(TRequestStatus &)
RHandleBase::Open(const TFindHandleBase &,TOwnerType)
RHandleBase::OpenByName(const TDesC &,TOwnerType,TInt)
RHandleBase::RHandleBase()
RHandleBase::RHandleBase(TInt)
RHandleBase::SetHandle(TInt)
RHandleBase::SetHandleNC(TInt)
RSessionBase::CreateSession(RServer2,const TVersion &)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt)
RSessionBase::CreateSession(RServer2,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TIpcSessionType,const TSecurityPolicy *,TRequestStatus *)
RSessionBase::CreateSession(const TDesC &,const TVersion &,TInt,TRequestStatus *)
RSessionBase::Open(RMessagePtr2,TInt,TOwnerType)
RSessionBase::Open(RMessagePtr2,TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Open(TInt,TOwnerType)
RSessionBase::Open(TInt,const TSecurityPolicy &,TOwnerType)
RSessionBase::Send(TInt)const
RSessionBase::Send(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt)const
RSessionBase::SendReceive(TInt,TRequestStatus &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &)const
RSessionBase::SendReceive(TInt,const TIpcArgs &,TRequestStatus &)const
RSessionBase::SetReturnedHandle(TInt)
RSessionBase::SetReturnedHandle(TInt,RHandleBase &)
RSessionBase::SetReturnedHandle(TInt,const TSecurityPolicy &)
RSessionBase::ShareAuto()
RSessionBase::ShareProtected()
Inherited Enumerations
RHandleBase:TAttributes
RSessionBase:TAttachMode
Private Attributes
TData *iData
Inherited Attributes
RHandleBase::iHandle

Constructor & Destructor Documentation

RMenu()

RMenu()[inline]
Constructor.
Since
S60 v5.0
capability
None.
Exceptions
None.

panic
None.

Member Functions Documentation

Close()

IMPORT_C voidClose()
Close the session. Safe to call if not open.
Since
S60 v5.0
capability
None.
Exceptions
None.

panic
None.

ConnectSession()

TInt ConnectSession()[private]

Connect session.

GetAttributeL(TInt, const TDesC &)

HBufC *GetAttributeL(TIntaId,
const TDesC &aAttrName
)[private]

Get item attribute value.

Parameters

TInt aIdItem ID.
const TDesC & aAttrName

GetAttributeListL(TInt, RArray< TAttributeName > &)

voidGetAttributeListL(TIntaId,
RArray< TAttributeName > &aList
)[private]

Get item attribute name list.

Parameters

TInt aIdItem ID.
RArray< TAttributeName > & aListAttribute item list.

GetHdrL(TInt)

const TMenuItem &GetHdrL(TIntaId)[private]

Get item header.

Parameters

TInt aIdItem ID.

GetItemsL(RArray< TMenuItem > &, TInt, const CMenuFilter *, TBool)

IMPORT_C voidGetItemsL(RArray< TMenuItem > &aItemArray,
TIntaFolder,
const CMenuFilter *aFilter = NULL,
TBoolaRecursive = EFalse
)
Get list of items.
Since
S60 v5.0
capability
ECapabilityReadDeviceData.
Exceptions
System-wide

error codes if an error occurs.

panic
None.

Parameters

RArray< TMenuItem > & aItemArrayArray receiving item list. Existing content not touched (new items are appended).
TInt aFolderGet items from this folder.
const CMenuFilter * aFilter = NULLFilter criteria or NULL for unfiltered results.
TBool aRecursive = EFalseETrue to recurse folders, EFalse for immediate children only.

GetRunningAppsL(RArray< TUid > &)

IMPORT_C voidGetRunningAppsL(RArray< TUid > &aArray)

Get array of running applications

Parameters

RArray< TUid > & aArray

HandleCommandL(CMenuItem &, const TDesC8 &, const TDesC8 &, TRequestStatus &)

CMenuOperation *HandleCommandL(CMenuItem &aItem,
const TDesC8 &aCommand,
const TDesC8 &aParams,
TRequestStatus &aStatus
)[private]

Handle command.

Parameters

CMenuItem & aItemItem.
const TDesC8 & aCommandCommand.
const TDesC8 & aParams
TRequestStatus & aStatusObserver request status. When the operation completes, this status will be completed with the resulting error code.

MoveToFolderL(const RArray< TInt > &, TInt, TInt, TRequestStatus &)

IMPORT_C CMenuOperation *MoveToFolderL(const RArray< TInt > &aItems,
TIntaFolder,
TIntaMoveBefore,
TRequestStatus &aStatus
)
Move items to another folder.
Since
S60 v5.0
capability
ECapabilityWriteDeviceData.
Exceptions
System-wide

error codes if an error occurs.

panic
None.

Parameters

const RArray< TInt > & aItemsID-s of items to be to be moved. All items must be in the same folder.
TInt aFolderTarget folder.
TInt aMoveBefore
TRequestStatus & aStatusObserver request status. When the operation completes, this status will be completed with the resulting error code.

OpenL(const TDesC &)

IMPORT_C voidOpenL(const TDesC &aName)
Open the session.
Since
S60 v5.0
capability
ECapabilityReadDeviceData.
Exceptions
System-wide

error codes if an error occurs.

panic
None.

Parameters

const TDesC & aNameName of the menu content to open.

RemoveL(TInt, TRequestStatus &)

IMPORT_C CMenuOperation *RemoveL(TIntaId,
TRequestStatus &aStatus
)
Remove item.
Since
S60 v5.0
capability
ECapabilityWriteDeviceData.
Exceptions
System-wide

error codes if an error occurs.

panic
None.

Parameters

TInt aIdID of item to be removed.
TRequestStatus & aStatusObserver request status. When the operation completes, this status will be completed with the resulting error code.

ReorderL(TInt, TInt, TRequestStatus &)

IMPORT_C CMenuOperation *ReorderL(TIntaId,
TIntaMoveBefore,
TRequestStatus &aStatus
)
Move item to a different position in its current folder.
Since
S60 v5.0
capability
ECapabilityWriteDeviceData.
Exceptions
System-wide

error codes if an error occurs.

panic
None.

Parameters

TInt aIdID-s of item to be to be reordered.
TInt aMoveBefore
TRequestStatus & aStatusObserver request status. When the operation completes, this status will be completed with the resulting error code.

ResourceCheck()

IMPORT_C voidResourceCheck()
Check that the number of allocated object through this session matches the same of when the last call to ResourceMark was made.
Since
S60 v5.0
capability
ECapabilityAllFiles.
Exceptions
System-wide

error codes if an error occurs.

panic
None.

ResourceCount()

IMPORT_C TIntResourceCount()
Get number of allocated object through this session.
Since
S60 v5.0
capability
ECapabilityAllFiles.
Exceptions
System-wide

error codes if an error occurs.

panic
None.

ResourceMark()

IMPORT_C voidResourceMark()
Start checking the number of allocated object through this session.
Since
S60 v5.0
capability
ECapabilityAllFiles.
Exceptions
System-wide

error codes if an error occurs.

panic
None.

RootFolderL()

IMPORT_C TIntRootFolderL()
Get ID of the root folder.
Since
S60 v5.0
capability
ECapabilityReadDeviceData.
Exceptions
System-wide

error codes if an error occurs.

panic
None.

__DbgSetAllocFail(RAllocator::TAllocFail, TInt)

IMPORT_C void__DbgSetAllocFail(RAllocator::TAllocFailaType,
TIntaRate
)
Simulate a heap allocation failure for server heap. Has empty implementation for the UDEB server.
Since
S60 v5.0
capability
ECapabilityAllFiles.
Exceptions
System-wide

error codes if an error occurs.

panic
None.

Parameters

RAllocator::TAllocFail aTypeType of heap failure simulation.
TInt aRateRate of failure.

Member Data Documentation

TData * iData

TData *iData[private]