|
1 /* |
|
2 * Copyright (c) 2010 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: QT Bindings for TMS |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef QTMS_GLOBAL_GAIN_EFFECT_H |
|
19 #define QTMS_GLOBAL_GAIN_EFFECT_H |
|
20 |
|
21 #include <qtms.h> |
|
22 #include <qtmseffect.h> |
|
23 #include "qtmswrapperexport.h" |
|
24 #include <QObject> |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 namespace TMS |
|
28 { |
|
29 class TMSEffect; |
|
30 } |
|
31 |
|
32 namespace QTMS |
|
33 { |
|
34 |
|
35 /** |
|
36 * QTMSGlobalGainEffect class |
|
37 * |
|
38 * This class provides microphone gain level control in the global QTMS scope. |
|
39 * Mic gain level changes done by any client are adjusted accross all calls |
|
40 * serviced by the QTMS server. |
|
41 * |
|
42 * @lib QTMSapi.lib |
|
43 * |
|
44 */ |
|
45 class QTMS_WRAPPER_DLL_EXPORT QTMSGlobalGainEffect : public QObject, |
|
46 public QTMSEffect |
|
47 { |
|
48 Q_OBJECT |
|
49 public: |
|
50 /** |
|
51 * Destructor |
|
52 */ |
|
53 virtual ~QTMSGlobalGainEffect(); |
|
54 |
|
55 /** |
|
56 * Set global microphone gain level. The global gain level should be |
|
57 * between 0 and the max value returned by GetMaxLevel(). |
|
58 * |
|
59 * @param level |
|
60 * Gain level to be set. |
|
61 * |
|
62 * @return |
|
63 * QTMS_RESULT_SUCCESS if the operation was successful. |
|
64 * |
|
65 */ |
|
66 gint SetLevel(const guint level); |
|
67 |
|
68 /** |
|
69 * Return current global microphone gain level. |
|
70 * |
|
71 * @param level |
|
72 * Current mic gain level. |
|
73 * |
|
74 * @return |
|
75 * QTMS_RESULT_SUCCESS if the operation was successful. |
|
76 * |
|
77 */ |
|
78 gint GetLevel(guint& level); |
|
79 |
|
80 /** |
|
81 * Return max microphone gain level supported by the device. |
|
82 * |
|
83 * @param level |
|
84 * Max mic gain level. |
|
85 * |
|
86 * @return |
|
87 * QTMS_RESULT_SUCCESS if the operation was successful. |
|
88 * |
|
89 */ |
|
90 gint GetMaxLevel(guint& level); |
|
91 |
|
92 /** |
|
93 * Return effect type. |
|
94 * |
|
95 * @param effecttype |
|
96 * Type of the effect object (QTMS_EFFECT_GLOBAL_GAIN). |
|
97 * |
|
98 * @return |
|
99 * QTMS_RESULT_SUCCESS if the operation was successful. |
|
100 * |
|
101 */ |
|
102 virtual gint GetType(QTMSEffectType& effecttype); |
|
103 |
|
104 Q_SIGNALS: |
|
105 void EffectsEvent(const QTMSEffect& tmseffect, QTMSSignalEvent event); |
|
106 |
|
107 protected: |
|
108 /** |
|
109 * Constructor |
|
110 */ |
|
111 QTMSGlobalGainEffect(); |
|
112 |
|
113 protected: |
|
114 TMS::TMSEffect* iEffect; |
|
115 }; |
|
116 |
|
117 } //namespace QTMS |
|
118 |
|
119 #endif //QTMS_GLOBAL_GAIN_EFFECT_H |