equal
deleted
inserted
replaced
|
1 // Copyright (c) 2006-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 // ECOM Factory for Commdb Query Sets |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 |
|
24 #include "commsdataobjectfactory.h" |
|
25 #include <comms-infras/connectionqueryset.h> |
|
26 #include <comms-infras/provinfoqueryset.h> |
|
27 |
|
28 using namespace ESock; |
|
29 |
|
30 // ---------------- Factory Methods ---------------- |
|
31 |
|
32 |
|
33 /** |
|
34 Creates an instance of a comms data object based on the supplied type |
|
35 @param aConstructionParams A TUint identifying the type of data object to create |
|
36 @return A pointer to the instance of a data object |
|
37 */ |
|
38 XCommsDataObject* CCommsDataObjectFactory::NewL(TAny* aConstructionParams) |
|
39 { |
|
40 TUint typeId = reinterpret_cast<TUint>(aConstructionParams); |
|
41 switch (typeId) |
|
42 { |
|
43 case XConnectionQuerySet::iUid: |
|
44 return new (ELeave) XConnectionQuerySet(); |
|
45 //break; |
|
46 |
|
47 case XProviderInfoQuerySet::iUid: |
|
48 return new (ELeave) XProviderInfoQuerySet(); |
|
49 //break; |
|
50 case XTunnelConnQuerySet::iUid: |
|
51 return new (ELeave) XTunnelConnQuerySet(); |
|
52 //break; |
|
53 } |
|
54 |
|
55 return NULL; |
|
56 } |
|
57 |