1 /* |
|
2 * Copyright (c) 2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef RADIOSCANNERENGINE_H |
|
19 #define RADIOSCANNERENGINE_H |
|
20 |
|
21 // System includes |
|
22 #include <QObject> |
|
23 #include <QMap> |
|
24 |
|
25 // User includes |
|
26 #include "radiouiengineexport.h" |
|
27 |
|
28 // Forward declarations |
|
29 class RadioScannerEnginePrivate; |
|
30 class RadioUiEnginePrivate; |
|
31 class RadioStationHandlerIf; |
|
32 class RadioStation; |
|
33 |
|
34 // Constants |
|
35 |
|
36 // Class declaration |
|
37 class UI_ENGINE_DLL_EXPORT RadioScannerEngine : public QObject |
|
38 { |
|
39 Q_OBJECT |
|
40 Q_DECLARE_PRIVATE_D( d_ptr, RadioScannerEngine ) |
|
41 Q_DISABLE_COPY( RadioScannerEngine ) |
|
42 |
|
43 friend class RadioUiEngine; |
|
44 |
|
45 public: |
|
46 |
|
47 explicit RadioScannerEngine( RadioUiEnginePrivate& uiEngine ); |
|
48 ~RadioScannerEngine(); |
|
49 |
|
50 // New functions |
|
51 |
|
52 /*! |
|
53 * Starts the scanning from minimum frequency |
|
54 */ |
|
55 void startScanning(); |
|
56 |
|
57 /*! |
|
58 * Continues the scanning upwards from current frequency |
|
59 */ |
|
60 void continueScanning(); |
|
61 |
|
62 /*! |
|
63 * Checks if the scanning is ongoing |
|
64 */ |
|
65 bool isScanning() const; |
|
66 |
|
67 /*! |
|
68 * Cancels the scanning process |
|
69 */ |
|
70 void cancel(); |
|
71 |
|
72 /*! |
|
73 * Adds a new station that was found |
|
74 * @param frequency Frequency of the found station |
|
75 */ |
|
76 void addScannedFrequency( const uint frequency ); |
|
77 |
|
78 signals: |
|
79 |
|
80 void stationFound( const RadioStation& station ); |
|
81 |
|
82 private: |
|
83 |
|
84 void emitStationFound( const RadioStation& station ); |
|
85 |
|
86 private: // data |
|
87 |
|
88 /** |
|
89 * Unmodifiable pointer to the private implementation |
|
90 */ |
|
91 RadioScannerEnginePrivate* const d_ptr; |
|
92 |
|
93 }; |
|
94 |
|
95 #endif // RADIOSCANNERENGINE_H |
|