bluetoothengine/btui/btuidelegate/btdelegatepair.h
changeset 31 a0ea99b6fa53
child 40 997690c3397a
equal deleted inserted replaced
30:df7a93ede42e 31:a0ea99b6fa53
       
     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 BTDELEGATEPAIR_H
       
    19 #define BTDELEGATEPAIR_H
       
    20 
       
    21 #include <e32base.h>
       
    22 #include <btengconnman.h>
       
    23 #include <hbdialog.h>
       
    24 #include <hbdocumentloader.h>
       
    25 #include "btabstractdelegate.h"
       
    26 
       
    27 class BtuiModel;
       
    28 
       
    29 /*!
       
    30     \class BtDelegatePair
       
    31     \brief the base class for handling Bluetooth Pair functionality.
       
    32  */
       
    33 class BtDelegatePair : public BtAbstractDelegate,
       
    34         public MBTEngConnObserver
       
    35 {
       
    36     Q_OBJECT
       
    37 
       
    38 public:
       
    39     explicit BtDelegatePair(             
       
    40             BtSettingModel* settingModel, 
       
    41             BtDeviceModel* deviceModel, QObject *parent = 0 );
       
    42     
       
    43     virtual ~BtDelegatePair();
       
    44 
       
    45     virtual void exec( const QVariant &params );
       
    46     
       
    47     virtual void cancel();
       
    48     
       
    49 public slots:
       
    50     
       
    51 protected:
       
    52     //From MBTEngConnObserver
       
    53     virtual void ConnectComplete( TBTDevAddr& aAddr, TInt aErr, 
       
    54                                    RBTDevAddrArray* aConflicts );
       
    55     virtual void DisconnectComplete( TBTDevAddr& aAddr, TInt aErr );
       
    56     virtual void PairingComplete( TBTDevAddr& aAddr, TInt aErr );
       
    57 
       
    58 private:
       
    59     void launchWaitDialog();
       
    60     void emitCommandComplete(int error);
       
    61     
       
    62 private:
       
    63 
       
    64     CBTEngConnMan *mBtengConnMan;
       
    65     HbDialog *mWaitDialog;
       
    66     QString mdeviceName;
       
    67     
       
    68     HbDocumentLoader *mLoader;
       
    69     
       
    70     Q_DISABLE_COPY(BtDelegatePair)
       
    71 
       
    72 };
       
    73 
       
    74 #endif /* BTDELEGATEPAIR_H */