13 * |
13 * |
14 * Description: |
14 * Description: |
15 * |
15 * |
16 */ |
16 */ |
17 |
17 |
18 #ifndef BTDELEGATECONNECT_H_ |
18 #ifndef BTDELEGATECONNECT_H |
19 #define BTDELEGATECONNECT_H_ |
19 #define BTDELEGATECONNECT_H |
20 |
20 |
21 #include <e32base.h> |
21 #include <e32base.h> |
22 #include <btengconnman.h> |
22 #include <btengconnman.h> |
23 #include "btabstractdelegate.h" |
23 #include "btabstractdelegate.h" |
|
24 #include <hbaction.h> |
24 |
25 |
25 class BtuiModel; |
26 class BtuiModel; |
26 |
27 |
27 /*! |
28 /*! |
28 \class BtDelegateConnect |
29 \class BtDelegateConnect |
38 BtSettingModel* settingModel, |
39 BtSettingModel* settingModel, |
39 BtDeviceModel* deviceModel, |
40 BtDeviceModel* deviceModel, |
40 QObject *parent = 0 ); |
41 QObject *parent = 0 ); |
41 |
42 |
42 virtual ~BtDelegateConnect(); |
43 virtual ~BtDelegateConnect(); |
43 |
|
44 virtual void exec( const QVariant ¶ms ); |
44 virtual void exec( const QVariant ¶ms ); |
45 |
|
46 virtual void cancel(); |
45 virtual void cancel(); |
47 |
46 |
48 public slots: |
47 public slots: |
|
48 |
49 |
49 |
50 protected: |
50 protected: |
51 //From MBTEngConnObserver |
51 //From MBTEngConnObserver |
52 virtual void ConnectComplete( TBTDevAddr& aAddr, TInt aErr, |
52 virtual void ConnectComplete( TBTDevAddr& aAddr, TInt aErr, |
53 RBTDevAddrArray* aConflicts ); |
53 RBTDevAddrArray* aConflicts ); |
54 virtual void DisconnectComplete( TBTDevAddr& aAddr, TInt aErr ); |
54 virtual void DisconnectComplete( TBTDevAddr& aAddr, TInt aErr ); |
55 virtual void PairingComplete( TBTDevAddr& aAddr, TInt aErr ); |
55 |
56 |
56 private slots: |
57 void emitCommandComplete(int error); |
57 void handleUserAnswer( HbAction* answer ); |
|
58 void powerDelegateCompleted(int status); |
|
59 void disconnectDelegateCompleted(int status); |
58 |
60 |
59 private: |
61 private: |
60 |
62 void exec_connect(); |
|
63 void emitCommandComplete(int error); |
|
64 bool callOngoing(); |
|
65 |
|
66 private: |
|
67 QModelIndex mIndex; |
|
68 QModelIndex mConflictDevIndex; |
61 CBTEngConnMan *mBtengConnMan; |
69 CBTEngConnMan *mBtengConnMan; |
62 |
70 QString mDeviceName; |
63 TBTDevAddr mBtEngddr; |
71 int mMajorProperty; |
64 |
72 int mCod; |
65 QString mdeviceName; |
73 BtAbstractDelegate* mAbstractDelegate; |
|
74 bool mActiveHandling; |
|
75 TBTDevAddr mAddr; |
66 |
76 |
67 Q_DISABLE_COPY(BtDelegateConnect) |
77 Q_DISABLE_COPY(BtDelegateConnect) |
68 |
78 |
69 }; |
79 }; |
70 |
80 |
71 |
81 |
72 #endif /* BTDELEGATECONNECT_H_ */ |
82 #endif /* BTDELEGATECONNECT_H */ |