|
1 /**************************************************************************** |
|
2 ** |
|
3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
4 ** All rights reserved. |
|
5 ** Contact: Nokia Corporation (qt-info@nokia.com) |
|
6 ** |
|
7 ** This file is part of the Qt Mobility Components. |
|
8 ** |
|
9 ** $QT_BEGIN_LICENSE:LGPL$ |
|
10 ** No Commercial Usage |
|
11 ** This file contains pre-release code and may not be distributed. |
|
12 ** You may use this file in accordance with the terms and conditions |
|
13 ** contained in the Technology Preview License Agreement accompanying |
|
14 ** this package. |
|
15 ** |
|
16 ** GNU Lesser General Public License Usage |
|
17 ** Alternatively, this file may be used under the terms of the GNU Lesser |
|
18 ** General Public License version 2.1 as published by the Free Software |
|
19 ** Foundation and appearing in the file LICENSE.LGPL included in the |
|
20 ** packaging of this file. Please review the following information to |
|
21 ** ensure the GNU Lesser General Public License version 2.1 requirements |
|
22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. |
|
23 ** |
|
24 ** In addition, as a special exception, Nokia gives you certain additional |
|
25 ** rights. These rights are described in the Nokia Qt LGPL Exception |
|
26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. |
|
27 ** |
|
28 ** If you have questions regarding the use of this file, please contact |
|
29 ** Nokia at qt-info@nokia.com. |
|
30 ** |
|
31 ** |
|
32 ** |
|
33 ** |
|
34 ** |
|
35 ** |
|
36 ** |
|
37 ** |
|
38 ** $QT_END_LICENSE$ |
|
39 ** |
|
40 ****************************************************************************/ |
|
41 |
|
42 #ifndef QRADIOTUNERCONTROL_H |
|
43 #define QRADIOTUNERCONTROL_H |
|
44 |
|
45 #include <qmediacontrol.h> |
|
46 #include <qradiotuner.h> |
|
47 |
|
48 QTM_BEGIN_NAMESPACE |
|
49 |
|
50 class Q_MEDIA_EXPORT QRadioTunerControl : public QMediaControl |
|
51 { |
|
52 Q_OBJECT |
|
53 |
|
54 public: |
|
55 ~QRadioTunerControl(); |
|
56 |
|
57 virtual bool isAvailable() const = 0; |
|
58 virtual QtMedia::AvailabilityError availabilityError() const = 0; |
|
59 |
|
60 virtual QRadioTuner::State state() const = 0; |
|
61 |
|
62 virtual QRadioTuner::Band band() const = 0; |
|
63 virtual void setBand(QRadioTuner::Band b) = 0; |
|
64 virtual bool isBandSupported(QRadioTuner::Band b) const = 0; |
|
65 |
|
66 virtual int frequency() const = 0; |
|
67 virtual int frequencyStep(QRadioTuner::Band b) const = 0; |
|
68 virtual QPair<int,int> frequencyRange(QRadioTuner::Band b) const = 0; |
|
69 virtual void setFrequency(int frequency) = 0; |
|
70 |
|
71 virtual bool isStereo() const = 0; |
|
72 virtual QRadioTuner::StereoMode stereoMode() const = 0; |
|
73 virtual void setStereoMode(QRadioTuner::StereoMode mode) = 0; |
|
74 |
|
75 virtual int signalStrength() const = 0; |
|
76 |
|
77 virtual int volume() const = 0; |
|
78 virtual void setVolume(int volume) = 0; |
|
79 |
|
80 virtual bool isMuted() const = 0; |
|
81 virtual void setMuted(bool muted) = 0; |
|
82 |
|
83 virtual bool isSearching() const = 0; |
|
84 |
|
85 virtual void searchForward() = 0; |
|
86 virtual void searchBackward() = 0; |
|
87 virtual void cancelSearch() = 0; |
|
88 |
|
89 virtual void start() = 0; |
|
90 virtual void stop() = 0; |
|
91 |
|
92 virtual QRadioTuner::Error error() const = 0; |
|
93 virtual QString errorString() const = 0; |
|
94 |
|
95 Q_SIGNALS: |
|
96 void stateChanged(QRadioTuner::State state); |
|
97 void bandChanged(QRadioTuner::Band band); |
|
98 void frequencyChanged(int frequency); |
|
99 void stereoStatusChanged(bool stereo); |
|
100 void searchingChanged(bool stereo); |
|
101 void signalStrengthChanged(int signalStrength); |
|
102 void volumeChanged(int volume); |
|
103 void mutedChanged(bool muted); |
|
104 void error(QRadioTuner::Error err); |
|
105 |
|
106 protected: |
|
107 QRadioTunerControl(QObject *parent = 0); |
|
108 }; |
|
109 |
|
110 #define QRadioTunerControl_iid "com.nokia.Qt.QRadioTunerControl/1.0" |
|
111 Q_MEDIA_DECLARE_CONTROL(QRadioTunerControl, QRadioTunerControl_iid) |
|
112 |
|
113 QTM_END_NAMESPACE |
|
114 |
|
115 #endif // QRADIOTUNERCONTROL_H |