diff -r 91746b151f97 -r 997690c3397a bluetoothengine/btui/btuidelegate/btdelegateremotedevname.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bluetoothengine/btui/btuidelegate/btdelegateremotedevname.h Wed Jun 23 18:23:52 2010 +0300 @@ -0,0 +1,82 @@ +/* +* 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 BTDELEGATEREMOTEDEVNAME_H +#define BTDELEGATEREMOTEDEVNAME_H + +#include +#include +//#include +//#include +#include +#include "btabstractdelegate.h" + +class BtuiModel; + +enum RequestIdentifiers { + Unknown = 0, // using a different number space than TBTVisibilityMode + AddDevice, + ModifyFriendlyName +}; + +/*! + \class BtDelegateRemoteDevName + \brief the base class for handling Bluetooth Local Name. + */ +class BtDelegateRemoteDevName : public BtAbstractDelegate, public MBtSimpleActiveObserver +{ + Q_OBJECT + +public: + explicit BtDelegateRemoteDevName( BtSettingModel* settingModel, + BtDeviceModel* deviceModel, QObject *parent = 0 ); + + virtual ~BtDelegateRemoteDevName(); + + virtual void exec( const QVariant ¶ms ); + + // from MBtSimpleActiveObserver + virtual void RequestCompletedL( CBtSimpleActive* aActive, TInt aStatus ); + + virtual void CancelRequest( TInt aRequestId ); + + virtual void HandleError( CBtSimpleActive* aActive, TInt aError ); + + +private: + bool validateName(QString &name ); + + RBTRegistry mBtRegistry; + + RBTRegServ mBtRegServ; + + CBtSimpleActive* mRegistryActive; + + QString mNewName; + + RBuf16 mSymName; + + TBTDevAddr mSymaddr; + + +private: + + Q_DISABLE_COPY(BtDelegateRemoteDevName) + +}; + +#endif // BTDELEGATEREMOTEDEVNAME_H