radioapp/radiouiengine/inc/radioscannerengine_p.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_P_H_
       
    19 #define RADIOSCANNERENGINE_P_H_
       
    20 
       
    21 #include <QObject>
       
    22 #include <QMap>
       
    23 
       
    24 // User includes
       
    25 #include "radioenginewrapperobserver.h"
       
    26 
       
    27 // Forward declarations
       
    28 class RadioScannerEngine;
       
    29 class RadioUiEnginePrivate;
       
    30 class RadioStationHandlerIf;
       
    31 class RadioStation;
       
    32 class RadioEngineWrapper;
       
    33 
       
    34 // Constants
       
    35 
       
    36 // Class declaration
       
    37 class RadioScannerEnginePrivate : public RadioEngineWrapperObserver
       
    38     {
       
    39     Q_DECLARE_PUBLIC( RadioScannerEngine )
       
    40     Q_DISABLE_COPY( RadioScannerEnginePrivate )
       
    41 
       
    42 public:
       
    43 
       
    44     RadioScannerEnginePrivate( RadioScannerEngine* scanner, RadioUiEnginePrivate& uiEngine );
       
    45     ~RadioScannerEnginePrivate();
       
    46 
       
    47 // New functions
       
    48 
       
    49     /*!
       
    50      * Starts the scanning from minimum frequency
       
    51      */
       
    52     void startScanning();
       
    53 
       
    54     /*!
       
    55      * Continues the scanning upwards from current frequency
       
    56      */
       
    57     void continueScanning();
       
    58 
       
    59     /*!
       
    60      * Cancels the scanning process
       
    61      */
       
    62     void cancel();
       
    63 
       
    64     /*!
       
    65      * Adds a new station that was found
       
    66      * @param frequency Frequency of the found station
       
    67      */
       
    68     void addScannedFrequency( const uint frequency );
       
    69 
       
    70 signals:
       
    71 
       
    72     void stationFound( const RadioStation& station );
       
    73 
       
    74 private slots:
       
    75 
       
    76     void delayedStart();
       
    77 
       
    78 private:
       
    79 
       
    80 // from base class RadioEngineWrapperObserver
       
    81 
       
    82     void tunedToFrequency( uint frequency, int reason );
       
    83 
       
    84 // New functions
       
    85 
       
    86     void addFrequencyAndReport( const uint frequency );
       
    87 
       
    88 private: // data
       
    89 
       
    90     /**
       
    91      * Pointer to the public class
       
    92      * Not own.
       
    93      */
       
    94     RadioScannerEngine*     q_ptr;
       
    95 
       
    96     RadioUiEnginePrivate&   mUiEngine;
       
    97 
       
    98     /**
       
    99      * Last scanned frequency. Used to know when the scanning has looped around the
       
   100      * frequency band and it should stop
       
   101      */
       
   102     uint                    mLastFoundFrequency;
       
   103 
       
   104     bool                    mMutedByScanner;
       
   105 
       
   106     };
       
   107 
       
   108 
       
   109 #endif // RADIOSCANNERENGINE_P_H_