voicerecorder/RecViewSrc/TVRContext.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 is a data container for a single RecView context.
       
    16 *     A context contains a set of states. Each state
       
    17 *     contains a set of valid state transitions.
       
    18 *     Different contexts are defined in VoiceRecorder.hrh.
       
    19 *
       
    20 *
       
    21 */
       
    22 
       
    23 
       
    24 #ifndef __TVRCONTEXT_H__
       
    25 #define __TVRCONTEXT_H__
       
    26 
       
    27 // INCLUDES
       
    28 #include "voicerecorder.hrh"
       
    29 #include "VRConsts.h"
       
    30 
       
    31 // CLASS DEFINITION
       
    32 /**
       
    33 * This class is a data container for a single RecView context.
       
    34 * A context contains a set of states. Each state
       
    35 * contains a set of valid state transitions.
       
    36 * Different contexts are defined in VoiceRecorder.hrh.
       
    37 */
       
    38 class TVRContext
       
    39 	{
       
    40 	public:
       
    41 
       
    42 		// CLASS DEFINITION
       
    43 		/**
       
    44 		* This class is a data container for a single RecView
       
    45 		* state transition.
       
    46 		*/
       
    47 		class TTransition
       
    48 			{
       
    49 			public: // data
       
    50 
       
    51 				/**
       
    52 				* ETrue if this transition has been succesfully initialised.
       
    53 				*/
       
    54 				TBool iValid;
       
    55 
       
    56 				/**
       
    57 				* Identifies the command that executes this transition.
       
    58 				* This is one of TVRCommands.
       
    59 				*/
       
    60 				TUint iCommandId;
       
    61 
       
    62 				/**
       
    63 				* Identifies the state that is entered by this transition.
       
    64 				* This is an index into the TState::iStates array.
       
    65 				*/
       
    66 				TUint iNewState;
       
    67 
       
    68 				/**
       
    69 				* Identifies the function that gets called after the
       
    70 				* state transition is complete.
       
    71 				*/
       
    72 				TUint iFunctionId;
       
    73 
       
    74 			};
       
    75 
       
    76 		// CLASS DEFINITION
       
    77 		/**
       
    78 		* This class is a data container for a single RecView
       
    79 		* state. It contains a set of valid state transitions.
       
    80 		*/
       
    81 		class TState
       
    82 			{
       
    83 			public: // data
       
    84 
       
    85 				/**
       
    86 				* ETrue if this state has been succesfully initialised
       
    87 				*/
       
    88 				TBool iValid;
       
    89 
       
    90 				/**
       
    91 				* A static array of valid transitions (in this State).
       
    92 				*/
       
    93 				TTransition iTransitions[ KVRMaxTransitions ];
       
    94 			
       
    95 			};
       
    96 
       
    97 	public: // data
       
    98 
       
    99 		/**
       
   100 		* ETrue if this context has been succesfully initialised
       
   101 		*/
       
   102 		TBool iValid;
       
   103 
       
   104 		/**
       
   105 		* A static array of valid states (in this context).
       
   106 		*/
       
   107 		TState iStates[ ENumStates ];
       
   108 
       
   109 		/**
       
   110 		* Defines the transition that is automatically
       
   111 		* executed after entering this context.
       
   112 		*/
       
   113 		TTransition iInitialTransition;
       
   114 
       
   115 	};
       
   116 
       
   117 #endif // __TVRCONTEXT_H__