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) 2004 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: This is the definition of the Loudness proxy class. |
sl@0 | 15 |
* |
sl@0 | 16 |
* |
sl@0 | 17 |
*/ |
sl@0 | 18 |
|
sl@0 | 19 |
|
sl@0 | 20 |
#ifndef CLOUDNESSPROXY_H |
sl@0 | 21 |
#define CLOUDNESSPROXY_H |
sl@0 | 22 |
|
sl@0 | 23 |
// INCLUDES |
sl@0 | 24 |
|
sl@0 | 25 |
#include <e32base.h> |
sl@0 | 26 |
#include <LoudnessBase.h> |
sl@0 | 27 |
#include <mmf/common/mmfcontrollerframework.h> |
sl@0 | 28 |
#include <CustomCommandUtility.h> |
sl@0 | 29 |
#include "LoudnessMessageTypes.h" |
sl@0 | 30 |
#include <MLoudnessObserver.h> |
sl@0 | 31 |
|
sl@0 | 32 |
// FORWARD DECLARATION |
sl@0 | 33 |
class CLoudnessEventObserver; |
sl@0 | 34 |
|
sl@0 | 35 |
// CLASS DECLARATION |
sl@0 | 36 |
|
sl@0 | 37 |
/** |
sl@0 | 38 |
* Interface class to be implemented by objects that receives callbacks from Loudness Event Observer. |
sl@0 | 39 |
* |
sl@0 | 40 |
* @since 3.0 |
sl@0 | 41 |
*/ |
sl@0 | 42 |
class MLoudnessCallback |
sl@0 | 43 |
{ |
sl@0 | 44 |
public: |
sl@0 | 45 |
|
sl@0 | 46 |
/** |
sl@0 | 47 |
* Invoked by the Loudness Event Observer when the Loudness object changes state |
sl@0 | 48 |
* @since 3.0 |
sl@0 | 49 |
* @param aBuffer Buffer containing the Loudness data |
sl@0 | 50 |
*/ |
sl@0 | 51 |
virtual void LoudnessEvent( const TDesC8& aDataPckg ) = 0; |
sl@0 | 52 |
|
sl@0 | 53 |
}; |
sl@0 | 54 |
|
sl@0 | 55 |
/** |
sl@0 | 56 |
* This is the Loudness effect proxy class responsible for handling framework messages. |
sl@0 | 57 |
* |
sl@0 | 58 |
* @lib LoudnessProxy.lib |
sl@0 | 59 |
* @since 3.0 |
sl@0 | 60 |
*/ |
sl@0 | 61 |
|
sl@0 | 62 |
class CLoudnessProxy : public CLoudness, |
sl@0 | 63 |
public MLoudnessCallback |
sl@0 | 64 |
{ |
sl@0 | 65 |
public: // Constructors and destructor |
sl@0 | 66 |
|
sl@0 | 67 |
/** |
sl@0 | 68 |
* |
sl@0 | 69 |
* Factory function for creating the Loudness proxy object. |
sl@0 | 70 |
* @since 3.0 |
sl@0 | 71 |
* @param aMessageHandler reference to message handler |
sl@0 | 72 |
* @param aCustomCommand reference to custom command utility |
sl@0 | 73 |
* @return pointer to a Loudness proxy object |
sl@0 | 74 |
*/ |
sl@0 | 75 |
IMPORT_C static CLoudnessProxy* NewL( TMMFMessageDestinationPckg aMessageHandler, |
sl@0 | 76 |
MCustomCommand& aCustomCommand, |
sl@0 | 77 |
CCustomInterfaceUtility* aCustomInterfaceUtility ); |
sl@0 | 78 |
/** |
sl@0 | 79 |
* |
sl@0 | 80 |
* Destructor |
sl@0 | 81 |
*/ |
sl@0 | 82 |
virtual ~CLoudnessProxy(); |
sl@0 | 83 |
|
sl@0 | 84 |
public: // functions from base class |
sl@0 | 85 |
|
sl@0 | 86 |
/** |
sl@0 | 87 |
* From CAudioEffect |
sl@0 | 88 |
* Apply effect settings |
sl@0 | 89 |
* @since 3.0 |
sl@0 | 90 |
*/ |
sl@0 | 91 |
IMPORT_C virtual void ApplyL(); |
sl@0 | 92 |
|
sl@0 | 93 |
public: // functions from MLoudnessCallback |
sl@0 | 94 |
|
sl@0 | 95 |
/** |
sl@0 | 96 |
* From MLoudnessCallback |
sl@0 | 97 |
* Changes to Loudness data has occured |
sl@0 | 98 |
* @since 3.0 |
sl@0 | 99 |
* @param aBuffer Buffer containing serialized Loudness data |
sl@0 | 100 |
*/ |
sl@0 | 101 |
void LoudnessEvent( const TDesC8& aDataPckg ); |
sl@0 | 102 |
|
sl@0 | 103 |
private: |
sl@0 | 104 |
|
sl@0 | 105 |
/** |
sl@0 | 106 |
* Private C++ constructor for this class. |
sl@0 | 107 |
* @since 3.0 |
sl@0 | 108 |
* @param aMessageHandler reference to message handler |
sl@0 | 109 |
* @param aCustomCommand reference to custom command utility |
sl@0 | 110 |
* @return - |
sl@0 | 111 |
*/ |
sl@0 | 112 |
CLoudnessProxy(TMMFMessageDestinationPckg aMessageHandler, MCustomCommand& aCustomCommand, |
sl@0 | 113 |
CCustomInterfaceUtility* aCustomInterfaceUtility); |
sl@0 | 114 |
|
sl@0 | 115 |
/** |
sl@0 | 116 |
* Second phase constructor for this class. |
sl@0 | 117 |
* @since 3.0 |
sl@0 | 118 |
* @return - |
sl@0 | 119 |
*/ |
sl@0 | 120 |
void ConstructL(); |
sl@0 | 121 |
|
sl@0 | 122 |
/** |
sl@0 | 123 |
* Start the active observer. |
sl@0 | 124 |
* @since 3.0 |
sl@0 | 125 |
* @param - |
sl@0 | 126 |
* @return - |
sl@0 | 127 |
*/ |
sl@0 | 128 |
void StartObserver(); |
sl@0 | 129 |
|
sl@0 | 130 |
private: |
sl@0 | 131 |
|
sl@0 | 132 |
// Pointer to custom command utility |
sl@0 | 133 |
MCustomCommand* iCustomCommand; |
sl@0 | 134 |
// Message handler handle |
sl@0 | 135 |
TMMFMessageDestinationPckg iMessageHandler; |
sl@0 | 136 |
// Loudness Event Observer |
sl@0 | 137 |
CLoudnessEventObserver* iLoudnessEventObserver; |
sl@0 | 138 |
// Pointer to the custom interface utility |
sl@0 | 139 |
CCustomInterfaceUtility* iCustomInterfaceUtility; |
sl@0 | 140 |
|
sl@0 | 141 |
|
sl@0 | 142 |
|
sl@0 | 143 |
}; |
sl@0 | 144 |
|
sl@0 | 145 |
#endif // of CLOUDNESSPROXY_H |
sl@0 | 146 |
|
sl@0 | 147 |
// End of File |