javauis/mmapi_qt/camerasound/inc/cmmacamerasound.h
branchRCL_3
changeset 24 0fd27995241b
equal deleted inserted replaced
20:f9bb0fca356a 24:0fd27995241b
       
     1 /*
       
     2 * Copyright (c) 2005 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:  This class is used to play sound from file.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CMMACAMERASOUND_H
       
    20 #define CMMACAMERASOUND_H
       
    21 
       
    22 //  INCLUDES
       
    23 #include <mdaaudiosampleplayer.h>
       
    24 
       
    25 // CLASS DECLARATION
       
    26 /**
       
    27 * This class is used to play sound from file.
       
    28 */
       
    29 NONSHARABLE_CLASS(CMMACameraSound) : public CBase,
       
    30         public MMdaAudioPlayerCallback
       
    31 {
       
    32 public: // Constructor and destructor
       
    33 
       
    34     /**
       
    35     * Two-phased constructor.
       
    36     */
       
    37     static CMMACameraSound* NewLC();
       
    38 
       
    39     /**
       
    40     * Destructor.
       
    41     */
       
    42     virtual ~CMMACameraSound();
       
    43 
       
    44 
       
    45 public: // New functions
       
    46 
       
    47     /**
       
    48      * Plays sound from a file when capturing a image.
       
    49      */
       
    50     static void PlayImageCaptureSoundL();
       
    51 
       
    52     /**
       
    53     * Plays sound from a file when video recording starts.
       
    54     */
       
    55     static void PlayVideoRecordSoundL();
       
    56 
       
    57 protected: // New functions
       
    58 
       
    59     /**
       
    60     * Plays sound from a file.
       
    61     * @param aFileName - The full path name of the file
       
    62     *                    containing the audio data.
       
    63     */
       
    64     void PlaySoundL(const TDesC& aFileName);
       
    65 
       
    66 
       
    67 public: // from MMdaAudioPlayerCallback
       
    68 
       
    69     void MapcInitComplete(TInt aError,
       
    70                           const TTimeIntervalMicroSeconds& /*aDuration*/);
       
    71 
       
    72     void MapcPlayComplete(TInt aError);
       
    73 
       
    74 
       
    75 private: // Constructors
       
    76 
       
    77     /**
       
    78     * C++ default constructor.
       
    79     */
       
    80     CMMACameraSound();
       
    81 
       
    82     /**
       
    83     * By default Symbian 2nd phase constructor is private.
       
    84     */
       
    85     void ConstructL();
       
    86 
       
    87 private: //Data
       
    88 
       
    89     CActiveSchedulerWait* iActiveSchedulerWait; // owned
       
    90 
       
    91     TInt iError;
       
    92 };
       
    93 
       
    94 #endif // CMMACAMERASOUND_H
       
    95 
       
    96 // End of File