|
1 /* |
|
2 * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Command validation action base class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <cvtlogger.h> |
|
20 |
|
21 #include "cvtuicmdvalidationactionbase.h" |
|
22 |
|
23 // ======== MEMBER FUNCTIONS ======== |
|
24 |
|
25 // --------------------------------------------------------------------------- |
|
26 // CVtUiCmdValidationActionBase::~CVtUiCmdValidationActionBase |
|
27 // --------------------------------------------------------------------------- |
|
28 // |
|
29 CVtUiCmdValidationActionBase::~CVtUiCmdValidationActionBase() |
|
30 { |
|
31 __VTPRINTENTER( "ValActBase.~" ) |
|
32 iHandledCommands.Reset(); |
|
33 __VTPRINTEXIT( "ValActBase.~" ) |
|
34 } |
|
35 |
|
36 // --------------------------------------------------------------------------- |
|
37 // CVtUiCmdValidationActionBase::BeginProcess |
|
38 // --------------------------------------------------------------------------- |
|
39 // |
|
40 void CVtUiCmdValidationActionBase::BeginProcess() |
|
41 { |
|
42 __VTPRINTENTER( "ValActBase.BeginProcess" ) |
|
43 iHandledCommands.Reset(); |
|
44 __VTPRINTEXIT( "ValActBase.BeginProcess" ) |
|
45 } |
|
46 |
|
47 // --------------------------------------------------------------------------- |
|
48 // CVtUiCmdValidationActionBase::EndProcess |
|
49 // --------------------------------------------------------------------------- |
|
50 // |
|
51 void CVtUiCmdValidationActionBase::EndProcess() |
|
52 { |
|
53 __VTPRINTENTER( "ValActBase.EndProcess" ) |
|
54 __VTPRINTEXIT( "ValActBase.EndProcess" ) |
|
55 } |
|
56 |
|
57 // --------------------------------------------------------------------------- |
|
58 // CVtUiCmdValidationActionBase::CommandHandledL |
|
59 // --------------------------------------------------------------------------- |
|
60 // |
|
61 void CVtUiCmdValidationActionBase::CommandHandledL( TInt aCommandId ) |
|
62 { |
|
63 __VTPRINTENTER( "ValActBase.CommandHandledL" ) |
|
64 __VTPRINT2( DEBUG_GEN, " cmdId = %d", aCommandId ); |
|
65 User::LeaveIfError( iHandledCommands.InsertInOrder( aCommandId ) ); |
|
66 __VTPRINTEXIT( "ValActBase.CommandHandledL" ) |
|
67 } |
|
68 |
|
69 // --------------------------------------------------------------------------- |
|
70 // CVtUiCmdValidationActionBase::IsCommandHandled |
|
71 // --------------------------------------------------------------------------- |
|
72 // |
|
73 TBool CVtUiCmdValidationActionBase::IsCommandHandled( TInt aCommandId ) const |
|
74 { |
|
75 __VTPRINTENTER( "ValActBase.IsCommandHandled" ) |
|
76 TBool result( iHandledCommands.FindInOrder( aCommandId ) != KErrNotFound ); |
|
77 __VTPRINTEXITR( "ValActBase.IsCommandHandled %d", result ) |
|
78 return result; |
|
79 } |