|
1 // Copyright (c) 2004-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 @file subconparams.cpp |
|
18 */ |
|
19 |
|
20 #include <e32std.h> |
|
21 #include <e32test.h> |
|
22 #include <ecom/ecom.h> |
|
23 #include <ecom/implementationproxy.h> |
|
24 #include <cs_subconparams.h> |
|
25 #include <cs_subconevents.h> |
|
26 |
|
27 #include <comms-infras/ss_nodemessages.h> |
|
28 #include <comms-infras/ss_protocolparameterset.h> |
|
29 |
|
30 #ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW |
|
31 #include <cs_genevent.h> |
|
32 #endif // SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW |
|
33 |
|
34 #include "cs_subconeventsfactory.h" |
|
35 |
|
36 class CSubConGenericParamsFactory : public CBase |
|
37 /** Sub connection generic parameter set factory. |
|
38 |
|
39 @internalComponent |
|
40 @released since v9.1 */ |
|
41 { |
|
42 public: |
|
43 static CSubConGenericParameterSet* NewL(TAny* aConstructionParameters); |
|
44 }; |
|
45 |
|
46 START_ATTRIBUTE_TABLE( CSubConQosGenericParamSet, CSubConQosGenericParamSet::EUid, CSubConQosGenericParamSet::EType) |
|
47 REGISTER_ATTRIBUTE( CSubConQosGenericParamSet, iDownlinkBandwidth, TMetaNumber ) |
|
48 REGISTER_ATTRIBUTE( CSubConQosGenericParamSet, iUplinkBandwidth, TMetaNumber ) |
|
49 REGISTER_ATTRIBUTE( CSubConQosGenericParamSet, iDownLinkMaximumBurstSize, TMetaNumber ) |
|
50 REGISTER_ATTRIBUTE( CSubConQosGenericParamSet, iUpLinkMaximumBurstSize, TMetaNumber ) |
|
51 REGISTER_ATTRIBUTE( CSubConQosGenericParamSet, iDownLinkAveragePacketSize, TMetaNumber ) |
|
52 REGISTER_ATTRIBUTE( CSubConQosGenericParamSet, iUpLinkAveragePacketSize, TMetaNumber ) |
|
53 REGISTER_ATTRIBUTE( CSubConQosGenericParamSet, iDownLinkMaximumPacketSize, TMetaNumber ) |
|
54 REGISTER_ATTRIBUTE( CSubConQosGenericParamSet, iUpLinkMaximumPacketSize, TMetaNumber ) |
|
55 REGISTER_ATTRIBUTE( CSubConQosGenericParamSet, iDownLinkDelay, TMetaNumber ) |
|
56 REGISTER_ATTRIBUTE( CSubConQosGenericParamSet, iUpLinkDelay, TMetaNumber ) |
|
57 REGISTER_ATTRIBUTE( CSubConQosGenericParamSet, iDownLinkDelayVariation, TMetaNumber ) |
|
58 REGISTER_ATTRIBUTE( CSubConQosGenericParamSet, iUpLinkDelayVariation, TMetaNumber ) |
|
59 REGISTER_ATTRIBUTE( CSubConQosGenericParamSet, iDownLinkPriority, TMetaNumber ) |
|
60 REGISTER_ATTRIBUTE( CSubConQosGenericParamSet, iUpLinkPriority, TMetaNumber ) |
|
61 REGISTER_ATTRIBUTE( CSubConQosGenericParamSet, iHeaderMode, TMeta<TBool> ) |
|
62 REGISTER_ATTRIBUTE( CSubConQosGenericParamSet, iName, TMeta<TName> ) |
|
63 END_ATTRIBUTE_TABLE() |
|
64 |
|
65 START_ATTRIBUTE_TABLE( CSubConAuthorisationGenericParamSet, CSubConAuthorisationGenericParamSet::EUid, CSubConAuthorisationGenericParamSet::EType) |
|
66 REGISTER_ATTRIBUTE( CSubConAuthorisationGenericParamSet, iId, TMetaNumber ) |
|
67 END_ATTRIBUTE_TABLE() |
|
68 |
|
69 |
|
70 START_ATTRIBUTE_TABLE(ESock::CFlowRequestParameters, ESock::CFlowRequestParameters::EUid, ESock::CFlowRequestParameters::EType) |
|
71 REGISTER_ATTRIBUTE(ESock::CFlowRequestParameters, iFlowParams, TMeta<ESock::TFlowParams>) |
|
72 END_ATTRIBUTE_TABLE() |
|
73 |
|
74 |
|
75 // Define the interface UIDs |
|
76 const TImplementationProxy ImplementationTable[] = |
|
77 { |
|
78 IMPLEMENTATION_PROXY_ENTRY(KSubConnGenericParamsImplUid, CSubConGenericParamsFactory::NewL), |
|
79 #ifdef SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW |
|
80 IMPLEMENTATION_PROXY_ENTRY(KSubConnGenericEventsImplUid, CSubConGenEventsFactory::NewL), |
|
81 IMPLEMENTATION_PROXY_ENTRY(KEventTypeImplUid, CPlaneEventFactory::NewL) |
|
82 #else |
|
83 IMPLEMENTATION_PROXY_ENTRY(KSubConnGenericEventsImplUid, CSubConGenEventsFactory::NewL) |
|
84 #endif // SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW |
|
85 }; |
|
86 |
|
87 /** |
|
88 ECOM Implementation Factories |
|
89 */ |
|
90 |
|
91 //extern "C" { IMPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount); } |
|
92 |
|
93 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) |
|
94 { |
|
95 aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); |
|
96 |
|
97 return ImplementationTable; |
|
98 } |
|
99 |
|
100 /** |
|
101 Plugin Implementation |
|
102 */ |
|
103 |
|
104 CSubConGenericParameterSet* CSubConGenericParamsFactory::NewL(TAny* aConstructionParameters) |
|
105 { |
|
106 TInt32 type = reinterpret_cast<TInt32>(aConstructionParameters); |
|
107 switch (type) |
|
108 { |
|
109 case (CSubConQosGenericParamSet::EType): |
|
110 return new (ELeave) CSubConQosGenericParamSet; |
|
111 // break; |
|
112 case (CSubConAuthorisationGenericParamSet::EType): |
|
113 return new (ELeave) CSubConAuthorisationGenericParamSet; |
|
114 // break; |
|
115 case (ESock::CFlowRequestParameters::EType): |
|
116 return new (ELeave) ESock::CFlowRequestParameters; |
|
117 // break; |
|
118 default: |
|
119 User::Leave(KErrNotFound); |
|
120 } |
|
121 return NULL; |
|
122 } |
|
123 |
|
124 |