TAlfActionCommand Class Reference
class TAlfActionCommand : public TAlfCommand
|
TAlfActionCommand
is a simple action that triggers an action notification.
They are reserved for notifying observers of user-initiated actions in the user interface. For example, a button control might send an action command when the user clicks on the button.
Usage:
//Candidate, interested in action notification, should implement
// MAlfActionObserver interface
class ActionCommandTest : public MAlfActionObserver
{
public:
.....
.....
.....
void HandleAction( const TAlfActionCommand& aActionCommand );
};
// From MAlfActionObserver
void ActionCommandTest::HandleAction( const TAlfActionCommand& aActionCommand )
{
//Perform required action on notification
}
-------------------------------------------------------------------------------
//Observer registrartion
ActionCommandTest* testClass = new ActionCommandTest();
//Create command
TAlfActionCommand command( 1 );
//Register test command as observer to environment
iEnv->AddActionObserverL( testClass );
//Send command
iEnv->Send( command, 1 );
//Cleanup
iEnv->RemoveActionObserver( testClass );
delete testClass;
MAlfActionObserver
CAlfEnv::AddActionObserverL() CAlfEnv::RemoveActionObserver()
Constructor & Destructor Documentation
TAlfActionCommand(TInt)
IMPORT_C
|
TAlfActionCommand
|
(
|
TInt
|
aId
|
)
|
|
Constructs a new action command.
Parameters
TInt
aId
|
Identifier of the action.
|
Member Functions Documentation
CommandExtension(const TUid &, TAny **)
IMPORT_C void
|
CommandExtension
|
(
|
const
TUid
&
|
aExtensionUid,
|
|
TAny
**
|
aExtensionParams
|
|
)
|
[protected, virtual]
|
Parameters
const
TUid
& aExtensionUid
|
|
TAny
** aExtensionParams
|
|
ExecuteL(CAlfEnv &)
IMPORT_C void
|
ExecuteL
|
(
|
CAlfEnv &
|
aEnv
|
)
|
const [virtual]
|
Parameters
CAlfEnv & aEnv
|
The environment in which the command is being executed.
|
Id()
IMPORT_C
TInt
|
Id
|
(
|
)
|
const
|
Determines the action identifier of the command.
Size()
IMPORT_C
TInt
|
Size
|
(
|
)
|
const [virtual]
|
Returns the size of the command.
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.