0
|
1 |
/*
|
|
2 |
* Copyright (c) 2004 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
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".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description: Definition of the event observer class
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
#ifndef CBASSBOOSTEVENTOBSERVER_H
|
|
22 |
#define CBASSBOOSTEVENTOBSERVER_H
|
|
23 |
|
|
24 |
// INCLUDES
|
|
25 |
#include <e32base.h>
|
|
26 |
#include "BassBoostProxy.h"
|
|
27 |
|
|
28 |
|
|
29 |
// CLASS DECLARATION
|
|
30 |
|
|
31 |
/**
|
|
32 |
* BassBoost event observer provides encapsulates a monitoring request towards the message handler.
|
|
33 |
*
|
|
34 |
* @lib BassBoostProxy.lib
|
|
35 |
* @since 3.0
|
|
36 |
*/
|
|
37 |
class CBassBoostEventObserver : public CActive
|
|
38 |
{
|
|
39 |
public: // Constructors and destructor
|
|
40 |
|
|
41 |
/**
|
|
42 |
* Two-phased constructor.
|
|
43 |
*/
|
|
44 |
static CBassBoostEventObserver* NewL(TMMFMessageDestinationPckg aMessageHandler, MCustomCommand& aCustomCommand,
|
|
45 |
MBassBoostCallback& aCallback);
|
|
46 |
|
|
47 |
/**
|
|
48 |
* Destructor.
|
|
49 |
*/
|
|
50 |
virtual ~CBassBoostEventObserver();
|
|
51 |
|
|
52 |
public: // New functions
|
|
53 |
|
|
54 |
/**
|
|
55 |
* Start event monitoring
|
|
56 |
* @since 3.0
|
|
57 |
*/
|
|
58 |
void Start();
|
|
59 |
|
|
60 |
/**
|
|
61 |
* Stop event monitoring
|
|
62 |
* @since 3.0
|
|
63 |
*/
|
|
64 |
void Stop();
|
|
65 |
|
|
66 |
|
|
67 |
private:
|
|
68 |
|
|
69 |
/**
|
|
70 |
* C++ default constructor.
|
|
71 |
*/
|
|
72 |
CBassBoostEventObserver();
|
|
73 |
|
|
74 |
/**
|
|
75 |
* By default Symbian 2nd phase constructor is private.
|
|
76 |
*/
|
|
77 |
void ConstructL(TMMFMessageDestinationPckg aMessageHandler, MCustomCommand& aCustomCommand,
|
|
78 |
MBassBoostCallback& aCallback);
|
|
79 |
|
|
80 |
void RunL();
|
|
81 |
|
|
82 |
void DoCancel();
|
|
83 |
|
|
84 |
private:
|
|
85 |
|
|
86 |
// Pointer to custom command utility
|
|
87 |
MCustomCommand* iCustomCommand;
|
|
88 |
// Message handler handle
|
|
89 |
TMMFMessageDestinationPckg iMessageHandler;
|
|
90 |
// BassBoost change event Callbacks
|
|
91 |
MBassBoostCallback* iCallback;
|
|
92 |
// Data package received from server
|
|
93 |
TEfBassBoostDataPckg iDataPckgFrom;
|
|
94 |
//
|
|
95 |
TBool iStopped;
|
|
96 |
};
|
|
97 |
|
|
98 |
#endif // CBASSBOOSTEVENTOBSERVER_H
|
|
99 |
|