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