Update contrib.
2 * Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: This is the definition of the bassboost proxy class.
20 #ifndef CBASSBOOSTPROXY_H
21 #define CBASSBOOSTPROXY_H
26 #include <BassBoostBase.h>
27 #include <mmf/common/mmfcontrollerframework.h>
28 #include <CustomCommandUtility.h>
29 #include "BassBoostMessageTypes.h"
30 #include <MBassBoostObserver.h>
31 #include <MAudioEffectObserver.h>
33 // FORWARD DECLARATION
34 class CBassBoostEventObserver;
39 * Interface class to be implemented by objects that receives callbacks from BassBoost Event Observer.
43 class MBassBoostCallback
48 * Invoked by the BassBoost Event Observer when the bassboost object changes state
50 * @param aBuffer Buffer containing the bassboost data
52 virtual void BassBoostEvent( const TDesC8& aDataPckg ) = 0;
57 * This is the bassboost effect proxy class responsible for handling framework messages.
59 * @lib BassBoostProxy.lib
63 class CBassBoostProxy : public CBassBoost,
64 public MBassBoostCallback
66 public: // Constructors and destructor
70 * Factory function for creating the bassboost proxy object.
72 * @param aMessageHandler reference to message handler
73 * @param aCustomCommand reference to custom command utility
74 * @return pointer to a bassboost proxy object
76 IMPORT_C static CBassBoostProxy* NewL( TMMFMessageDestinationPckg aMessageHandler,
77 MCustomCommand& aCustomCommand,
78 CCustomInterfaceUtility* aCustomInterfaceUtility );
83 virtual ~CBassBoostProxy();
85 public: // functions from base class
89 * Apply effect settings
92 IMPORT_C virtual void ApplyL();
94 public: // functions from MBassBoostCallback
97 * From MBassBoostCallback
98 * Changes to bassboost data has occured
100 * @param aBuffer Buffer containing serialized bassboost data
102 void BassBoostEvent( const TDesC8& aDataPckg );
107 * Private C++ constructor for this class.
109 * @param aMessageHandler reference to message handler
110 * @param aCustomCommand reference to custom command utility
113 CBassBoostProxy(TMMFMessageDestinationPckg aMessageHandler, MCustomCommand& aCustomCommand,
114 CCustomInterfaceUtility* aCustomInterfaceUtility);
117 * Second phase constructor for this class.
124 * Start the active observer.
129 void StartObserver();
133 // Pointer to custom command utility
134 MCustomCommand* iCustomCommand;
135 // Message handler handle
136 TMMFMessageDestinationPckg iMessageHandler;
137 // BassBoost Event Observer
138 CBassBoostEventObserver* iBassBoostEventObserver;
139 // Pointer to the custom interface utility
140 CCustomInterfaceUtility* iCustomInterfaceUtility;
144 #endif // of CBASSBOOSTPROXY_H