|
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 /** |
|
17 @file |
|
18 @publishedPartner |
|
19 @released since 9.5 |
|
20 */ |
|
21 |
|
22 #include "mbmsparams.h" |
|
23 #include <e32std.h> |
|
24 #include <comms-infras/ss_log.h> |
|
25 #include <ecom/ecom.h> |
|
26 #include <ecom/implementationproxy.h> |
|
27 #include <comms-infras/cs_connservparams.h> |
|
28 #include <comms-infras/metatypearray.h> |
|
29 |
|
30 using namespace ConnectionServ; |
|
31 using namespace Meta; |
|
32 |
|
33 #ifdef __CFLOG_ACTIVE |
|
34 #define KMBMSTierMgrTag KESockConnServTag |
|
35 _LIT8(KConnservMBMSParamsTag, "MBMSParams"); |
|
36 #endif |
|
37 |
|
38 START_ATTRIBUTE_TABLE( XMBMSServiceParameterSet,KConnectionServMBMSParamImplUid, KMBMSParameterSetType ) |
|
39 REGISTER_ATTRIBUTE( XMBMSServiceParameterSet,iServiceInfo,TMeta<TMBMSChannelInfoV1> ) |
|
40 REGISTER_ATTRIBUTE( XMBMSServiceParameterSet,iServiceMode, TMetaNumber ) |
|
41 REGISTER_ATTRIBUTE( XMBMSServiceParameterSet,iAvailabilityStatus, TMetaNumber ) |
|
42 END_ATTRIBUTE_TABLE() |
|
43 |
|
44 START_ATTRIBUTE_TABLE( XMBMSServiceQuerySet,KConnectionServMBMSParamImplUid, KMBMSQuerySetType ) |
|
45 REGISTER_ATTRIBUTE( XMBMSServiceQuerySet,iQueryType,TMeta<TQueryType> ) |
|
46 REGISTER_ATTRIBUTE( XMBMSServiceQuerySet,iBearerAvailability, TMetaNumber ) |
|
47 REGISTER_ATTRIBUTE( XMBMSServiceQuerySet,iCurrentCount, TMetaNumber ) |
|
48 REGISTER_ATTRIBUTE( XMBMSServiceQuerySet,iMaxCount, TMetaNumber ) |
|
49 END_ATTRIBUTE_TABLE() |
|
50 |
|
51 // Define the interface UIDs |
|
52 const TImplementationProxy ImplementationTable[] = |
|
53 { |
|
54 IMPLEMENTATION_PROXY_ENTRY(KConnectionServMBMSParamImplUid, CConnectionServMBMSParamsFactory::NewL), |
|
55 IMPLEMENTATION_PROXY_ENTRY(KSubConChannelParamsImplUid, CSubConChannelParamsFactory::NewL), |
|
56 IMPLEMENTATION_PROXY_ENTRY(KSubConMBMSExtParamsImplUid, CSubConMBMSExtParamsFactory::NewL), |
|
57 }; |
|
58 |
|
59 /** |
|
60 ECOM Implementation Factories |
|
61 */ |
|
62 |
|
63 EXPORT_C const TImplementationProxy* ImplementationGroupProxy(TInt& aTableCount) |
|
64 { |
|
65 aTableCount = sizeof(ImplementationTable) / sizeof(TImplementationProxy); |
|
66 |
|
67 return ImplementationTable; |
|
68 } |
|
69 |
|
70 /** |
|
71 Plugin Implementation |
|
72 */ |
|
73 XConnectionServParameterSet* CConnectionServMBMSParamsFactory::NewL(TAny* aConstructionParameters) |
|
74 { |
|
75 TInt32 type = reinterpret_cast<TInt32>(aConstructionParameters); |
|
76 XConnectionServParameterSet* retval = NULL; |
|
77 |
|
78 switch (type) |
|
79 { |
|
80 case KMBMSParameterSetType: |
|
81 retval = new (ELeave) XMBMSServiceParameterSet; |
|
82 break; |
|
83 |
|
84 case KMBMSQuerySetType: |
|
85 retval = new (ELeave) XMBMSServiceQuerySet; |
|
86 break; |
|
87 |
|
88 default: |
|
89 User::Leave(KErrNotFound); |
|
90 } |
|
91 |
|
92 return retval; |
|
93 } |
|
94 |
|
95 START_ATTRIBUTE_TABLE( CSubConMBMSExtensionParamSet, KSubConMBMSExtParamsImplUid, KSubConMBMSSessionExtParamsType ) |
|
96 REGISTER_ATTRIBUTE(CSubConMBMSExtensionParamSet, iSessionIds, TMetaArray<TUint>) |
|
97 REGISTER_ATTRIBUTE(CSubConMBMSExtensionParamSet, iServiceMode, TMeta<TMbmsServiceMode>) |
|
98 REGISTER_ATTRIBUTE(CSubConMBMSExtensionParamSet, iOperationType, TMeta<CSubConMBMSExtensionParamSet::TOperationType>) |
|
99 END_ATTRIBUTE_TABLE() |
|
100 /** |
|
101 Plugin Implementation |
|
102 */ |
|
103 CSubConExtensionParameterSet* CSubConMBMSExtParamsFactory::NewL(TAny* aConstructionParameters) |
|
104 { |
|
105 TInt32 type = reinterpret_cast<TInt32>(aConstructionParameters); |
|
106 switch (type) |
|
107 { |
|
108 case (KSubConMBMSSessionExtParamsType): |
|
109 return new(ELeave) CSubConMBMSExtensionParamSet; |
|
110 |
|
111 default: |
|
112 User::Leave(KErrNotFound); |
|
113 } |
|
114 return NULL; |
|
115 } |
|
116 |
|
117 |
|
118 START_ATTRIBUTE_TABLE( CSubConChannelParamSet, KSubConChannelParamsImplUid, KSubConChannelParamsType ) |
|
119 REGISTER_ATTRIBUTE(CSubConChannelParamSet, iServiceInfo, TMeta<GenericScprParameters::TChannel >) |
|
120 END_ATTRIBUTE_TABLE() |
|
121 /** |
|
122 Plugin Implementation |
|
123 */ |
|
124 CSubConGenericParameterSet* CSubConChannelParamsFactory::NewL(TAny* aConstructionParameters) |
|
125 { |
|
126 |
|
127 TInt32 type = reinterpret_cast<TInt32>(aConstructionParameters); |
|
128 switch (type) |
|
129 { |
|
130 case (KSubConChannelParamsType): |
|
131 return new (ELeave) CSubConChannelParamSet; |
|
132 |
|
133 } |
|
134 return NULL; |
|
135 } |
|
136 |
|
137 |
|
138 /*virtual*/XMBMSServiceParameterSet::~XMBMSServiceParameterSet() |
|
139 /** |
|
140 Standard destructor. |
|
141 */ |
|
142 { |
|
143 } |
|
144 |
|
145 /*virtual*/CSubConChannelParamSet::~CSubConChannelParamSet() |
|
146 /** |
|
147 Standard destructor. |
|
148 */ |
|
149 { |
|
150 } |
|
151 |
|
152 /*virtual*/CSubConMBMSExtensionParamSet::~CSubConMBMSExtensionParamSet() |
|
153 { |
|
154 iSessionIds.Close(); |
|
155 } |
|
156 |
|
157 /*virtual*/XMBMSServiceQuerySet::~XMBMSServiceQuerySet() |
|
158 /** |
|
159 Standard destructor. |
|
160 */ |
|
161 { |
|
162 } |