voicerecorder/group/VRConsts.h
branchRCL_3
changeset 20 072a5fa0c63b
parent 19 2f5c9ee7098c
child 21 c6bafb5162d8
equal deleted inserted replaced
19:2f5c9ee7098c 20:072a5fa0c63b
     1 /*
       
     2 * Copyright (c) 2002 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 header file defines some constants, string literals and
       
    16 *     enumerations used globally in Voice Recorder.
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 #ifndef __VRCONSTS_H__
       
    22 #define __VRCONSTS_H__
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32def.h>
       
    26 #include <e32std.h>
       
    27 #include <bldvariant.hrh>
       
    28 
       
    29 // STRING LITERALS
       
    30 _LIT( KVRAppResourceFile, "z:VoiceRecorder.rsc" );
       
    31 
       
    32 _LIT( KVRBitmapFile, "z:VoiceRecorder.mbm" );
       
    33 _LIT(KVRGSBitmapFile,"z:VoiceRecorder_aif.mif");
       
    34 
       
    35 _LIT( KVRMemoStoreSharedDataKey, "MemoStore");
       
    36 _LIT( KVRDefaultSpeakerSharedDataKey, "DefaultSpeaker" );
       
    37 _LIT( KVRPanic, "VoiceRec" );
       
    38 
       
    39 _LIT( KVRPluginFile,"z:GSVoiceRecorderPlugin.mif" );
       
    40 
       
    41 // CONSTANTS
       
    42 const TInt KVRBytes60SecAmr( 5000 );
       
    43 const TInt KVRMaxTransitions( 13 );
       
    44 const TInt KVRDefaultVolume( 4 );
       
    45 const TInt KVRDefaultMaxLength( 60 );
       
    46 const TInt KVRMaxVolumeSteps( 10 );
       
    47 const TInt KVRSecondAsMicroSeconds( 1000000 );
       
    48 const TInt KVRMinuteAsMicroSeconds( 60000000 );
       
    49 const TInt KVRDisplayUpdateDelay( 250000 );
       
    50 
       
    51 const TInt KVRHalfSecondAsMilliSeconds( 500 );
       
    52 const TInt KVRSecondAsMilliSeconds( 1000 );
       
    53 // Critical memory level that has to be taken into account when
       
    54 // calculating estimate for Max recording time
       
    55 //const TInt KVRCriticalMemoryLevel( 130000 ); // In Bytes
       
    56 
       
    57 const TInt KVRAACCriticalMemoryLevel( 400000 ); // In Bytes
       
    58 
       
    59 // This should so big that is covers 60 secs AMR or alternatively
       
    60 // 5 secs WAV recording. 
       
    61 const TInt KVRRecStartMemBuf( 100000 ); // In Bytes
       
    62 
       
    63 const TInt KVRSendUiMsgSize( 1024 );
       
    64 
       
    65 // AVKON volume control values go from 1 to 10
       
    66 const TInt KVRVolumeControlMin( 1 );
       
    67 const TInt KVRVolumeControlMax( 10 );
       
    68 
       
    69 const TUint KVRDefaultAmrBitrate( 12200 );
       
    70 
       
    71 // Time after which the maximum recording time label is updated for
       
    72 // the first time in milliseconds
       
    73 const TInt KVRFirstEstimateTime( 3000000 );
       
    74 
       
    75 const TUint  KVRDefaultBitrateAac(64000);
       
    76 
       
    77 const TInt KVRDefaultSamplerateAac(48000);
       
    78 
       
    79 const TInt KVRDefaultStereoMonoFlag(1);
       
    80 
       
    81 const TInt KVRDefaultAacRecordLength(60);
       
    82 
       
    83 // ENUMERATIONS
       
    84 
       
    85 // Don't change the order (snagged from SharedDataKeys.h)
       
    86 
       
    87 enum TVRStateForVD
       
    88 	{
       
    89 	EVRIdle = 0,
       
    90 	EVRRecording,
       
    91 	EVRPlaying
       
    92 	};
       
    93 
       
    94 enum TVRAllowScreenSaver
       
    95 	{
       
    96 	EVRScreenSaverAllowed = 0,
       
    97 	EVRScreenSaverNotAllowed
       
    98 	};
       
    99 
       
   100 enum TVRMemoStore
       
   101 	{
       
   102 	EMemoStorePhoneMemory,
       
   103 	EMemoStoreMMC
       
   104 	};
       
   105 
       
   106 enum TVRPanic
       
   107 	{
       
   108 	EPanicUnknown,				// 0
       
   109 	EPanicUnknownViewId,		// 1
       
   110 	EPanicFunctionUnknown,		// 2
       
   111 	EPanicInvalidContext,		// 3
       
   112 	EPanicInvalidState,			// 4
       
   113 	EPanicInvalidTransition,	// 5
       
   114 	EPanicTooManyTransitions,	// 6
       
   115 	EPanicNotAttached,			// 7
       
   116 	EPanicAlreadyAttached,		// 8
       
   117 	EPanicInvalidSetting		// 9
       
   118 	};
       
   119 
       
   120 // These values are used against a bitmask
       
   121 // All values should be powers of 2
       
   122 enum TVRFeature
       
   123 	{
       
   124 	EVRFeatureShowQualitySetting	= 1,
       
   125 	EVRFeatureNext					= 2
       
   126 	};
       
   127 	
       
   128 enum TVRFiletype
       
   129     {
       
   130     EVRFileAmr              = 1,
       
   131     EVRFileQCelp,
       
   132     EVRFileWav
       
   133 
       
   134 #ifdef  __AAC_ENCODER_PLUGIN
       
   135     , EVRFileAAC_LC
       
   136 #endif
       
   137     };
       
   138 
       
   139 // Commands for special update events
       
   140 enum TVRUpdateCommand
       
   141     {
       
   142     EVRUpdate               = 1,
       
   143     EVRUpdate1Second,           // Called when 1 second limit is passed during playback
       
   144     EVRUpdateStateChange,       // Called when state machine state has changed
       
   145     EVRUpdatePositionChange,	// Position changes so that update is needed
       
   146     EVRUpdateCBA				// Called when CBA buttons have to be updated
       
   147     };
       
   148 
       
   149 #endif // __VRCONSTS_H__