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