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: CAdvanceDevDiscoverer class: the interface class for |
|
15 * searching in-range Bluetooth devices using Host Resolver. |
|
16 * |
|
17 */ |
|
18 |
|
19 #include <btservices/advancedevdiscoverer.h> |
|
20 #include "advancedevdiscovererimpl.h" |
|
21 |
|
22 // ---------------------------------------------------------- |
|
23 // CAdvanceDevDiscoverer::CAdvanceDevDiscoverer |
|
24 // ---------------------------------------------------------- |
|
25 // |
|
26 CAdvanceDevDiscoverer::CAdvanceDevDiscoverer() |
|
27 { |
|
28 } |
|
29 |
|
30 // ---------------------------------------------------------- |
|
31 // CAdvanceDevDiscoverer::CAdvanceDevDiscoverer |
|
32 // ---------------------------------------------------------- |
|
33 // |
|
34 void CAdvanceDevDiscoverer::ConstructL( |
|
35 CBtDevRepository& aDevRep, |
|
36 MDevDiscoveryObserver& aObserver ) |
|
37 { |
|
38 iImpl = CAdvanceDevDiscovererImpl::NewL( aDevRep, aObserver ); |
|
39 } |
|
40 |
|
41 // ---------------------------------------------------------- |
|
42 // CAdvanceDevDiscoverer::NewL |
|
43 // ---------------------------------------------------------- |
|
44 // |
|
45 EXPORT_C CAdvanceDevDiscoverer* CAdvanceDevDiscoverer::NewL( |
|
46 CBtDevRepository& aDevRep, |
|
47 MDevDiscoveryObserver& aObserver ) |
|
48 { |
|
49 CAdvanceDevDiscoverer* self = new (ELeave) CAdvanceDevDiscoverer(); |
|
50 CleanupStack::PushL( self ); |
|
51 self->ConstructL( aDevRep, aObserver ); |
|
52 CleanupStack::Pop( self ); |
|
53 return self; |
|
54 } |
|
55 |
|
56 // ---------------------------------------------------------- |
|
57 // Destructor |
|
58 // ---------------------------------------------------------- |
|
59 // |
|
60 EXPORT_C CAdvanceDevDiscoverer::~CAdvanceDevDiscoverer() |
|
61 { |
|
62 delete iImpl; |
|
63 } |
|
64 |
|
65 // ---------------------------------------------------------- |
|
66 // CAdvanceDevDiscoverer::SetObserver |
|
67 // ---------------------------------------------------------- |
|
68 // |
|
69 EXPORT_C void CAdvanceDevDiscoverer::SetObserver( |
|
70 MDevDiscoveryObserver& aObserver ) |
|
71 { |
|
72 iImpl->SetObserver( aObserver ); |
|
73 } |
|
74 |
|
75 // ---------------------------------------------------------- |
|
76 // CAdvanceDevDiscoverer::DiscoverDeviceL |
|
77 // ---------------------------------------------------------- |
|
78 // |
|
79 EXPORT_C void CAdvanceDevDiscoverer::DiscoverDeviceL( |
|
80 TDevDiscoveryFilter aFilter, |
|
81 TBTMajorDeviceClass aDeviceClass ) |
|
82 { |
|
83 iImpl->DiscoverDeviceL( aFilter, aDeviceClass ); |
|
84 } |
|
85 |
|
86 // ---------------------------------------------------------- |
|
87 // CAdvanceDevDiscoverer::CancelDiscovery |
|
88 // ---------------------------------------------------------- |
|
89 // |
|
90 EXPORT_C void CAdvanceDevDiscoverer::CancelDiscovery() |
|
91 { |
|
92 iImpl->Cancel(); |
|
93 } |
|
94 |
|
95 // End of File |
|