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 void Close ()
IMPORT_C void GetItemsL ( RArray < TMenuItem > &, TInt , const CMenuFilter *, TBool )
IMPORT_C void GetRunningAppsL ( RArray < TUid > &)
IMPORT_C CMenuOperation * MoveToFolderL (const RArray < TInt > &, TInt , TInt , TRequestStatus &)
IMPORT_C void OpenL (const TDesC &)
IMPORT_C CMenuOperation * RemoveL ( TInt , TRequestStatus &)
IMPORT_C CMenuOperation * ReorderL ( TInt , TInt , TRequestStatus &)
IMPORT_C void ResourceCheck ()
IMPORT_C TInt ResourceCount ()
IMPORT_C void ResourceMark ()
IMPORT_C TInt RootFolderL ()
IMPORT_C void __DbgSetAllocFail ( RAllocator::TAllocFail , TInt )
Private Member Functions
TInt ConnectSession ()
HBufC * GetAttributeL ( TInt , const TDesC &)
void GetAttributeListL ( 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 void Close ( )
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 ( TInt aId,
const TDesC & aAttrName
) [private]

Get item attribute value.

Parameters

TInt aId Item ID.
const TDesC & aAttrName

GetAttributeListL(TInt, RArray< TAttributeName > &)

void GetAttributeListL ( TInt aId,
RArray < TAttributeName > & aList
) [private]

Get item attribute name list.

Parameters

TInt aId Item ID.
RArray < TAttributeName > & aList Attribute item list.

GetHdrL(TInt)

const TMenuItem & GetHdrL ( TInt aId ) [private]

Get item header.

Parameters

TInt aId Item ID.

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

IMPORT_C void GetItemsL ( RArray < TMenuItem > & aItemArray,
TInt aFolder,
const CMenuFilter * aFilter = NULL,
TBool aRecursive = 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 > & aItemArray Array receiving item list. Existing content not touched (new items are appended).
TInt aFolder Get items from this folder.
const CMenuFilter * aFilter = NULL Filter criteria or NULL for unfiltered results.
TBool aRecursive = EFalse ETrue to recurse folders, EFalse for immediate children only.

GetRunningAppsL(RArray< TUid > &)

IMPORT_C void GetRunningAppsL ( 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 & aItem Item.
const TDesC8 & aCommand Command.
const TDesC8 & aParams
TRequestStatus & aStatus Observer 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,
TInt aFolder,
TInt aMoveBefore,
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 > & aItems ID-s of items to be to be moved. All items must be in the same folder.
TInt aFolder Target folder.
TInt aMoveBefore
TRequestStatus & aStatus Observer request status. When the operation completes, this status will be completed with the resulting error code.

OpenL(const TDesC &)

IMPORT_C void OpenL ( 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 & aName Name of the menu content to open.

RemoveL(TInt, TRequestStatus &)

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

error codes if an error occurs.

panic
None.

Parameters

TInt aId ID of item to be removed.
TRequestStatus & aStatus Observer request status. When the operation completes, this status will be completed with the resulting error code.

ReorderL(TInt, TInt, TRequestStatus &)

IMPORT_C CMenuOperation * ReorderL ( TInt aId,
TInt aMoveBefore,
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 aId ID-s of item to be to be reordered.
TInt aMoveBefore
TRequestStatus & aStatus Observer request status. When the operation completes, this status will be completed with the resulting error code.

ResourceCheck()

IMPORT_C void ResourceCheck ( )
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 TInt ResourceCount ( )
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 void ResourceMark ( )
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 TInt RootFolderL ( )
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::TAllocFail aType,
TInt aRate
)
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 aType Type of heap failure simulation.
TInt aRate Rate of failure.

Member Data Documentation

TData * iData

TData * iData [private]