bluetoothengine/btui/btuidelegate/btdelegateremotedevname.h
branchRCL_3
changeset 56 9386f31cc85b
parent 55 613943a21004
child 61 269724087bed
equal deleted inserted replaced
55:613943a21004 56:9386f31cc85b
     1 /*
       
     2 * Copyright (c) 2010 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 BTDELEGATEREMOTEDEVNAME_H
       
    19 #define BTDELEGATEREMOTEDEVNAME_H
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <btmanclient.h>
       
    23 //#include <btengconnman.h>
       
    24 //#include <btengdevman.h>
       
    25 #include <btservices/btsimpleactive.h>
       
    26 #include "btabstractdelegate.h"
       
    27 
       
    28 class BtuiModel;
       
    29 
       
    30 enum RequestIdentifiers {
       
    31     Unknown = 0,  // using a different number space than TBTVisibilityMode
       
    32     AddDevice,
       
    33     ModifyFriendlyName
       
    34 };
       
    35 
       
    36 /*!
       
    37     \class BtDelegateRemoteDevName
       
    38     \brief the base class for handling Bluetooth Local Name.
       
    39  */
       
    40 class BtDelegateRemoteDevName : public BtAbstractDelegate, public MBtSimpleActiveObserver
       
    41 {
       
    42     Q_OBJECT
       
    43 
       
    44 public:
       
    45     explicit BtDelegateRemoteDevName( BtSettingModel* settingModel, 
       
    46             BtDeviceModel* deviceModel, QObject *parent = 0 );
       
    47     
       
    48     virtual ~BtDelegateRemoteDevName();
       
    49 
       
    50     virtual void exec( const QVariant &params );
       
    51    
       
    52     // from MBtSimpleActiveObserver
       
    53     virtual void RequestCompletedL( CBtSimpleActive* aActive, TInt aStatus );
       
    54     
       
    55     virtual void CancelRequest( TInt aRequestId );
       
    56     
       
    57     virtual void HandleError( CBtSimpleActive* aActive, TInt aError );
       
    58 
       
    59 
       
    60 private:
       
    61     bool validateName(QString &name );
       
    62     
       
    63     RBTRegistry mBtRegistry;
       
    64     
       
    65     RBTRegServ mBtRegServ;
       
    66     
       
    67     CBtSimpleActive* mRegistryActive;    
       
    68     
       
    69     QString mNewName;
       
    70     
       
    71     RBuf16 mSymName;
       
    72     
       
    73     TBTDevAddr mSymaddr;
       
    74     
       
    75     bool mRegistryOpened;
       
    76     
       
    77 
       
    78 private:
       
    79 
       
    80     Q_DISABLE_COPY(BtDelegateRemoteDevName)
       
    81 
       
    82 };
       
    83 
       
    84 #endif // BTDELEGATEREMOTEDEVNAME_H