radiohswidget/inc/radiohswidgetprofilereader.h
author Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
Wed, 23 Jun 2010 18:12:57 +0300
changeset 32 189d20c34778
child 33 11b6825f0862
permissions -rw-r--r--
Revision: 201023 Kit: 2010125

/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: FM Radio widget profile reader
*
*/

#ifndef RADIOHSWIDGETPROFILEREADER_H_
#define RADIOHSWIDGETPROFILEREADER_H_

// System includes
#include <QObject>
#include <QVariant>

// Forward declarations
class RadioHsWidget;
class XQSettingsManager;
class XQSettingsKey;

class RadioHsWidgetProfileReader : public QObject
{
Q_OBJECT

public:
    explicit RadioHsWidgetProfileReader(RadioHsWidget *parent = 0);
    virtual ~RadioHsWidgetProfileReader();

    void startMonitoringRadioRunningStatus();
    
    bool isCurrentProfileOffline();

signals:
    //void profileChanged(int profile);
    //void radioRunning(const QVariant &state);

public slots:
    void handleDeletedItem(const XQSettingsKey &key);
    void handleChanges(const XQSettingsKey &key, const QVariant &value);
    
private slots:
    //void currentProfileStatus(const QVariant &value);

private:
    void radioRunningStatus(const QVariant &value);
    
private: // data
    /*!
       Stores the reference to parent. This is used to call parents
       functions when notifications are received.
     */
    RadioHsWidget &mParent;
    /*! For getting values and notifications of changes from P&S keys. */
    XQSettingsManager *mSettingsManager;
    /*!
       Stores internally the status of radio application read from the P&S
       key.
      */
    int mRadioStatus;
};

#endif /* RADIOHSWIDGETPROFILEREADER_H_ */