|
1 // Copyright (c) 2008-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 #include "esock_params.h" |
|
17 #include <comms-infras/esock_params_internal.h> |
|
18 #include <e32std.h> |
|
19 #include <e32test.h> |
|
20 #include <ecom/ecom.h> |
|
21 #include <ecom/implementationproxy.h> |
|
22 #include <comms-infras/metatype.h> |
|
23 |
|
24 //SMetaDataECom macros |
|
25 |
|
26 START_ATTRIBUTE_TABLE( TConnAPPref, TConnAPPref::EUid, TConnAPPref::ETypeId ) |
|
27 REGISTER_ATTRIBUTE( TConnAPPref, iAP, TMetaNumber ) |
|
28 END_ATTRIBUTE_TABLE() |
|
29 |
|
30 START_ATTRIBUTE_TABLE( TConnCSRPref, TConnCSRPref::EUid, TConnCSRPref::ETypeId ) |
|
31 REGISTER_ATTRIBUTE( TConnCSRPref, iScope, TMetaNumber ) |
|
32 REGISTER_ATTRIBUTE( TConnCSRPref, iFlags, TMetaNumber ) |
|
33 REGISTER_ATTRIBUTE( TConnCSRPref, iSubSessionUniqueId, TMeta<Den::TSubSessionUniqueId>) |
|
34 END_ATTRIBUTE_TABLE() |
|
35 |
|
36 START_ATTRIBUTE_TABLE( TConnAutoStartPref, TConnAutoStartPref::EUid, TConnAutoStartPref::ETypeId ) |
|
37 END_ATTRIBUTE_TABLE() |
|
38 |
|
39 |
|
40 /** |
|
41 Plugin Implementation |
|
42 */ |
|
43 |
|
44 Meta::SMetaDataECom* CESockParamaterFactory::NewL(TAny* aConstructionParameters) |
|
45 { |
|
46 TInt32 type = reinterpret_cast<TInt32>(aConstructionParameters); |
|
47 switch (type) |
|
48 { |
|
49 case (TConnAPPref::ETypeId): |
|
50 return new (ELeave) TConnAPPref; |
|
51 case (TConnCSRPref::ETypeId): |
|
52 return new (ELeave) TConnCSRPref; |
|
53 case (TConnAutoStartPref::ETypeId): |
|
54 return new (ELeave) TConnAutoStartPref; |
|
55 default: |
|
56 User::Leave(KErrNotFound); |
|
57 return NULL; |
|
58 } |
|
59 } |
|
60 |
|
61 |