diff -r 075425b8d9a4 -r 189d20c34778 radiohswidget/inc/radiohswidgetprofilereader.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/radiohswidget/inc/radiohswidgetprofilereader.h Wed Jun 23 18:12:57 2010 +0300 @@ -0,0 +1,71 @@ +/* +* 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 +#include + +// 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_ */