convergedcallengine/csplugin/inc/cspspeaker.h
branchRCL_3
changeset 20 987c9837762f
parent 0 ff3b6d0fd310
equal deleted inserted replaced
19:7d48bed6ce0c 20:987c9837762f
       
     1 /*
       
     2 * Copyright (c) 2006-2008 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:  Provides speaker functionality
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CSPSPEAKER_H
       
    20 #define CSPSPEAKER_H
       
    21 
       
    22 #include "cspdevsound.h"
       
    23 
       
    24 class MCSPDevSoundObserver;
       
    25 
       
    26 /**
       
    27  *  Provides speaker functionality.
       
    28  *
       
    29  */
       
    30 NONSHARABLE_CLASS( CSPSpeaker ): public CSPDevSound
       
    31     {
       
    32 
       
    33 public:
       
    34 
       
    35     static CSPSpeaker* NewL( MCSPDevSoundObserver& aObserver );
       
    36 
       
    37     virtual ~CSPSpeaker();
       
    38 
       
    39     /** 
       
    40      * Sets volume.
       
    41      * @param aVolume Volume.     
       
    42      */
       
    43     void SetVolume( TInt aVolume );
       
    44     
       
    45     /**
       
    46      * Gets volume.
       
    47      * @return Current volume.
       
    48      */
       
    49     TInt Volume();
       
    50 
       
    51 // from base class MDevSoundObserver
       
    52 
       
    53     /**
       
    54      * From MDevSoundObserver.
       
    55      * Indication from devsound that stream (speaker) has been activated
       
    56      * successfully.
       
    57      */
       
    58     void BufferToBeFilled( CMMFBuffer* /*aBuffer*/ );
       
    59 
       
    60     /**
       
    61      * From MDevSoundObserver.
       
    62      * Indication from devsound that activation of stream( speaker)
       
    63      * failed.
       
    64      */
       
    65     void PlayError( TInt aErrorCode );
       
    66 
       
    67 private:
       
    68         
       
    69     /**
       
    70      * From CSPDevSound.
       
    71      * Tries to activate the mic stream.
       
    72      */
       
    73     void DoActivateL();
       
    74 
       
    75 protected:
       
    76 
       
    77     CSPSpeaker( MCSPDevSoundObserver& aObserver );
       
    78 
       
    79     void ConstructL();
       
    80 
       
    81     };
       
    82 
       
    83 #endif // CSPSPEAKER_H