os/mm/devsoundextensions/telephonyaudiorouting/TelephonyAudioRoutingBase/inc/TelephonyAudioRoutingProxy.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
     1 /*
     2 * Copyright (c) 2006 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:   Proxy class for handling client requests
    15 *
    16 */
    17 
    18 
    19 
    20 #ifndef TELEPHONYAUDIOROUTINGPROXY_H
    21 #define TELEPHONYAUDIOROUTINGPROXY_H
    22 
    23 //  INCLUDES
    24 #include <e32base.h>
    25 #include  <e32std.h>
    26 #include "TelephonyAudioRouting.h"
    27 #include "TelephonyAudioRoutingSession.h"
    28 
    29 
    30 // CLASS DECLARATION
    31 
    32 /**
    33 *  Defines client side API for telephony audio routing requests.
    34 *  
    35 * @lib TelephonyAudioRouting.lib
    36 * since Series 60 3.1
    37 */
    38 class CTelephonyAudioRoutingProxy: public CTelephonyAudioRouting
    39 	{
    40 	
    41     public:  // Constructors and destructor
    42 
    43 		IMPORT_C static CTelephonyAudioRoutingProxy* NewL(MTelephonyAudioRoutingObserver& aObserver);
    44 		
    45 		/**
    46 		* Destructor.
    47 		*/
    48 		virtual ~CTelephonyAudioRoutingProxy();
    49 
    50 		/**
    51 		* Provide array of available outputs
    52 		* since Series 60 3.1
    53 		* @param none
    54 		* @return const TArray<TAudioOutput>: array of available outputs
    55 		*/
    56 		virtual const TArray<TAudioOutput>& AvailableOutputs();
    57 		
    58 		/**
    59 		* Provide current audio output
    60 		* since Series 60 3.1
    61 		* @param none
    62 		* @return TAudioOutput: audio output
    63 		*/
    64 		virtual TAudioOutput Output();
    65 
    66 	
    67 		/**
    68 		* Request to set the current output
    69 		* since Series 60 3.1
    70 		* @param aOutput: desired output value
    71 		* @return void
    72 		*/
    73 		virtual void SetOutputL( TAudioOutput aOutput = ENotActive);
    74 		
    75 		/**
    76 		* Provide previous output value
    77 		* since Series 60 3.1
    78 		* @param none
    79 		* @return TAudioOutput: previous output value.
    80 		*/
    81 		virtual TAudioOutput PreviousOutput();
    82 		
    83 	
    84 		/**
    85 		* Request to set the ShowNote flag       
    86        	* @since Series 60 3.1
    87         * @param TBool aMode Show Note mode. ETrue or EFalse.
    88         * @return KErrNone if succesful, otherwise system-wide error code.
    89         */
    90         virtual TInt SetShowNote( TBool aMode );
    91         
    92        	/**
    93         * Returns the the Show Note mode for the last succesfully completed
    94         * SetOutputL() request. 
    95        	* @since Series 60 3.1
    96         * @param TBool aMode. On return of this function will contain
    97         *        Show Note mode. EFalse or ETrue.
    98         * @return KErrNone if succesful, otherwise system-wide error code.
    99         */
   100         virtual TInt GetShowNote( TBool& aMode );
   101                
   102        				
   103 	private:
   104 
   105 		/**
   106 		* C++ default constructor.
   107 		*/
   108 		CTelephonyAudioRoutingProxy(MTelephonyAudioRoutingObserver& aObserver);
   109 		
   110 		/**
   111 		* EPOC constructor.
   112 		*/
   113 		void ConstructL();
   114 		TBool ValidateOutputRequest(TAudioOutput aOutput);
   115 		TBool ShowNoteMode();				
   116 		
   117     private:    // Data
   118 
   119 		MTelephonyAudioRoutingObserver&		iObserver;
   120 		RTelephonyAudioRoutingSession 		iSession;
   121 		TBool								iShowNote;
   122 		TArray<CTelephonyAudioRouting::TAudioOutput> iAvailableOutputs;
   123 
   124 			
   125 	};
   126 
   127 #endif      // TELEPHONYAUDIOROUTINGPROXY_H
   128 
   129            
   130 // End of File