mmsharing/livecommsui/lcui/tsrc/mustester/Stubs/mceclientstub/inc/mcespeakersink.h
branchRCL_3
changeset 33 bc78a40cd63c
parent 32 73a1feb507fb
child 35 6c57ef9392d2
equal deleted inserted replaced
32:73a1feb507fb 33:bc78a40cd63c
     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 #ifndef CMCESPEAKERSINK_H
       
    20 #define CMCESPEAKERSINK_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32std.h>  
       
    24 #include <mcemediasink.h>
       
    25 
       
    26 // DATA TYPES
       
    27 const TMceSinkType KMceSpeakerSink = 2;
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 const TInt KMceAudioRoutePrivate = 3;
       
    32 const TInt KMceAudioRoutePublic = 4;
       
    33 
       
    34 /**
       
    35 * Class representing speaker in MCE.
       
    36 *
       
    37 * CMceSpeakerSink can be used to play out audio.
       
    38 *
       
    39 * Enable (un-mute) and Disable (mute) operations to it are considered
       
    40 * to be local, so they are not signalled to remote terminal.
       
    41 * 
       
    42 *  @lib mceclient.lib
       
    43 */
       
    44 class CMceSpeakerSink: public CMceMediaSink
       
    45 	{
       
    46 	public: // Constructors and destructor
       
    47 
       
    48 	    /**
       
    49 	    * Two-phased constructor.
       
    50 	    */
       
    51 		IMPORT_C static CMceSpeakerSink* NewL();
       
    52 
       
    53 	    /**
       
    54 	    * Two-phased constructor.
       
    55 	    */
       
    56 		IMPORT_C static CMceSpeakerSink* NewLC();
       
    57 
       
    58 	    /**
       
    59 	    * Destructor.
       
    60 	    */
       
    61 		IMPORT_C ~CMceSpeakerSink();
       
    62 
       
    63 	public: // Functions
       
    64 
       
    65 	    /**
       
    66 	    * Enables streaming explicitly.
       
    67 	    */
       
    68 		IMPORT_C void EnableL(); 
       
    69 
       
    70 	    /**
       
    71 	    * Disables streaming explicitly.
       
    72 	    */
       
    73 		IMPORT_C void DisableL(); 
       
    74 		
       
    75         /**
       
    76         * Sets volume 
       
    77         * @param aVolume, 
       
    78         */
       
    79 		IMPORT_C void SetVolumeL( TInt aVolume );
       
    80 		
       
    81         /**
       
    82         * Gets current volume 
       
    83         * @return value of current volume, 
       
    84         */
       
    85 		IMPORT_C TInt VolumeL() const;
       
    86 		
       
    87         /**
       
    88         * Gets maximum volume 
       
    89         * @return value of mamimum volume, 
       
    90         */
       
    91 		IMPORT_C TInt MaxVolumeL() const;
       
    92 
       
    93         /**
       
    94         * Sets audio routing 
       
    95         * @param aRoute Required audio route, like KMceAudioRoutePublic. 
       
    96         */
       
    97         IMPORT_C void SetRoutingL( TInt aRoute );
       
    98 
       
    99         /**
       
   100         * Gets current audio routing. 
       
   101         * @return TInt Current audio routing. 
       
   102         */
       
   103         IMPORT_C TInt RoutingL() const;
       
   104 		
       
   105 	private:
       
   106 
       
   107 	    /**
       
   108 	     * C++ default constructor.
       
   109 	     */
       
   110 		CMceSpeakerSink();
       
   111 
       
   112 	    /**
       
   113 	    * second-phase constructor
       
   114 	    */
       
   115 		void ConstructL();
       
   116 
       
   117 	
       
   118 		
       
   119 		
       
   120     public: // stub data
       
   121     
       
   122         TInt iVolume;
       
   123         
       
   124         TInt iMaxVolume;
       
   125         
       
   126         TInt iAudioRouting;
       
   127 
       
   128 	};
       
   129 
       
   130 #endif