ipappsrv_plat/multimedia_comms_api/inc/mcemicsource.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     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:    
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef CMCEMICSOURCE_H
       
    22 #define CMCEMICSOURCE_H
       
    23 
       
    24 // INCLUDES
       
    25 #include <e32std.h>
       
    26 #include <mcemediasource.h>
       
    27   
       
    28 // DATA TYPES
       
    29 const TMceSourceType KMceMicSource = 2;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 * Class representing microphone in MCE.
       
    35 *
       
    36 * CMceMicSource can be used to record audio from microphone.
       
    37 *
       
    38 * Enable (un-mute) and Disable (mute) operations to it are considered
       
    39 * to be local, so they are not signalled to remote terminal.
       
    40 * 
       
    41 *  @lib mceclient.lib
       
    42 */
       
    43 class CMceMicSource: public CMceMediaSource
       
    44 	{
       
    45 	public: // Constructors and destructor
       
    46 
       
    47 	    /**
       
    48 	    * Two-phased constructor.
       
    49 	    */
       
    50 		IMPORT_C static CMceMicSource* NewL();
       
    51 		
       
    52 	    /**
       
    53 	    * Two-phased constructor.
       
    54 	    */
       
    55 		IMPORT_C static CMceMicSource* NewLC();
       
    56 
       
    57 	    /**
       
    58 	    * Destructor.
       
    59 	    */
       
    60 		IMPORT_C ~CMceMicSource();
       
    61 
       
    62 	public: // Functions
       
    63 
       
    64 	    /**
       
    65 	    * Enables streaming explicitly (aka un-mute).
       
    66 	    */
       
    67 		IMPORT_C void EnableL();
       
    68 
       
    69 	    /**
       
    70 	    * Disables streaming explicitly (aka mute).
       
    71 	    */
       
    72 		IMPORT_C void DisableL();
       
    73 		
       
    74         /**
       
    75         * Sets gain 
       
    76         * @param aGain, 
       
    77         */
       
    78 		IMPORT_C void SetGainL( TInt aGain );
       
    79 		
       
    80         /**
       
    81         * Gets current gain 
       
    82         * @return value of current volume, 
       
    83         */
       
    84 		IMPORT_C TInt GainL() const;
       
    85 		
       
    86         /**
       
    87         * Gets maximum gain
       
    88         * @return value of mamimum gain, 
       
    89         */
       
    90 		IMPORT_C TInt MaxGainL() const;		
       
    91 
       
    92 
       
    93 	private:
       
    94 
       
    95 	    /**
       
    96 	     * C++ default constructor.
       
    97 	     */
       
    98 		CMceMicSource();
       
    99 
       
   100 	    /**
       
   101 	     * second-phase constructor
       
   102 	     */
       
   103 		void ConstructL();
       
   104 
       
   105 	private: // Data
       
   106 
       
   107 		//for testing
       
   108 
       
   109 	    MCE_UNIT_TEST_DEFS	
       
   110 	};
       
   111 
       
   112 
       
   113 #endif