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