radioapp/radiouiengine/inc/radioscannerengine.h
changeset 16 f54ebcfc1b80
child 19 afea38384506
equal deleted inserted replaced
14:63aabac4416d 16:f54ebcfc1b80
       
     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      * Cancels the scanning process
       
    64      */
       
    65     void cancel();
       
    66 
       
    67     /*!
       
    68      * Adds a new station that was found
       
    69      * @param frequency Frequency of the found station
       
    70      */
       
    71     void addScannedFrequency( const uint frequency );
       
    72 
       
    73 signals:
       
    74 
       
    75     void stationFound( const RadioStation& station );
       
    76 
       
    77 private:
       
    78 
       
    79     void emitStationFound( const RadioStation& station );
       
    80 
       
    81 private: // data
       
    82 
       
    83     /**
       
    84      * Unmodifiable pointer to the private implementation
       
    85      */
       
    86     RadioScannerEnginePrivate* const d_ptr;
       
    87 
       
    88     };
       
    89 
       
    90 #endif // RADIOSCANNERENGINE_H