|
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 BTDEVICEDATA_H |
|
19 #define BTDEVICEDATA_H |
|
20 |
|
21 #include <qglobal.h> |
|
22 #include <e32base.h> |
|
23 #include <btengconnman.h> |
|
24 #include <btservices/btdevrepository.h> |
|
25 #include "btuimodel.h" |
|
26 |
|
27 /*! |
|
28 \class BtDeviceData |
|
29 \brief class for handling local Bluetooth setting updates. |
|
30 |
|
31 BtDeviceData class is responsible for providing the latest information |
|
32 regarding the properties of remote devices and the connection status. |
|
33 |
|
34 \\sa bluetoothuimodel |
|
35 */ |
|
36 class BtDeviceData : public QObject, |
|
37 public MBTEngConnObserver, |
|
38 public MBtDevRepositoryObserver |
|
39 { |
|
40 Q_OBJECT |
|
41 |
|
42 public: |
|
43 BtDeviceData( |
|
44 const QSharedPointer<BtuiModelDataSource> &data, |
|
45 QObject *parent = 0 |
|
46 ); |
|
47 |
|
48 virtual ~BtDeviceData(); |
|
49 |
|
50 private: |
|
51 // from MBTEngConnObserver |
|
52 |
|
53 void ConnectComplete( TBTDevAddr& addr, TInt err, |
|
54 RBTDevAddrArray* conflicts ); |
|
55 |
|
56 void DisconnectComplete( TBTDevAddr& addr, TInt err ); |
|
57 |
|
58 // From MBtDeviceRepositoryObserver |
|
59 |
|
60 void BtDeviceDeleted( const TBTDevAddr& addr ); |
|
61 |
|
62 void BtDeviceAdded( const CBTDevice& device ); |
|
63 |
|
64 void BtDeviceChanged( const CBTDevice& device, TUint similarity ); |
|
65 |
|
66 public slots: |
|
67 //void activeRequestCompleted( int status, int id ); |
|
68 |
|
69 private: |
|
70 |
|
71 private: |
|
72 QSharedPointer<BtuiModelDataSource> mData; |
|
73 |
|
74 CBTEngConnMan *mBtengConnMan; |
|
75 |
|
76 CBtDevRepository* mDeviceRepo; |
|
77 |
|
78 Q_DISABLE_COPY(BtDeviceData) |
|
79 |
|
80 }; |
|
81 |
|
82 #endif // BTLOCALSETTING_H |