os/mm/devsoundextensions/telephonyaudiorouting/TelephonyAudioRoutingBase/inc/TelephonyAudioRoutingProxy.h
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/os/mm/devsoundextensions/telephonyaudiorouting/TelephonyAudioRoutingBase/inc/TelephonyAudioRoutingProxy.h Fri Jun 15 03:10:57 2012 +0200
1.3 @@ -0,0 +1,130 @@
1.4 +/*
1.5 +* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
1.6 +* All rights reserved.
1.7 +* This component and the accompanying materials are made available
1.8 +* under the terms of "Eclipse Public License v1.0"
1.9 +* which accompanies this distribution, and is available
1.10 +* at the URL "http://www.eclipse.org/legal/epl-v10.html".
1.11 +*
1.12 +* Initial Contributors:
1.13 +* Nokia Corporation - initial contribution.
1.14 +*
1.15 +* Contributors:
1.16 +*
1.17 +* Description: Proxy class for handling client requests
1.18 +*
1.19 +*/
1.20 +
1.21 +
1.22 +
1.23 +#ifndef TELEPHONYAUDIOROUTINGPROXY_H
1.24 +#define TELEPHONYAUDIOROUTINGPROXY_H
1.25 +
1.26 +// INCLUDES
1.27 +#include <e32base.h>
1.28 +#include <e32std.h>
1.29 +#include "TelephonyAudioRouting.h"
1.30 +#include "TelephonyAudioRoutingSession.h"
1.31 +
1.32 +
1.33 +// CLASS DECLARATION
1.34 +
1.35 +/**
1.36 +* Defines client side API for telephony audio routing requests.
1.37 +*
1.38 +* @lib TelephonyAudioRouting.lib
1.39 +* since Series 60 3.1
1.40 +*/
1.41 +class CTelephonyAudioRoutingProxy: public CTelephonyAudioRouting
1.42 + {
1.43 +
1.44 + public: // Constructors and destructor
1.45 +
1.46 + IMPORT_C static CTelephonyAudioRoutingProxy* NewL(MTelephonyAudioRoutingObserver& aObserver);
1.47 +
1.48 + /**
1.49 + * Destructor.
1.50 + */
1.51 + virtual ~CTelephonyAudioRoutingProxy();
1.52 +
1.53 + /**
1.54 + * Provide array of available outputs
1.55 + * since Series 60 3.1
1.56 + * @param none
1.57 + * @return const TArray<TAudioOutput>: array of available outputs
1.58 + */
1.59 + virtual const TArray<TAudioOutput>& AvailableOutputs();
1.60 +
1.61 + /**
1.62 + * Provide current audio output
1.63 + * since Series 60 3.1
1.64 + * @param none
1.65 + * @return TAudioOutput: audio output
1.66 + */
1.67 + virtual TAudioOutput Output();
1.68 +
1.69 +
1.70 + /**
1.71 + * Request to set the current output
1.72 + * since Series 60 3.1
1.73 + * @param aOutput: desired output value
1.74 + * @return void
1.75 + */
1.76 + virtual void SetOutputL( TAudioOutput aOutput = ENotActive);
1.77 +
1.78 + /**
1.79 + * Provide previous output value
1.80 + * since Series 60 3.1
1.81 + * @param none
1.82 + * @return TAudioOutput: previous output value.
1.83 + */
1.84 + virtual TAudioOutput PreviousOutput();
1.85 +
1.86 +
1.87 + /**
1.88 + * Request to set the ShowNote flag
1.89 + * @since Series 60 3.1
1.90 + * @param TBool aMode Show Note mode. ETrue or EFalse.
1.91 + * @return KErrNone if succesful, otherwise system-wide error code.
1.92 + */
1.93 + virtual TInt SetShowNote( TBool aMode );
1.94 +
1.95 + /**
1.96 + * Returns the the Show Note mode for the last succesfully completed
1.97 + * SetOutputL() request.
1.98 + * @since Series 60 3.1
1.99 + * @param TBool aMode. On return of this function will contain
1.100 + * Show Note mode. EFalse or ETrue.
1.101 + * @return KErrNone if succesful, otherwise system-wide error code.
1.102 + */
1.103 + virtual TInt GetShowNote( TBool& aMode );
1.104 +
1.105 +
1.106 + private:
1.107 +
1.108 + /**
1.109 + * C++ default constructor.
1.110 + */
1.111 + CTelephonyAudioRoutingProxy(MTelephonyAudioRoutingObserver& aObserver);
1.112 +
1.113 + /**
1.114 + * EPOC constructor.
1.115 + */
1.116 + void ConstructL();
1.117 + TBool ValidateOutputRequest(TAudioOutput aOutput);
1.118 + TBool ShowNoteMode();
1.119 +
1.120 + private: // Data
1.121 +
1.122 + MTelephonyAudioRoutingObserver& iObserver;
1.123 + RTelephonyAudioRoutingSession iSession;
1.124 + TBool iShowNote;
1.125 + TArray<CTelephonyAudioRouting::TAudioOutput> iAvailableOutputs;
1.126 +
1.127 +
1.128 + };
1.129 +
1.130 +#endif // TELEPHONYAUDIOROUTINGPROXY_H
1.131 +
1.132 +
1.133 +// End of File