sl@0: /* sl@0: * Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies). sl@0: * All rights reserved. sl@0: * This component and the accompanying materials are made available sl@0: * under the terms of "Eclipse Public License v1.0" sl@0: * which accompanies this distribution, and is available sl@0: * at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: * sl@0: * Initial Contributors: sl@0: * Nokia Corporation - initial contribution. sl@0: * sl@0: * Contributors: sl@0: * sl@0: * Description: Proxy class for handling client requests sl@0: * sl@0: */ sl@0: sl@0: sl@0: sl@0: #ifndef TELEPHONYAUDIOROUTINGPROXY_H sl@0: #define TELEPHONYAUDIOROUTINGPROXY_H sl@0: sl@0: // INCLUDES sl@0: #include sl@0: #include sl@0: #include "TelephonyAudioRouting.h" sl@0: #include "TelephonyAudioRoutingSession.h" sl@0: sl@0: sl@0: // CLASS DECLARATION sl@0: sl@0: /** sl@0: * Defines client side API for telephony audio routing requests. sl@0: * sl@0: * @lib TelephonyAudioRouting.lib sl@0: * since Series 60 3.1 sl@0: */ sl@0: class CTelephonyAudioRoutingProxy: public CTelephonyAudioRouting sl@0: { sl@0: sl@0: public: // Constructors and destructor sl@0: sl@0: IMPORT_C static CTelephonyAudioRoutingProxy* NewL(MTelephonyAudioRoutingObserver& aObserver); sl@0: sl@0: /** sl@0: * Destructor. sl@0: */ sl@0: virtual ~CTelephonyAudioRoutingProxy(); sl@0: sl@0: /** sl@0: * Provide array of available outputs sl@0: * since Series 60 3.1 sl@0: * @param none sl@0: * @return const TArray: array of available outputs sl@0: */ sl@0: virtual const TArray& AvailableOutputs(); sl@0: sl@0: /** sl@0: * Provide current audio output sl@0: * since Series 60 3.1 sl@0: * @param none sl@0: * @return TAudioOutput: audio output sl@0: */ sl@0: virtual TAudioOutput Output(); sl@0: sl@0: sl@0: /** sl@0: * Request to set the current output sl@0: * since Series 60 3.1 sl@0: * @param aOutput: desired output value sl@0: * @return void sl@0: */ sl@0: virtual void SetOutputL( TAudioOutput aOutput = ENotActive); sl@0: sl@0: /** sl@0: * Provide previous output value sl@0: * since Series 60 3.1 sl@0: * @param none sl@0: * @return TAudioOutput: previous output value. sl@0: */ sl@0: virtual TAudioOutput PreviousOutput(); sl@0: sl@0: sl@0: /** sl@0: * Request to set the ShowNote flag sl@0: * @since Series 60 3.1 sl@0: * @param TBool aMode Show Note mode. ETrue or EFalse. sl@0: * @return KErrNone if succesful, otherwise system-wide error code. sl@0: */ sl@0: virtual TInt SetShowNote( TBool aMode ); sl@0: sl@0: /** sl@0: * Returns the the Show Note mode for the last succesfully completed sl@0: * SetOutputL() request. sl@0: * @since Series 60 3.1 sl@0: * @param TBool aMode. On return of this function will contain sl@0: * Show Note mode. EFalse or ETrue. sl@0: * @return KErrNone if succesful, otherwise system-wide error code. sl@0: */ sl@0: virtual TInt GetShowNote( TBool& aMode ); sl@0: sl@0: sl@0: private: sl@0: sl@0: /** sl@0: * C++ default constructor. sl@0: */ sl@0: CTelephonyAudioRoutingProxy(MTelephonyAudioRoutingObserver& aObserver); sl@0: sl@0: /** sl@0: * EPOC constructor. sl@0: */ sl@0: void ConstructL(); sl@0: TBool ValidateOutputRequest(TAudioOutput aOutput); sl@0: TBool ShowNoteMode(); sl@0: sl@0: private: // Data sl@0: sl@0: MTelephonyAudioRoutingObserver& iObserver; sl@0: RTelephonyAudioRoutingSession iSession; sl@0: TBool iShowNote; sl@0: TArray iAvailableOutputs; sl@0: sl@0: sl@0: }; sl@0: sl@0: #endif // TELEPHONYAUDIOROUTINGPROXY_H sl@0: sl@0: sl@0: // End of File