1 /* |
|
2 * Copyright (c) 2009 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: Wrapper for equalizer utility. |
|
15 * |
|
16 */ |
|
17 |
|
18 // System includes |
|
19 #include "mptrace.h" |
|
20 |
|
21 // User includes |
|
22 #include "stub/inc/mpequalizerwrapper.h" |
|
23 |
|
24 /*! |
|
25 Constructs a new MpEqualizerWrapper with \a parent |
|
26 */ |
|
27 MpEqualizerWrapper::MpEqualizerWrapper(QObject *parent) |
|
28 : mActivePreset(-1), |
|
29 mApplyPresetCount(0), |
|
30 mDisableEquqlizerCount(0) |
|
31 { |
|
32 Q_UNUSED(parent); |
|
33 TX_ENTRY |
|
34 TX_LOG_ARGS( "Stub wrapper" ); |
|
35 TX_EXIT |
|
36 } |
|
37 |
|
38 /*! |
|
39 Destructs the class and its private imaplementation. |
|
40 |
|
41 \sa MpEqualizerWrapperPrivate |
|
42 */ |
|
43 MpEqualizerWrapper::~MpEqualizerWrapper() |
|
44 { |
|
45 TX_ENTRY |
|
46 TX_LOG_ARGS( "Stub wrapper" ); |
|
47 TX_EXIT |
|
48 } |
|
49 |
|
50 /*! |
|
51 Apply the preset by giving preset index. The index is starting with 0 |
|
52 which if the "Off". The command then relays to its private implementation. |
|
53 |
|
54 \sa MpEqualizerWrapperPrivate |
|
55 */ |
|
56 void MpEqualizerWrapper::applyPreset( int preset ) |
|
57 { |
|
58 mApplyPresetCount++; |
|
59 mActivePreset = preset; |
|
60 } |
|
61 |
|
62 /*! |
|
63 Disabling the eqaulizer. The command then relays to its private implementation. |
|
64 |
|
65 \sa MpEqualizerWrapperPrivate |
|
66 */ |
|
67 void MpEqualizerWrapper::disableEqualizer() |
|
68 { |
|
69 mDisableEquqlizerCount++; |
|
70 mActivePreset = -1; |
|
71 } |
|
72 |
|
73 /*! |
|
74 Returning currectly activated preset. The command then relays to its private |
|
75 implementation. -1 will be returned if the adaptation is not ready or |
|
76 no available preset. |
|
77 |
|
78 \sa MpEqualizerWrapperPrivate |
|
79 */ |
|
80 int MpEqualizerWrapper::activePreset() |
|
81 { |
|
82 return mActivePreset; |
|
83 } |
|
84 |
|
85 /*! |
|
86 Returning the list of availale preset names. The command then relays to its |
|
87 private implementation. |
|
88 |
|
89 \sa MpEqualizerWrapperPrivate |
|
90 */ |
|
91 QStringList MpEqualizerWrapper::presetNames() |
|
92 { |
|
93 QStringList presets; |
|
94 presets << "Bass Booster" << "Classic" << "Jazz" << "Pop" << "Rock" ; |
|
95 return presets; |
|
96 } |
|
97 |
|
98 //End of File |
|