vtuis/videotelui/inc/compman/tvtuicomponentstate.h
changeset 0 ed9695c8bcbe
equal deleted inserted replaced
-1:000000000000 0:ed9695c8bcbe
       
     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:  VT UI component state definition.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef T_VTUICOMPONENTSTATE_H
       
    20 #define T_VTUICOMPONENTSTATE_H
       
    21 
       
    22 #include <e32base.h>
       
    23 
       
    24 #include "tvtuiblocklists.h"
       
    25 
       
    26 /**
       
    27  *  TVtUiComponentState
       
    28  *
       
    29  *  Component state definition.
       
    30  *
       
    31  *  @since S60 v3.2
       
    32  */
       
    33 NONSHARABLE_CLASS( TVtUiComponentState )
       
    34     {
       
    35 
       
    36 public: // enumerations
       
    37 
       
    38     enum TState
       
    39         {
       
    40         /** Component is inactive */
       
    41         EInactive,
       
    42 
       
    43         /** Component is activated but some other component is blocking it */
       
    44         EWaiting,
       
    45 
       
    46         /** Component is active */
       
    47         EActive
       
    48         };
       
    49 
       
    50 public: // public methods
       
    51 
       
    52     /**
       
    53      * Activate component.
       
    54      */
       
    55     void ActivateComponentL();
       
    56 
       
    57     /**
       
    58      * Blocks component.
       
    59      */
       
    60     void BlockComponentL();
       
    61 
       
    62     /**
       
    63      * Deactivates component.
       
    64      */
       
    65     void DeActivateComponentL();
       
    66 
       
    67     /**
       
    68      * Returns component's state.
       
    69      *
       
    70      * @return Component's current state.
       
    71      */
       
    72     TState State() const;
       
    73 
       
    74     /**
       
    75      * Returns component.
       
    76      *
       
    77      * @return Constant reference to component.
       
    78      */
       
    79     const MVtUiComponent& Component() const;
       
    80 
       
    81     /**
       
    82      * Returns const reference to the block list.
       
    83      *
       
    84      * @return Constant reference to component's block list.
       
    85      */
       
    86     const TVtUiBlockList& BlockList() const;
       
    87 
       
    88     /**
       
    89      * Returns reference to the block list.
       
    90      *
       
    91      * @return Reference to component's block list.
       
    92      */
       
    93     TVtUiBlockList& BlockList();
       
    94 
       
    95 protected: // protected methods
       
    96 
       
    97     /**
       
    98      * Constructor
       
    99      *
       
   100      * @param aComponent Component for this state instance.
       
   101      * @param aBlockList Block list for this state intance.
       
   102      */
       
   103     TVtUiComponentState( MVtUiComponent& aComponent,
       
   104         const TVtUiBlockList& aBlockList );
       
   105 
       
   106 protected:
       
   107 
       
   108     // Reference to component
       
   109     MVtUiComponent& iComponent;
       
   110 
       
   111     // Blocklist
       
   112     TVtUiBlockListBitField iBlockList;
       
   113 
       
   114     // Component's state
       
   115     TState iState;
       
   116 
       
   117     };
       
   118 
       
   119 #endif // T_VTUICOMPONENTSTATE_H