vtuis/videotelui/inc/commands/cvtuicmdstatecheckaction.h
changeset 0 ed9695c8bcbe
equal deleted inserted replaced
-1:000000000000 0:ed9695c8bcbe
       
     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 state check action.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_VTUICMDSTATECHECKACTION_H
       
    20 #define C_VTUICMDSTATECHECKACTION_H
       
    21 
       
    22 #include "cvtuicmdcustomvalidationactionbase.h"
       
    23 
       
    24 /**
       
    25  *  CVtUiCmdStateCheckAction
       
    26  *
       
    27  *  Custom validation action that concludes whether or not a command is allowed.
       
    28  *  Command validness is checked from its current state.
       
    29  *
       
    30  *  @since S60 v3.2
       
    31  */
       
    32 NONSHARABLE_CLASS( CVtUiCmdStateCheckAction )
       
    33 : public CVtUiCmdCustomValidationActionBase
       
    34     {
       
    35 
       
    36 public:
       
    37 
       
    38     /**
       
    39      * Static constructor.
       
    40      *
       
    41      * @return Pointer to newly created instance of CVtUiCmdStateCheckAction.
       
    42      */
       
    43     static CVtUiCmdStateCheckAction* NewL();
       
    44 
       
    45     /**
       
    46      * Sets command to be checked.
       
    47      *
       
    48      * @param aCommandId Id of command to be checked.
       
    49      */
       
    50     void SetCommand( TInt aCommandId );
       
    51 
       
    52     /**
       
    53      * Sets command to be checked.
       
    54      *
       
    55      * @return ETrue is command set with SetCommand() is allowed to be
       
    56      * executed.
       
    57      */
       
    58     TBool IsCommandAllowed() const;
       
    59 
       
    60 public: // from CVtUiCmdValidationActionBase
       
    61 
       
    62     /**
       
    63      * @see CVtUiCmdValidationActionBase::ProcessL
       
    64      */
       
    65     void ProcessL( const MVtUiCmdValidatorCallBack& aCallBack );
       
    66 
       
    67 private:
       
    68 
       
    69     /**
       
    70      * C++ constructor.
       
    71      */
       
    72     CVtUiCmdStateCheckAction();
       
    73 
       
    74 private: // data
       
    75 
       
    76     // Id of command to be checked
       
    77     TInt iCommandId;
       
    78 
       
    79     // ETrue if command defined by iCommandId is allowed
       
    80     TBool iIsCommandAllowed;
       
    81 
       
    82     };
       
    83 
       
    84 #endif // C_VTUICMDSTATECHECKACTION_H