|
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 |
|
18 // INCLUDE FILES |
|
19 #include <e32std.h> |
|
20 |
|
21 #include "BTGPSHandlerFactory.h" |
|
22 #include "BTGPSPanic.h" |
|
23 #include "BTGPSDeviceSelector.h" |
|
24 #include "BTGPSSdpHandler.h" |
|
25 #include "BTGPSPairingHandler.h" |
|
26 #include "BTGPSInitHandler.h" |
|
27 #include "BTGPSSocketHandler.h" |
|
28 #include "BTGPSDeviceInfoHandler.h" |
|
29 #ifdef SYMBIAN_LOCATION_BTGPSCONFIG |
|
30 #include "btgpsgetnextdevice.h" |
|
31 #include "btgpscheckdevicepairing.h" |
|
32 #endif |
|
33 |
|
34 |
|
35 // ============================ MEMBER FUNCTIONS =============================== |
|
36 |
|
37 // ----------------------------------------------------------------------------- |
|
38 // TBTGPSHandlerFactory::TBTGPSHandlerFactory |
|
39 // ----------------------------------------------------------------------------- |
|
40 TBTGPSHandlerFactory::TBTGPSHandlerFactory( |
|
41 MBTGPSConnectManagerExt& aManagerExt) |
|
42 : iManagerExt(aManagerExt) |
|
43 { |
|
44 } |
|
45 |
|
46 // ----------------------------------------------------------------------------- |
|
47 // TBTGPSHandlerFactory::ConstructHandlerL |
|
48 // ----------------------------------------------------------------------------- |
|
49 CBase* TBTGPSHandlerFactory::ConstructHandlerL(TInt aId) |
|
50 { |
|
51 CBase* handler = NULL; |
|
52 switch(aId) |
|
53 { |
|
54 case EDeviceSelector: |
|
55 handler = CBTGPSDeviceSelector::NewL(iManagerExt); |
|
56 break; |
|
57 case EPairingHandler: |
|
58 handler = CBTGPSPairingHandler::NewL(iManagerExt); |
|
59 break; |
|
60 case ESdpHandler: |
|
61 handler = CBTGPSSdpHandler::NewL(iManagerExt); |
|
62 break; |
|
63 case EInitHandler: |
|
64 handler = CBTGPSInitHandler::NewL(iManagerExt); |
|
65 break; |
|
66 case ESocketHandler: |
|
67 handler = CBTGPSSocketHandler::NewL(iManagerExt); |
|
68 break; |
|
69 case EDeviceInfoHandler: |
|
70 handler = CBTGPSDeviceInfoHandler::NewL(iManagerExt); |
|
71 break; |
|
72 #ifdef SYMBIAN_LOCATION_BTGPSCONFIG |
|
73 case EGetNextDevice: |
|
74 handler = CBTGPSGetNextDevice::NewL(iManagerExt); |
|
75 break; |
|
76 case ECheckDevicePairing: |
|
77 handler = CBTGPSCheckDevicePairing::NewL(iManagerExt); |
|
78 break; |
|
79 #endif |
|
80 default: |
|
81 __ASSERT_DEBUG(EFalse, Panic(EPanicInvalidCase)); |
|
82 } |
|
83 return handler; |
|
84 } |
|
85 |
|
86 // End of File |
|
87 |
|
88 |
|
89 |