author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Wed, 23 Jun 2010 18:12:57 +0300 | |
changeset 32 | 189d20c34778 |
parent 24 | 6df133bd92e1 |
child 37 | 451b2e1545b2 |
child 57 | 21be958eb3ce |
permissions | -rw-r--r-- |
24 | 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> |
|
32
189d20c34778
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
23 |
#include <QScopedPointer> |
24 | 24 |
#include <QMap> |
25 |
||
26 |
// User includes |
|
27 |
#include "radiouiengineexport.h" |
|
28 |
||
29 |
// Forward declarations |
|
30 |
class RadioScannerEnginePrivate; |
|
31 |
class RadioUiEnginePrivate; |
|
32 |
class RadioStationHandlerIf; |
|
33 |
class RadioStation; |
|
34 |
||
35 |
// Constants |
|
36 |
||
37 |
// Class declaration |
|
38 |
class UI_ENGINE_DLL_EXPORT RadioScannerEngine : public QObject |
|
39 |
{ |
|
40 |
Q_OBJECT |
|
32
189d20c34778
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
41 |
Q_DECLARE_PRIVATE_D( d_ptr.data(), RadioScannerEngine ) |
24 | 42 |
Q_DISABLE_COPY( RadioScannerEngine ) |
43 |
||
44 |
friend class RadioUiEngine; |
|
32
189d20c34778
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
45 |
|
24 | 46 |
public: |
47 |
||
48 |
explicit RadioScannerEngine( RadioUiEnginePrivate& uiEngine ); |
|
49 |
~RadioScannerEngine(); |
|
50 |
||
51 |
// New functions |
|
52 |
||
53 |
/*! |
|
54 |
* Starts the scanning from minimum frequency |
|
55 |
*/ |
|
56 |
void startScanning(); |
|
57 |
||
58 |
/*! |
|
59 |
* Continues the scanning upwards from current frequency |
|
60 |
*/ |
|
61 |
void continueScanning(); |
|
62 |
||
63 |
/*! |
|
64 |
* Checks if the scanning is ongoing |
|
65 |
*/ |
|
66 |
bool isScanning() const; |
|
67 |
||
68 |
/*! |
|
69 |
* Cancels the scanning process |
|
70 |
*/ |
|
71 |
void cancel(); |
|
72 |
||
73 |
/*! |
|
74 |
* Adds a new station that was found |
|
75 |
* @param frequency Frequency of the found station |
|
76 |
*/ |
|
77 |
void addScannedFrequency( const uint frequency ); |
|
78 |
||
79 |
signals: |
|
80 |
||
81 |
void stationFound( const RadioStation& station ); |
|
82 |
||
83 |
private: |
|
84 |
||
85 |
void emitStationFound( const RadioStation& station ); |
|
86 |
||
87 |
private: // data |
|
88 |
||
89 |
/** |
|
90 |
* Unmodifiable pointer to the private implementation |
|
91 |
*/ |
|
32
189d20c34778
Revision: 201023
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
24
diff
changeset
|
92 |
const QScopedPointer<RadioScannerEnginePrivate> d_ptr; |
24 | 93 |
|
94 |
}; |
|
95 |
||
96 |
#endif // RADIOSCANNERENGINE_H |