|
1 /* |
|
2 * Copyright (c) 2002 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: Obex searcher factory |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "Obexsearcherfactory.h" |
|
22 #include "Btobexsearcher.h" |
|
23 #include "Irdaobexsearcher.h" |
|
24 |
|
25 _LIT( KObexSearcherFactory, "Search factory" ); |
|
26 const TInt KNotSupportedPanic = 1; |
|
27 |
|
28 // ============================ MEMBER FUNCTIONS =============================== |
|
29 |
|
30 // ----------------------------------------------------------------------------- |
|
31 // CObexSearcherFactory::CreateObexSearcherL() |
|
32 // ----------------------------------------------------------------------------- |
|
33 // |
|
34 CObexSearcherBase* CObexSearcherFactory::CreateObexSearcherL( |
|
35 TNSmlObexTransport aTransport ) |
|
36 { |
|
37 |
|
38 if ( aTransport == EObexBt ) |
|
39 { |
|
40 return CBTObexSearcher::NewL( TBTConnInfo() ); |
|
41 } |
|
42 |
|
43 if ( aTransport == EObexIr ) |
|
44 { |
|
45 return CIrDAObexSearcher::NewL(); |
|
46 } |
|
47 |
|
48 //Panic if unsupported media queried |
|
49 User::Panic( KObexSearcherFactory, KNotSupportedPanic ); |
|
50 |
|
51 return NULL; //Never executed but suppresses compiler warning... |
|
52 } |
|
53 |
|
54 // ----------------------------------------------------------------------------- |
|
55 // CObexSearcherFactory::CreateBTSearcherL() |
|
56 // ----------------------------------------------------------------------------- |
|
57 // |
|
58 CObexSearcherBase* CObexSearcherFactory::CreateBTSearcherL( |
|
59 const TBTConnInfo& aBTConnInfo ) |
|
60 { |
|
61 CBTObexSearcher* btSearcher = CBTObexSearcher::NewL( aBTConnInfo ); |
|
62 return btSearcher; |
|
63 } |
|
64 |
|
65 // End of File |