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