vtuis/videotelui/inc/commands/cvtuicmdvalidationactionbase.h
branchRCL_3
changeset 24 f15ac8e65a02
parent 23 890b5dd735f8
child 25 779871d1e4f4
equal deleted inserted replaced
23:890b5dd735f8 24:f15ac8e65a02
     1 /*
       
     2 * Copyright (c) 2007 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 definition.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_VTUICMDVALIDATIONACTIONBASE_H
       
    20 #define C_VTUICMDVALIDATIONACTIONBASE_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 class CVtUiCmdValidatorBase;
       
    25 class MVtUiCmdValidatorCallBack;
       
    26 
       
    27 /**
       
    28  *  CVtUiCmdValidationActionBase
       
    29  *
       
    30  *  Command validation action base class.
       
    31  *
       
    32  *  @since S60 v3.2
       
    33  */
       
    34 NONSHARABLE_CLASS( CVtUiCmdValidationActionBase ) : public CBase
       
    35     {
       
    36 
       
    37 public: // public methods
       
    38 
       
    39     /**
       
    40      * C++ destructor.
       
    41      */
       
    42     ~CVtUiCmdValidationActionBase();
       
    43 
       
    44     /**
       
    45      * Called when validation process is about to begin. Resets internal
       
    46      * variables.
       
    47      */
       
    48     virtual void BeginProcess();
       
    49 
       
    50     /**
       
    51      * Called when validation process has finished.
       
    52      */
       
    53     virtual void EndProcess();
       
    54 
       
    55 public: // pure virtual methods
       
    56 
       
    57     /**
       
    58      * Execute validation process.
       
    59      *
       
    60      * @param aCallBack Action validation callback routine that will be called
       
    61      * for every item to be validated.
       
    62      */
       
    63     virtual void ProcessL( const MVtUiCmdValidatorCallBack& aCallBack ) = 0;
       
    64 
       
    65 protected:
       
    66 
       
    67     /**
       
    68      * Mark command handled.
       
    69      *
       
    70      * @param aCommandId Id of command that was handled.
       
    71      */
       
    72     void CommandHandledL( TInt aCommandId );
       
    73 
       
    74     /**
       
    75      * Check whether command is already handled or not.
       
    76      *
       
    77      * @param aCommandId Id of command to be checked.
       
    78      * @return ETrue if command was already handler, EFalse otherwise.
       
    79      */
       
    80     TBool IsCommandHandled( TInt aCommandId ) const;
       
    81 
       
    82 private: // data
       
    83 
       
    84     // Array of handled commands.
       
    85     RArray< TInt > iHandledCommands;
       
    86 
       
    87     };
       
    88 
       
    89 #endif // C_VTUICMDVALIDATIONACTIONBASE_H