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