vtengines/videoteleng/Inc/Extensions/cvtengr2ftoneplayer.h
changeset 18 d9b6a8729acd
parent 4 6dc066157ed4
child 23 c378a0498b84
child 27 dcbddbbaf8fd
equal deleted inserted replaced
4:6dc066157ed4 18:d9b6a8729acd
     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:  Plays video start/stop sounds. 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CVTENGR2FTONEPLAYER_H
       
    20 #define CVTENGR2FTONEPLAYER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <mdaaudiosampleplayer.h>
       
    25 
       
    26 // CONSTANTS
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 
       
    30 // CLASS DECLARATION
       
    31 
       
    32 /**
       
    33 * Plays video start/stop sounds.
       
    34 * @since s60 v5.0
       
    35 */
       
    36 NONSHARABLE_CLASS ( CVtEngR2FTonePlayer ) : public CBase,
       
    37                          public MMdaAudioPlayerCallback 
       
    38     {
       
    39     public: // Constructors and destructor
       
    40 
       
    41         /**
       
    42         * Two-phased constructor.
       
    43         */
       
    44         static CVtEngR2FTonePlayer* NewL();
       
    45 
       
    46         /**
       
    47         * Destructor.
       
    48         */
       
    49         virtual ~CVtEngR2FTonePlayer();
       
    50 
       
    51     public: // New functions
       
    52         /**
       
    53         * Play a sound with given id.
       
    54         * @param aSound identifies which sound to play
       
    55         *        (see r_ccor_sound_list in resources).
       
    56         * @return Symbian error code. 
       
    57         */
       
    58         TInt PlaySound( TInt aSound );
       
    59         
       
    60         /**
       
    61         * Stop any ongoing sound.
       
    62         */
       
    63         void StopSound();
       
    64 
       
    65     private: // Functions from base classes
       
    66         /**
       
    67         * From MMdaAudioPlayerCallback.
       
    68         */
       
    69         void MapcInitComplete( TInt aError, 
       
    70             const TTimeIntervalMicroSeconds& aDuration );
       
    71 
       
    72         /**
       
    73         * From MMdaAudioPlayerCallback.
       
    74         */
       
    75         void MapcPlayComplete( TInt aError );
       
    76 
       
    77     private: // New functions
       
    78         /**
       
    79         * C++ constructor.
       
    80         */
       
    81         CVtEngR2FTonePlayer();
       
    82 
       
    83         /**
       
    84         * Symbian OS 2nd phase constructor.
       
    85         */
       
    86         void ConstructL();
       
    87 
       
    88     private: // Data
       
    89 
       
    90         TBool iOpenFileInProgress;
       
    91         TBool iSoundInProgress;
       
    92         CMdaAudioPlayerUtility* iAudioPlayer; // owned
       
    93 
       
    94         HBufC* iVideoStartSound;              // owned
       
    95         HBufC* iVideoStopSound;               // owned
       
    96     
       
    97     public:
       
    98        	
       
    99        	/**
       
   100     	*	Enum for tone player sound ID's
       
   101     	*/
       
   102   		enum TVtR2FSoundId
       
   103 			{
       
   104 			/** Video record start sound*/
       
   105      		EVtR2FVideoStartSoundId = 1,
       
   106      		/** Video record stopt sound*/
       
   107      		EVtR2FVideoStopSoundId  
       
   108      		};    
       
   109     };
       
   110 
       
   111 #endif //CVTENGR2FTONEPLAYER_H
       
   112 
       
   113 // End of File