|
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 #ifndef __MBMSPARAMS_H__ |
|
23 #define __MBMSPARAMS_H__ |
|
24 |
|
25 #include <genericscprparams.h> |
|
26 #include <e32base.h> |
|
27 #include <e32std.h> |
|
28 #include <mbmstypes.h> |
|
29 #include <in_sock.h> |
|
30 #include <comms-infras/es_connectionservparameterbundle.h> |
|
31 #include <comms-infras/es_parameterfamily.h> |
|
32 /** |
|
33 Represents the implementation Uid for MBMS parameters. |
|
34 */ |
|
35 const TInt32 KConnectionServMBMSParamImplUid = 0x20019D41; |
|
36 |
|
37 |
|
38 /** |
|
39 Represents the implementation Uid for Channel SubConnection parameters. |
|
40 */ |
|
41 const TInt32 KSubConChannelParamsImplUid = 0x20019D42; |
|
42 |
|
43 /** |
|
44 Represents the implementation Uid for Mbms Extention SubConnection parameters. |
|
45 */ |
|
46 const TInt32 KSubConMBMSExtParamsImplUid = 0x20019D43; |
|
47 /** |
|
48 Represents SubConneciton Channel parameter set type. |
|
49 */ |
|
50 const TInt KSubConChannelParamsType = 9; |
|
51 |
|
52 /** |
|
53 Represents MBMS SubConnection Extention parameter set type. |
|
54 */ |
|
55 const TInt KSubConMBMSSessionExtParamsType =1; |
|
56 |
|
57 /** |
|
58 Represents the set type for MBMS parameters. |
|
59 */ |
|
60 const TInt32 KMBMSParameterSetType = 1; |
|
61 |
|
62 /** |
|
63 Represents the set type for MBMS query. |
|
64 */ |
|
65 const TInt32 KMBMSQuerySetType = 2; |
|
66 |
|
67 using namespace GenericScprParameters; |
|
68 namespace ConnectionServ |
|
69 { |
|
70 struct TMBMSInfo |
|
71 /**Holds the MBMS information passed to ETel. */ |
|
72 { |
|
73 /**Holds the value TMGI */ |
|
74 TTmgi iTmgi; |
|
75 /**Holds the value access bearer.*/ |
|
76 TMbmsScope iMbmsScope; |
|
77 /** Sets the priority for MBMS service. */ |
|
78 TMbmsServicePriority iServicePriority; |
|
79 /**Holds IP address of the host to connect.This is used for later use to |
|
80 set multicast address */ |
|
81 TInetAddr iInetAddr; |
|
82 }; |
|
83 |
|
84 class TMBMSChannelInfoV1 : public TChannel |
|
85 /** Defines getter and setter methods to get and set MBMS parameters.This class is derived from |
|
86 TChannel which is a buffer of size 256 bytes. |
|
87 */ |
|
88 { |
|
89 public: |
|
90 inline TMBMSChannelInfoV1(); |
|
91 |
|
92 inline const TTmgi& GetTmgi() ; |
|
93 inline void SetTmgi(const TTmgi& aTmgi); |
|
94 |
|
95 inline const TMbmsScope GetScope() ; |
|
96 inline void SetScope(const TMbmsScope aScope); |
|
97 |
|
98 inline TMbmsServicePriority GetServicePriority() ; |
|
99 inline void SetServicePriority(const TMbmsServicePriority aServicePriority); |
|
100 |
|
101 inline const TInetAddr& GetInetAddress() ; |
|
102 inline void SetInetAddress(const TInetAddr& aAddress); |
|
103 |
|
104 private: |
|
105 inline TMBMSInfo* AddrPtr() ; |
|
106 |
|
107 }; |
|
108 |
|
109 class XMBMSServiceParameterSet:public XConnectionServParameterSet, |
|
110 public MParameterSetTemplateMethods<CConnectionServParameterSetContainer, |
|
111 XMBMSServiceParameterSet,KConnectionServMBMSParamImplUid,KMBMSParameterSetType> |
|
112 /** This class is used for getting and setting MBMS service parameters from the client to ETel |
|
113 and vice versa. |
|
114 */ |
|
115 { |
|
116 public: |
|
117 inline XMBMSServiceParameterSet(); |
|
118 virtual ~XMBMSServiceParameterSet(); |
|
119 |
|
120 inline TMbmsAvailabilityStatus GetMBMSServiceAvailability() const; |
|
121 inline void SetMBMSServiceAvailability(const TMbmsAvailabilityStatus aAvailabilityStatus); |
|
122 |
|
123 inline TMBMSChannelInfoV1* GetChannelInfo() ; |
|
124 |
|
125 inline TMbmsServiceMode GetServiceMode() const; |
|
126 inline void SetServiceMode(const TMbmsServiceMode aServiceMode); |
|
127 |
|
128 protected: |
|
129 DATA_VTABLE |
|
130 |
|
131 private: |
|
132 /** Holds the MBMS channel information */ |
|
133 TMBMSChannelInfoV1 iServiceInfo; |
|
134 /** Holds the MBMS service mode information */ |
|
135 TMbmsServiceMode iServiceMode; |
|
136 /** Holds the MBMS service availability status information */ |
|
137 TMbmsAvailabilityStatus iAvailabilityStatus; |
|
138 }; |
|
139 |
|
140 class XMBMSServiceQuerySet:public XConnectionServParameterSet, |
|
141 public MParameterSetTemplateMethods<CConnectionServParameterSetContainer,XMBMSServiceQuerySet, |
|
142 KConnectionServMBMSParamImplUid,KMBMSQuerySetType> |
|
143 /** Holds APIs to query PDP Tier Manager for MBMS bearer availability and MBMS |
|
144 service notifications. |
|
145 */ |
|
146 { |
|
147 public: |
|
148 enum TQueryType |
|
149 { |
|
150 /** Checks whether MBMS is supported by network. */ |
|
151 EBearerAvailability, |
|
152 /** Do MBMS Specific operations on MBMS monitor list. */ |
|
153 EAddService, ERemoveService, ERemoveAllService, |
|
154 /** Retrieve number of entries in monitor & activated service list. */ |
|
155 ECountActiveServiceList, ECountMonitorList |
|
156 }; |
|
157 |
|
158 inline XMBMSServiceQuerySet::TQueryType GetQueryType() const; |
|
159 inline void SetQueryType(const TQueryType aQueryType); |
|
160 |
|
161 inline TMbmsNetworkServiceStatus GetMBMSBearerAvailability() const; |
|
162 inline void SetMBMSBearerAvailability(const TMbmsNetworkServiceStatus aBearerAvailability); |
|
163 |
|
164 inline TUint GetListCount() const; |
|
165 inline void SetListCount(const TUint aCurrentCount); |
|
166 |
|
167 inline TUint GetListMaxCount() const; |
|
168 inline void SetListMaxCount(const TUint aMaxCount); |
|
169 |
|
170 virtual ~XMBMSServiceQuerySet(); |
|
171 |
|
172 protected: |
|
173 DATA_VTABLE |
|
174 |
|
175 private: |
|
176 /** Holds the MBMS query */ |
|
177 TQueryType iQueryType; |
|
178 /** Holds the MBMS Network service status information */ |
|
179 TMbmsNetworkServiceStatus iBearerAvailability; |
|
180 /** Holds the current count of monitor & activated service list */ |
|
181 TUint iCurrentCount; |
|
182 /** Holds the maximum count of monitor & activated service list */ |
|
183 TUint iMaxCount; |
|
184 } ; |
|
185 |
|
186 class CConnectionServMBMSParamsFactory : public CBase |
|
187 /** Factory used to create instances of MBMS Parameters. |
|
188 */ |
|
189 { |
|
190 public: |
|
191 static XConnectionServParameterSet* NewL(TAny* aConstructionParameters); |
|
192 }; |
|
193 |
|
194 |
|
195 |
|
196 /** Factory used to create instances of Channel SubConnection Parameters. |
|
197 @publishedPartner |
|
198 @released since 9.5 |
|
199 */ |
|
200 class CSubConChannelParamsFactory : public CBase |
|
201 { |
|
202 public: |
|
203 static CSubConGenericParameterSet* NewL(TAny* aConstructionParameters); |
|
204 }; |
|
205 |
|
206 |
|
207 |
|
208 /** This class is used to set MBMS SubConnection parameters. |
|
209 @publishedPartner |
|
210 @released since 9.5 |
|
211 */ |
|
212 class CSubConChannelParamSet : public CSubConGenericParameterSet |
|
213 { |
|
214 |
|
215 public: |
|
216 enum |
|
217 { |
|
218 EUid = KSubConChannelParamsImplUid, |
|
219 EId = KSubConChannelParamsType, |
|
220 }; |
|
221 |
|
222 public: |
|
223 inline static CSubConChannelParamSet* NewL(CSubConParameterFamily& aFamily,CSubConParameterFamily::TParameterSetType aType); |
|
224 inline static CSubConChannelParamSet* NewL(RParameterFamily& aFamily,RParameterFamily::TParameterSetType aType); |
|
225 inline static CSubConChannelParamSet* NewL(); |
|
226 |
|
227 /* Channel Getter Functions */ |
|
228 inline TAny* GetChannelInfo() ; |
|
229 |
|
230 /** public constructors so that it can be accessed by factory. */ |
|
231 inline CSubConChannelParamSet(); |
|
232 virtual ~CSubConChannelParamSet(); |
|
233 protected: |
|
234 DATA_VTABLE |
|
235 private: |
|
236 GenericScprParameters::TChannel iServiceInfo; |
|
237 }; |
|
238 |
|
239 |
|
240 /** Factory used to create instances of Mbms Extention SubConnection Parameters. |
|
241 |
|
242 @publishedPartner |
|
243 @released since 9.5 |
|
244 */ |
|
245 class CSubConMBMSExtParamsFactory : public CBase |
|
246 { |
|
247 public: |
|
248 static CSubConExtensionParameterSet* NewL(TAny* aConstructionParameters); |
|
249 }; |
|
250 |
|
251 |
|
252 /** This class is used to set MBMS Extension Parameters. |
|
253 |
|
254 @publishedPartner |
|
255 @released since 9.5 |
|
256 */ |
|
257 class CSubConMBMSExtensionParamSet :public CSubConExtensionParameterSet |
|
258 { |
|
259 public: |
|
260 /* Different operation types to add,remove and list sessions. */ |
|
261 enum TOperationType |
|
262 { |
|
263 EAddSession,ERemoveSession, ERemoveAll,ESessionList |
|
264 }; |
|
265 |
|
266 enum |
|
267 { |
|
268 EUid = KSubConMBMSExtParamsImplUid, |
|
269 EId = KSubConMBMSSessionExtParamsType, |
|
270 }; |
|
271 public: |
|
272 inline static CSubConMBMSExtensionParamSet* NewL(CSubConParameterFamily& aFamily,CSubConParameterFamily::TParameterSetType aType); |
|
273 inline static CSubConMBMSExtensionParamSet* NewL(RParameterFamily& aFamily, RParameterFamily::TParameterSetType aType); |
|
274 inline static CSubConMBMSExtensionParamSet* NewL(); |
|
275 |
|
276 /* Mbms Service Mode(Broadcast, Multicast or Selected Broadcast) Setter & Getter Functions */ |
|
277 inline void SetServiceMode( const TMbmsServiceMode aServiceMode); |
|
278 inline TMbmsServiceMode GetServiceMode() const; |
|
279 |
|
280 /* Mbms Extension Operation Setter & Getter Functions */ |
|
281 inline TOperationType GetOperationType () const; |
|
282 inline void SetOperationType(const TOperationType aOperationType); |
|
283 |
|
284 /* Session Id Setter & Getter Functions */ |
|
285 inline void SetSessionId(const TUint aSessionId); |
|
286 inline TInt GetSessionCount() const; |
|
287 inline TInt GetSessionId(const TUint aIndex=0); |
|
288 |
|
289 /** public constructors so that it can be accessed by factory. */ |
|
290 inline CSubConMBMSExtensionParamSet(); |
|
291 virtual ~CSubConMBMSExtensionParamSet(); |
|
292 protected: |
|
293 DATA_VTABLE |
|
294 private: |
|
295 /** Array of Session Ids in a Service */ |
|
296 RArray<TUint> iSessionIds; |
|
297 /** Mbms Service Mode */ |
|
298 TMbmsServiceMode iServiceMode; |
|
299 /** Mbms Extn Set Operation Type */ |
|
300 TOperationType iOperationType; |
|
301 |
|
302 }; |
|
303 |
|
304 } // namespace ConnectionServ |
|
305 |
|
306 |
|
307 |
|
308 #include <networking/mbmsparams.inl> |
|
309 #endif // __MBMSPARAMS_H__ |