mmserv/tms/tmscallserver/inc/tmscsdownlink.h
changeset 14 80975da52420
child 16 43d09473c595
equal deleted inserted replaced
12:5a06f39ad45b 14:80975da52420
       
     1 /*
       
     2  * Copyright (c) 2009 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: Telephony Multimedia Service
       
    15  *
       
    16  */
       
    17 
       
    18 #ifndef CSDOWNLINK_H
       
    19 #define CSDOWNLINK_H
       
    20 
       
    21 #include <glib.h>
       
    22 #include "tmscsdevsound.h"
       
    23 
       
    24 namespace TMS {
       
    25 
       
    26 //
       
    27 class TMSCSPDevSoundObserver;
       
    28 
       
    29 /**
       
    30  *  Provides Downlink functionality.
       
    31  *
       
    32  */
       
    33 NONSHARABLE_CLASS(TMSCSDownlink) : public TMSCSPDevSound
       
    34     {
       
    35 public:
       
    36 
       
    37     static TMSCSDownlink* NewL(TMSCSPDevSoundObserver& aObserver);
       
    38 
       
    39     virtual ~TMSCSDownlink();
       
    40 
       
    41     /**
       
    42      * Sets volume.
       
    43      * @param aVolume Volume.
       
    44      */
       
    45     void SetVolume(gint aVolume);
       
    46 
       
    47     /**
       
    48      * Gets volume.
       
    49      * @return Current volume.
       
    50      */
       
    51     gint Volume();
       
    52 
       
    53     /**
       
    54      * Gets max volume.
       
    55      * @return Current volume.
       
    56      */
       
    57     gint MaxVolume();
       
    58 
       
    59     // from base class MDevSoundObserver
       
    60 
       
    61     /**
       
    62      * From MDevSoundObserver.
       
    63      * Indication from devsound that stream (Downlink) has been activated
       
    64      * successfully.
       
    65      */
       
    66     void BufferToBeFilled(CMMFBuffer* /*aBuffer*/);
       
    67 
       
    68     /**
       
    69      * From MDevSoundObserver.
       
    70      * Indication from devsound that activation of stream( Downlink)
       
    71      * failed.
       
    72      */
       
    73     void PlayError(TInt aErrorCode);
       
    74 
       
    75 private:
       
    76 
       
    77     /**
       
    78      * From CSPDevSound.
       
    79      * Tries to activate the mic stream.
       
    80      */
       
    81     void DoActivateL();
       
    82 
       
    83 protected:
       
    84 
       
    85     TMSCSDownlink(TMSCSPDevSoundObserver& aObserver);
       
    86 
       
    87     void ConstructL();
       
    88     };
       
    89 
       
    90 } //namespace TMS
       
    91 
       
    92 #endif // CSDOWNLINK_H