diff -r 997690c3397a -r 0b2439c3e397 bluetoothengine/btui/btuimodel/btlocalsetting.h --- a/bluetoothengine/btui/btuimodel/btlocalsetting.h Wed Jun 23 18:23:52 2010 +0300 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,107 +0,0 @@ -/* - * Copyright (c) 2010 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: - * - */ - -#ifndef BTLOCALSETTING_H -#define BTLOCALSETTING_H - -#include "btsettingmodel.h" - -#include -#include -#include -#include - -/*! - \class BtuimSettings - \brief class for handling local Bluetooth setting updates. - - BtLocalSetting class is responsible for providing the latest information - regarding the local Bluetooth settings such as device name and power state. - - \\sa bluetoothuimodel - */ -class BtLocalSetting : public QObject, - public MBTEngSettingsObserver, - public MBtSimpleActiveObserver -{ - Q_OBJECT - -public: - explicit BtLocalSetting( BtSettingModel& model, QObject *parent = 0 ); - - virtual ~BtLocalSetting(); - - bool isValid( int row, int col ) const; - - int rowCount() const; - - int columnCount() const; - - void data(QVariant& val, int row, int col, int role ) const; - - BtuiModelDataItem itemData( int row, int col ) const; - -private: - // from MBTEngSettingsObserver - - void PowerStateChanged( TBTPowerStateValue state ); - - void VisibilityModeChanged( TBTVisibilityMode state ); - - // from MBtSimpleActiveObserver - - void RequestCompletedL( CBtSimpleActive* active, TInt status ); - - void CancelRequest( TInt requestId ); - - void HandleError( CBtSimpleActive* active, TInt error ); - - -public slots: - //void activeRequestCompleted( int status, int id ); - -private: - - void setVisibilityMode( TBTVisibilityMode state ); - void updateDeviceName( const QString &name ); - - void setPowerSetting( TBTPowerStateValue state ); - - //void setOfflineSetting( bool state ); - //void setBtConnectionsSetting( int connections ); - - void getNameFromRegistry( QString &name ); - -private: - - BtuiModelDataSource mData; - - BtSettingModel& mModel; - - CBTEngSettings *mBtengSetting; - - // For monitoring local device name change - RProperty mLocalDeviceKey; - CBtSimpleActive *mLocalDeviceWatcher; - - //RProperty mBtLinkCountKey; - //CBTEngActive *mBtLinkCountWatcher; - Q_DISABLE_COPY(BtLocalSetting) - -}; - -#endif // BTLOCALSETTING_H