CMenuItem Class Reference
class CMenuItem : public CBase |
Menu item. This class holds client-side local copy of requested item attributes.
CMenuItem and the underlying storage are very losely coupled:
Public Member Functions |
---|
| ~CMenuItem() |
IMPORT_C CMenuItem * | CreateL(RMenu &, const TDesC &, TInt, TInt) |
IMPORT_C TUint32 | Flags() |
IMPORT_C TPtrC | GetAttributeL(const TDesC &, TBool &) |
IMPORT_C void | GetAttributeListL(RArray< TAttributeName > &) |
IMPORT_C CMenuOperation * | HandleCommandL(const TDesC8 &, const TDesC8 &, TRequestStatus &) |
IMPORT_C TInt | Id() |
IMPORT_C CMenuItem * | OpenL(RMenu &, TInt) |
IMPORT_C CMenuItem * | OpenL(RMenu &, const TMenuItem &) |
IMPORT_C TInt | Parent() |
IMPORT_C void | RemoveAttributeL(const TDesC &) |
IMPORT_C TBool | RunningStatusL() |
IMPORT_C CMenuOperation * | SaveL(TRequestStatus &) |
IMPORT_C void | SetAttributeL(const TDesC &, const TDesC &) |
IMPORT_C void | SetFlags(TUint32, TBool) |
IMPORT_C TPtrC | Type() |
Private Attributes |
---|
TData * | iData |
Constructor & Destructor Documentation
~CMenuItem()
IMPORT_C | ~CMenuItem | ( | ) | [virtual] |
Destructor.
- Since
- S60 v5.0
- capability
- None.
- Exceptions
-
- panic
- None.
Member Functions Documentation
AddL(TRequestStatus &)
Parameters
TRequestStatus & aStatus | Observer request status. When the operation completes, this status will be completed with the resulting error code. |
Changed()
TBool
| Changed | ( | ) | const [private] |
Check if there are unsaved changes.
ClearChanged()
void | ClearChanged | ( | ) | [private] |
Mark the item as unchanged.
CreateL(RMenu &, const TDesC &, TInt, TInt)
Create new menu item. The item is not created until are committed with a call to
SaveL().
- Since
- S60 v5.0.
- capability
- None.
- Exceptions
KErrArgument |
if aType is KMenuTypeData. System-wide error codes if an error occurs.
|
- panic
- None.
Parameters
RMenu & aMenu | Menu session. |
const TDesC & aType | Type. Maximum length is KMenuMaxTypeLen. |
TInt aFolder | Parent folder. |
TInt aInsertBefore | |
Flags()
Get flags.
- Since
- S60 v5.0
- capability
- None.
- Exceptions
-
- panic
- None.
GetAttributeL(const TDesC &, TBool &)
Get attribute value.
- Since
- S60 v5.0
- capability
- ECapabilityReadDeviceData.
- Exceptions
KErrArgument |
in case of invalid attribute name. System-wide error codes if an error occurs.
|
- panic
- None.
Parameters
const TDesC & aAttrName | Attribute name. |
TBool & aAttrExists | Will be set to indicate whether attribute exists or not. |
GetAttributeListL(RArray< TAttributeName > &)
Get attribute name list.
- Since
- S60 v5.0
- capability
- ECapabilityReadDeviceData.
- Exceptions
System-wide |
error codes if an error occurs.
|
- panic
- None.
HandleCommandL(const TDesC8 &, const TDesC8 &, TRequestStatus &)
Handle command.
- Since
- S60 v5.0
- capability
- None.
- Exceptions
KErrNotSupported |
if no handler was found for the given type of item. System-wide error codes if an error occurs.
|
- panic
- None.
Parameters
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. |
Id()
Get item ID.
- Since
- S60 v5.0
- capability
- None.
- Exceptions
-
- panic
- None.
OpenL(RMenu &, TInt)
Open existing menu item.
- Since
- S60 v5.0
- capability
- ECapabilityReadDeviceData.
- Exceptions
System-wide |
error codes if an error occurs.
|
- panic
- None.
OpenL(RMenu &, const TMenuItem &)
Open existing menu item.
- Since
- S60 v5.0
- capability
- None.
- Exceptions
System-wide |
error codes if an error occurs.
|
- panic
- None.
Parameters
RMenu & aMenu | Menu session. |
const TMenuItem & aHdr | Item header. Validity is not checked - it is assumed that it was retrieved by a call to RMenu::GetItemsL(). (It is no use in modifying an existing header, because the changes are not reflected back in the server side data). |
Parent()
IMPORT_C TInt | Parent | ( | ) | const |
Get parent folder ID.
- Since
- S60 v5.0
- capability
- None.
- Exceptions
-
- panic
- None.
RemoveAttributeL(const TDesC &)
IMPORT_C void | RemoveAttributeL | ( | const TDesC & | aAttrName | ) | |
Remove attribute.
- Since
- S60 v5.0
- capability
- ECapabilityWriteDeviceData.
- Exceptions
KErrArgument |
in case of invalid attribute name. System-wide error codes if an error occurs.
|
- panic
- None.
Parameters
const TDesC & aAttrName | Attribute name. |
RunningStatusL()
IMPORT_C TBool | RunningStatusL | ( | ) | |
Get running status folders and applications.
- capability
- None.
- Exceptions
System-wide |
error codes if an error occurs.
|
- panic
- None.
SaveL(TRequestStatus &)
Save item (commit changes). If the item is a new item (created with
CreateL()), its ID is generated now. However, the item with that ID does not exist until the operation successfully completes!
- Since
- S60 v5.0
- capability
- ECapabilityWriteDeviceData.
- Exceptions
System-wide |
error codes if an error occurs.
|
- panic
- None.
Parameters
TRequestStatus & aStatus | Observer request status. When the operation completes, this status will be completed with the resulting error code. |
SetAttributeL(const TDesC &, const TDesC &)
IMPORT_C void | SetAttributeL | ( | const TDesC & | aAttrName, |
| const TDesC & | aAttrValue |
| ) | |
Set attribute value.
- Since
- S60 v5.0
- capability
- ECapabilityWriteDeviceData.
- Exceptions
KErrArgument |
in case of invalid attribute name or value. System-wide error codes if an error occurs.
|
- panic
- None.
Parameters
const TDesC & aAttrName | Attribute name. |
const TDesC & aAttrValue | Attribute value. |
SetFlags(TUint32, TBool)
Set or clear flags.
- Since
- S60 v5.0
- capability
- None.
- Exceptions
-
- panic
- None.
Parameters
TUint32 aMask | Flags to set or clear. |
TBool aOn | ETrue to set, EFalse to clear flags. |
Type()
IMPORT_C TPtrC | Type | ( | ) | const |
Get type.
- Since
- S60 v5.0
- capability
- None.
- Exceptions
-
- panic
- None.
UpdateL(TRequestStatus &)
Parameters
TRequestStatus & aStatus | Observer request status. When the operation completes, this status will be completed with the resulting error code. |
Member Data Documentation
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.