|
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 BTDELEGATEDEVSECURITY_H |
|
19 #define BTDELEGATEDEVSECURITY_H |
|
20 |
|
21 #include <e32base.h> |
|
22 #include <btengconnman.h> |
|
23 #include <btengdevman.h> |
|
24 #include "btabstractdelegate.h" |
|
25 |
|
26 class BtuiModel; |
|
27 |
|
28 /*! |
|
29 \class BtDelegateDevSecurity |
|
30 \brief the base class for Unpairing Bluetooth Connection. |
|
31 */ |
|
32 class BtDelegateDevSecurity : public BtAbstractDelegate, |
|
33 public MBTEngDevManObserver, public MBTEngConnObserver |
|
34 { |
|
35 Q_OBJECT |
|
36 |
|
37 public: |
|
38 explicit BtDelegateDevSecurity( |
|
39 BtSettingModel* settingModel, |
|
40 BtDeviceModel* deviceModel, |
|
41 QObject *parent = 0 ); |
|
42 |
|
43 virtual ~BtDelegateDevSecurity(); |
|
44 |
|
45 virtual void exec( const QVariant ¶ms ); |
|
46 |
|
47 virtual void cancel(); |
|
48 |
|
49 public slots: |
|
50 void disconnectDelegateCompleted(int err); |
|
51 |
|
52 protected: |
|
53 //From MBTEngDevManObserver |
|
54 virtual void HandleDevManComplete( TInt aErr ); |
|
55 virtual void HandleGetDevicesComplete( TInt aErr, CBTDeviceArray* aDeviceArray ); |
|
56 //From MBTEngConnObserver |
|
57 virtual void ConnectComplete( TBTDevAddr& aAddr, TInt aErr, |
|
58 RBTDevAddrArray* aConflicts ); |
|
59 virtual void DisconnectComplete( TBTDevAddr& aAddr, TInt aErr ); |
|
60 |
|
61 void emitCommandComplete(int error); |
|
62 |
|
63 private: |
|
64 |
|
65 CBTEngDevMan *mBtEngDevMan; |
|
66 QString mdeviceName; |
|
67 CBTEngConnMan *mBtengConnMan; |
|
68 BtAbstractDelegate* mDisconnectDelegate; |
|
69 |
|
70 Q_DISABLE_COPY(BtDelegateDevSecurity) |
|
71 |
|
72 }; |
|
73 |
|
74 |
|
75 #endif /* BTDELEGATEDEVSECURITY_H */ |