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 // Implementation file for the Umts/Gprs SubConnection Provider Factory |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 #include "UmtsGprs_subconnProvFactory.h" |
|
24 #include <networking/qos3gpp_subconparams.h> |
|
25 #include "UmtsGprs_defaultSubconnProv.h" |
|
26 #include <implementationproxy.h> |
|
27 |
|
28 /** |
|
29 Data required for instantiating ECOM Plugin |
|
30 */ |
|
31 const TImplementationProxy ImplementationTable[] = |
|
32 { |
|
33 IMPLEMENTATION_PROXY_ENTRY(KUmtsGprsSubConnectionProviderFactoryId, CUmtsGprsSubConnProvdFactory::NewL), |
|
34 }; |
|
35 |
|
36 |
|
37 /** |
|
38 ECOM Implementation Factory |
|
39 */ |
|
40 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) |
|
41 { |
|
42 aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); |
|
43 |
|
44 return ImplementationTable; |
|
45 } |
|
46 |
|
47 |
|
48 CUmtsGprsSubConnProvdFactory* CUmtsGprsSubConnProvdFactory::NewL(TAny* aConstructionParameters) |
|
49 /** |
|
50 Constructs a Umts/Gprs SubConnection Provider Factory |
|
51 |
|
52 @param aConstructionParameters construction data passed by ECOM |
|
53 |
|
54 @returns pointer to a constructed factory |
|
55 */ |
|
56 { |
|
57 CUmtsGprsSubConnProvdFactory* ptr = |
|
58 new (ELeave) CUmtsGprsSubConnProvdFactory(KUmtsGprsSubConnectionProviderFactoryId, |
|
59 *(reinterpret_cast<CSubConnectionFactoryContainer*>(aConstructionParameters))); |
|
60 |
|
61 return ptr; |
|
62 } |
|
63 |
|
64 |
|
65 |
|
66 CUmtsGprsSubConnProvdFactory::CUmtsGprsSubConnProvdFactory(TUint aFactoryId, |
|
67 CSubConnectionFactoryContainer& aParentContainer) |
|
68 : CSubConnectionProviderFactoryBase(aFactoryId, aParentContainer) |
|
69 /** |
|
70 Umts/Gprs SubConnection Provider Factory Constructor |
|
71 |
|
72 @param aFactoryId ECOM Implementation Id |
|
73 @param aParentContainer Object Owner |
|
74 */ |
|
75 { |
|
76 } |
|
77 |
|
78 |
|
79 CUmtsGprsSubConnProvdFactory::~CUmtsGprsSubConnProvdFactory() |
|
80 { |
|
81 } |
|
82 |
|
83 |
|
84 CSubConnectionProviderBase* CUmtsGprsSubConnProvdFactory::DoCreateProviderL( |
|
85 CConnectionProviderBase& aConnProvider, |
|
86 RSubConnection::TSubConnType aType) |
|
87 { |
|
88 CSubConnectionProviderBase* provider = NULL; |
|
89 if (aType == RSubConnection::EAttachToDefault) |
|
90 { |
|
91 provider = CUmtsGprsDefaultSubConnProvd::NewL(*this, aConnProvider); |
|
92 } |
|
93 else |
|
94 { |
|
95 User::Leave(KErrNotSupported); |
|
96 } |
|
97 return provider; |
|
98 } |
|
99 |
|