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