voicerecorder/RecViewSrc/MVRButtonPanelModel.h
branchRCL_3
changeset 21 c6bafb5162d8
parent 0 845549f293a7
equal deleted inserted replaced
20:072a5fa0c63b 21:c6bafb5162d8
       
     1 /*
       
     2 * Copyright (c) 2002 - 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: 
       
    15 *     This class defines the data model interface for CVRButtonPanel.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef __MVRBUTTONPANELMODEL_H__
       
    21 #define __MVRBUTTONPANELMODEL_H__
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32def.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class MVRObserver;
       
    28 
       
    29 // CLASS DEFINITION
       
    30 /**
       
    31 * This class defines the data model interface for CVRButtonPanel.
       
    32 */
       
    33 class MVRButtonPanelModel 
       
    34 	{
       
    35 	public: // new methods
       
    36 
       
    37 		/**
       
    38 		* Returns the number of buttons.
       
    39 		* @return number of buttons (>=0)
       
    40 		*/
       
    41 		virtual TInt ButtonCount() const = 0;
       
    42 		
       
    43 		/**
       
    44 		* Returns the state of a specific button.
       
    45 		* @param aButtonId Button identifier
       
    46 		* @return ENormal or EDimmed
       
    47 		*/
       
    48 		virtual TInt ButtonState( TInt aButtonId ) const = 0;
       
    49 		
       
    50 		/**
       
    51 		* Returns the command id of a specific button.
       
    52 		* @param aButtonId Button identifier
       
    53 		* @return One of TVRCommands
       
    54 		*/
       
    55 		virtual TInt CommandId( TInt aButtonId ) const = 0;
       
    56 				
       
    57 		/**
       
    58 		* Returns the id of the button that should have initial focus.
       
    59 		* @return Button identifier
       
    60 		*/
       
    61 		virtual TInt InitialFocusButtonId() const = 0;
       
    62 		
       
    63 		/**
       
    64 		* Registers an observer for receiving
       
    65 		* update notifications from this interface.
       
    66 		* @param aObserver The observer object.
       
    67 		*/
       
    68 		virtual void SetButtonPanelObserver( MVRObserver* aObserver ) = 0;
       
    69 		
       
    70 		/**
       
    71 		* Checks if button panel model needs to reset the focus
       
    72 		* for example after a state change
       
    73 		* @return Is reset needed
       
    74 		*/
       
    75 		virtual TBool ResetNeeded() = 0;
       
    76 		
       
    77 		/**
       
    78 		* Returns an ID of the current visual state.
       
    79 		* @returns Visual state Id.
       
    80 		*/
       
    81 		virtual TUint VisualStateId() const = 0; 		
       
    82 		
       
    83 		/**
       
    84 		* Checks if model is in a state where it can take and handle
       
    85 		* new commands
       
    86 		* @return Can model handle new commands
       
    87 		*/
       
    88 		virtual TBool CanHandleCommands() const = 0;		
       
    89 		
       
    90 	};
       
    91 
       
    92 #endif // __MVRBUTTONPANELMODEL_H__