0
|
1 |
/*
|
|
2 |
* Copyright (c) 2007-2008 Nokia Corporation and/or its subsidiary(-ies).
|
|
3 |
* All rights reserved.
|
|
4 |
* This component and the accompanying materials are made available
|
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
|
6 |
* which accompanies this distribution, and is available
|
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
8 |
*
|
|
9 |
* Initial Contributors:
|
|
10 |
* Nokia Corporation - initial contribution.
|
|
11 |
*
|
|
12 |
* Contributors:
|
|
13 |
*
|
|
14 |
* Description:
|
|
15 |
*
|
|
16 |
*/
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
#ifndef CMMPACKETQOSMESSHANDLER_H
|
|
21 |
#define CMMPACKETQOSMESSHANDLER_H
|
|
22 |
|
|
23 |
// INCLUDES
|
|
24 |
#include <etelqos.h>
|
|
25 |
#include <in_sock.h>
|
|
26 |
#include "mmmmesshandlerbase.h"
|
|
27 |
#include "cmmphonetreceiver.h"
|
|
28 |
#include <ctsy/serviceapi/cmmutility.h>
|
|
29 |
|
|
30 |
// CONSTANTS
|
|
31 |
|
|
32 |
// Shift 1 bit
|
|
33 |
const TInt KShift1Bit = 1;
|
|
34 |
|
|
35 |
// Shift 8 bits
|
|
36 |
const TInt KShift8Bits = 8;
|
|
37 |
|
|
38 |
// Shift 16 bits
|
|
39 |
const TInt KShift16Bits = 16;
|
|
40 |
|
|
41 |
// Shift 24 bits
|
|
42 |
const TInt KShift24Bits = 24;
|
|
43 |
|
|
44 |
// MACROS
|
|
45 |
// None
|
|
46 |
|
|
47 |
// DATA TYPES
|
|
48 |
// None
|
|
49 |
|
|
50 |
// FUNCTION PROTOTYPES
|
|
51 |
// None
|
|
52 |
|
|
53 |
// FORWARD DECLARATIONS
|
|
54 |
class CMmPhoNetSender;
|
|
55 |
class CMmPacketContextMesshandlerList;
|
|
56 |
class TIsiReceiveC;
|
|
57 |
class CMmMessageRouter;
|
|
58 |
|
|
59 |
// CLASS DECLARATION
|
|
60 |
|
|
61 |
// DESCRIPTION
|
|
62 |
|
|
63 |
/**
|
|
64 |
* CMmPacketQoSMessHandler is used to create and send GSM/WCDMA-
|
|
65 |
* specific packet context ISI messages to PhoNet via PhoNetSender.
|
|
66 |
* It also receives GSM/WCDMA-specific packet context ISI messages from
|
|
67 |
* Phonet via PhoNetReceiver.
|
|
68 |
*/
|
|
69 |
class CMmPacketQoSMessHandler: public CBase,
|
|
70 |
public MMmMessHandlerBase,
|
|
71 |
public MMmMessageReceiver
|
|
72 |
{
|
|
73 |
public: // Constructor and destructor
|
|
74 |
|
|
75 |
/**
|
|
76 |
* Two-phased constructor.NewL method is used to create a new instance
|
|
77 |
* of CMmPacketQoSMessHandler class.
|
|
78 |
* @param aPhoNetSender: pointer to phonetsender
|
|
79 |
* @param aPhoNetReceiver: pointer to phonet receiver
|
|
80 |
* @param aMmPacketContextMesshandlerList: pointer to context list
|
|
81 |
* @param aMessageRouter: pointer to message router
|
|
82 |
* @return CMmPacketQoSMessHandler*: pointer to the message handler
|
|
83 |
*/
|
|
84 |
static CMmPacketQoSMessHandler* NewL(
|
|
85 |
CMmPhoNetSender* aPhoNetSender,
|
|
86 |
CMmPhoNetReceiver* aPhoNetReceiver,
|
|
87 |
CMmPacketContextMesshandlerList* aMmPacketContextMesshandlerList,
|
|
88 |
CMmMessageRouter* aMessageRouter );
|
|
89 |
|
|
90 |
/**
|
|
91 |
* Destructor.
|
|
92 |
*/
|
|
93 |
~CMmPacketQoSMessHandler();
|
|
94 |
|
|
95 |
public: // new classes
|
|
96 |
/**
|
|
97 |
* Server side QoS R97/98 parameters
|
|
98 |
* @param iPrecedence
|
|
99 |
* @param iDelay
|
|
100 |
* @param iPeakThroughput
|
|
101 |
* @param iReliability
|
|
102 |
* @param iMeanThroughput
|
|
103 |
*/
|
|
104 |
class TQoSInfo
|
|
105 |
{
|
|
106 |
public:
|
|
107 |
TUint8 iPrecedence;
|
|
108 |
TUint8 iDelay;
|
|
109 |
TUint8 iPeakThroughput;
|
|
110 |
TUint8 iReliability;
|
|
111 |
TUint8 iMeanThroughput;
|
|
112 |
};
|
|
113 |
|
|
114 |
/**
|
|
115 |
* Server side QoS R99 parameters
|
|
116 |
* @param iTrafficClass
|
|
117 |
* @param iDeliveryOrderReqd
|
|
118 |
* @param iDeliverErroneousSDU
|
|
119 |
* @param iBER
|
|
120 |
* @param iSDUErrorRatio
|
|
121 |
* @param iTrafficHandlingPriority
|
|
122 |
* @param iTransferDelay
|
|
123 |
* @param iMaxSDUSize
|
|
124 |
* @param iMaxUplinkRate
|
|
125 |
* @param iMaxDownlinkRate
|
|
126 |
* @param iGuaranteedUplinkRate
|
|
127 |
* @param iGuaranteedDownlinkRate
|
|
128 |
*/
|
|
129 |
class TQoS99Info
|
|
130 |
{
|
|
131 |
public:
|
|
132 |
TUint8 iTrafficClass;
|
|
133 |
TUint8 iDeliveryOrderReqd;
|
|
134 |
TUint8 iDeliverErroneousSDU;
|
|
135 |
TUint8 iBER;
|
|
136 |
TUint8 iSDUErrorRatio;
|
|
137 |
TUint8 iTrafficHandlingPriority;
|
|
138 |
TUint16 iTransferDelay;
|
|
139 |
TUint16 iMaxSDUSize;
|
|
140 |
TUint16 iMaxUplinkRate;
|
|
141 |
TUint16 iMaxDownlinkRate;
|
|
142 |
TUint16 iGuaranteedUplinkRate;
|
|
143 |
TUint16 iGuaranteedDownlinkRate;
|
|
144 |
TUint8 iSignallingIndication;
|
|
145 |
TUint8 iSourceStatisticsDescriptor;
|
|
146 |
};
|
|
147 |
|
|
148 |
/**
|
|
149 |
* Structure for server side QoS parameters
|
|
150 |
* @param iExtensionId
|
|
151 |
* @param TQoSInfo* iQoSMinInfo
|
|
152 |
* @param TQoSInfo* iQoSReqInfo
|
|
153 |
* @param TQoS99Info* iQoS99MinInfo
|
|
154 |
* @param TQoS99Info* iQoS99ReqInfo
|
|
155 |
*/
|
|
156 |
class TQoS
|
|
157 |
{
|
|
158 |
public:
|
|
159 |
TInt iExtensionId;
|
|
160 |
TQoSInfo* iQoSMinInfo;
|
|
161 |
TQoSInfo* iQoSReqInfo;
|
|
162 |
TQoS99Info* iQoS99MinInfo;
|
|
163 |
TQoS99Info* iQoS99ReqInfo;
|
|
164 |
};
|
|
165 |
|
|
166 |
public: // New functions
|
|
167 |
|
|
168 |
/**
|
|
169 |
* IsiMsg received by PhonetReceiver, interpret if GSM/WCDMA packet
|
|
170 |
* context specific
|
|
171 |
* @param TIsiReceiveC, reference to the received message.
|
|
172 |
* @return void
|
|
173 |
*/
|
|
174 |
void ReceiveMessageL( const TIsiReceiveC& aIsiMessage );
|
|
175 |
|
|
176 |
/**
|
|
177 |
* Maps parameters to server
|
|
178 |
* @param aQoSInfo refence to TQoSInfo
|
|
179 |
* @param aPrecedence refence to RPacketQoS::TQoSPrecedence
|
|
180 |
* @param aDelay refence to RPacketQoS::TQoSDelay
|
|
181 |
* @param aReliability refence to RPacketQoS::TQoSReliability
|
|
182 |
* @param aPeakThroughput refence to RPacketQoS::TQoSPeakThroughput
|
|
183 |
* @param aMeanThroughput refence to RPacketQoS::TQoSMeanThroughput
|
|
184 |
* @return error value
|
|
185 |
*/
|
|
186 |
TInt MapQoSInfoToServer(
|
|
187 |
TQoSInfo& aQoSInfo,
|
|
188 |
const RPacketQoS::TQoSPrecedence& aPrecedence,
|
|
189 |
const RPacketQoS::TQoSDelay& aDelay,
|
|
190 |
const RPacketQoS::TQoSReliability& aReliability,
|
|
191 |
const RPacketQoS::TQoSPeakThroughput& aPeakThroughput,
|
|
192 |
const RPacketQoS::TQoSMeanThroughput& aMeanThroughput );
|
|
193 |
|
|
194 |
/**
|
|
195 |
* Map QoS99Info To Server
|
|
196 |
* @param aQos99Info Server side QoS R99 info packet
|
|
197 |
* @param aTrafficClass Traffic class
|
|
198 |
* @param aDeliveryOrderReqd Delivery order required
|
|
199 |
* @param aDeliverErroneousSDU Delivery of erroneous SDUs
|
|
200 |
* @param aBER Bit error ratio
|
|
201 |
* @param aSDUErrorRatio SDU error ratio
|
|
202 |
* @param aTrafficHandlingPriority Traffic handling priority
|
|
203 |
* @return error value
|
|
204 |
*/
|
|
205 |
TInt MapQoS99InfoToServer(
|
|
206 |
TQoS99Info& aQoS99Info,
|
|
207 |
const RPacketQoS::TTrafficClass& aTrafficClass,
|
|
208 |
const RPacketQoS::TDeliveryOrder& aDeliveryOrderReqd,
|
|
209 |
const RPacketQoS::TErroneousSDUDelivery& aDeliverErroneousSDU,
|
|
210 |
const RPacketQoS::TBitErrorRatio& aBER,
|
|
211 |
const RPacketQoS::TSDUErrorRatio& aSDUErrorRatio,
|
|
212 |
const RPacketQoS::TTrafficHandlingPriority& aTrafficHandlingPriority );
|
|
213 |
|
|
214 |
/**
|
|
215 |
* Copy QoS99 Values To Server
|
|
216 |
* @param aQos99Info QoS R99 info packet
|
|
217 |
* @param aMaxTransferDelay Maximum transfer delay
|
|
218 |
* @param aMaxSDUSize Maximum SDU size
|
|
219 |
* @param aMaxRate Maximum data rate
|
|
220 |
* @param aGuaranteedRate Guaranteed rate for uplink and downlink
|
|
221 |
* @return error value
|
|
222 |
*/
|
|
223 |
TInt CopyQoS99ValuesToServer(
|
|
224 |
TQoS99Info& aQoS99Info,
|
|
225 |
const TInt aMaxTransferDelay,
|
|
226 |
const TInt aMaxSDUSize,
|
|
227 |
const RPacketQoS::TBitRate& aMaxRate,
|
|
228 |
const RPacketQoS::TBitRate& aGuaranteedRate );
|
|
229 |
|
|
230 |
public: // Functions from base classes
|
|
231 |
|
|
232 |
/**
|
|
233 |
* ExtFunc is called by the MessageManager when it has request for the TSY.
|
|
234 |
* Directs requests to right method
|
|
235 |
* @param aIpc IPC number of request
|
|
236 |
* @param aDataPackage Datapackage includes request related data
|
|
237 |
* @return error value
|
|
238 |
*/
|
|
239 |
TInt ExtFuncL(
|
|
240 |
TInt aIpc,
|
|
241 |
const CMmDataPackage* aDataPackage );
|
|
242 |
|
|
243 |
protected: // New functions
|
|
244 |
// None
|
|
245 |
|
|
246 |
protected: // Functions from base classes
|
|
247 |
// None
|
|
248 |
|
|
249 |
private: // Constructor and destructor
|
|
250 |
|
|
251 |
/**
|
|
252 |
* C++ default constructor
|
|
253 |
*/
|
|
254 |
CMmPacketQoSMessHandler();
|
|
255 |
|
|
256 |
/**
|
|
257 |
* Second phase constructor of CMmPacketContext.
|
|
258 |
*/
|
|
259 |
void ConstructL();
|
|
260 |
|
|
261 |
private: // New functions
|
|
262 |
|
|
263 |
/**
|
|
264 |
* Creates GpdsContextConfigureReq ISI message and sends it to Phonet.
|
|
265 |
* @param aContextId ,Context identifier
|
|
266 |
* @param aPdpType ,Pdp type
|
|
267 |
* @param aContextType ,Context type
|
|
268 |
* @param aPrimaryContextId ,Primary context identifier
|
|
269 |
* @param TQoS& aQoS ,Reference to TQoS
|
|
270 |
* @param aSignallingIndication ,Signalling indication
|
|
271 |
* @param aSourceStatisticsDescriptor ,Source Statistics Descriptor
|
|
272 |
* @return error value
|
|
273 |
*/
|
|
274 |
TInt GpdsContextConfigureReq(
|
|
275 |
const TUint8 aContextId,
|
|
276 |
const TUint8 aPdpType,
|
|
277 |
const TUint8 aContextType,
|
|
278 |
const TUint8 aPrimaryContextId,
|
|
279 |
const TQoS& aQoS,
|
|
280 |
const TBool aSignallingIndication,
|
|
281 |
const TBool aSourceStatisticsDescriptor ) const;
|
|
282 |
|
|
283 |
/**
|
|
284 |
* Breaks a GPDS_CONTEXT_CONFIGURE_RESP ISI-message
|
|
285 |
* @param aIsiMsg pointer to isimessage reived from NOS
|
|
286 |
*/
|
|
287 |
void GpdsContextConfigureResp(
|
|
288 |
const TIsiReceiveC& aIsiMessage );
|
|
289 |
|
|
290 |
/**
|
|
291 |
* Breaks a GPDS_CONTEXT_ACTIVATE_IND or
|
|
292 |
* GPDS_CONTEXT_MODIFY_IND ISI-message
|
|
293 |
* @param aIsiMsg pointer to isimessage received from NOS
|
|
294 |
*/
|
|
295 |
void GpdsContextActivateOrModifyInd(
|
|
296 |
const TIsiReceiveC& aIsiMessage );
|
|
297 |
|
|
298 |
/**
|
|
299 |
* Sets QoS profile parameters
|
|
300 |
* @param aDataPackage contains request related data
|
|
301 |
* @return error value
|
|
302 |
*/
|
|
303 |
TInt SetProfileParametersL(
|
|
304 |
const CMmDataPackage* aDataPackage );
|
|
305 |
|
|
306 |
/**
|
|
307 |
* Reset Requested QoS parameters
|
|
308 |
* @param aQos referance to struct TQos
|
|
309 |
*/
|
|
310 |
void ResetRequestedQoS(
|
|
311 |
TQoS& aQoS );
|
|
312 |
|
|
313 |
/**
|
|
314 |
* Completes Notify Profile Changed
|
|
315 |
* @param aQoSNegotiated Pointer to TQoSInfo structure
|
|
316 |
* @param aQoS99Negotiated Pointer to TQoS99Info structure
|
|
317 |
* @param aQoSNegValid Negotiated QoS 97 parameter indicator
|
|
318 |
* @param aQoS99NegValid Negotiated QoS 99 parameter indicator
|
|
319 |
* @param aContextId Context object ID number
|
|
320 |
*/
|
|
321 |
void CompleteNotifyProfileChanged(
|
|
322 |
TQoSInfo* aQoSNegotiated,
|
|
323 |
TQoS99Info* aQoS99Negotiated,
|
|
324 |
const TBool aQoSNegValid,
|
|
325 |
const TBool aQoS99NegValid,
|
|
326 |
TUint8 aContextId );
|
|
327 |
|
|
328 |
/**
|
|
329 |
* Maps QoSInfo To Client
|
|
330 |
* @param aQoSInfo Reference to QoS Info
|
|
331 |
* @param aPrecedence Reference to Precedence
|
|
332 |
* @param aDelay Reference to Delay
|
|
333 |
* @param aReliability Reference to Reliability
|
|
334 |
* @param aPeakThroughput Reference to PeakThroughput
|
|
335 |
* @param aMeanThroughputReference to MeanThroughput
|
|
336 |
*/
|
|
337 |
void MapQoSInfoToClient(
|
|
338 |
const TQoSInfo& aQoSInfo,
|
|
339 |
RPacketQoS::TQoSPrecedence& aPrecedence,
|
|
340 |
RPacketQoS::TQoSDelay& aDelay,
|
|
341 |
RPacketQoS::TQoSReliability& aReliability,
|
|
342 |
RPacketQoS::TQoSPeakThroughput& aPeakThroughput,
|
|
343 |
RPacketQoS::TQoSMeanThroughput& aMeanThroughput );
|
|
344 |
|
|
345 |
/**
|
|
346 |
* Maps QoSInfo To Client
|
|
347 |
* @param aQoS99Info Reference to QoS Info
|
|
348 |
* @param aQoS99Negotiated Reference to negotiated QoS 99 parameters
|
|
349 |
* @param aQoSNegValid Reference to negotiated QoS R5 parameters
|
|
350 |
*/
|
|
351 |
void MapQoS99InfoToClient(
|
|
352 |
const TQoS99Info& aQoS99Info,
|
|
353 |
RPacketQoS::TQoSR99_R4Negotiated& aQoS99Negotiated,
|
|
354 |
RPacketQoS::TQoSR5Negotiated& aQoSR5Negotiated );
|
|
355 |
|
|
356 |
protected: // Data
|
|
357 |
// None
|
|
358 |
|
|
359 |
private: // Data
|
|
360 |
|
|
361 |
// Pointer to the phonet sender
|
|
362 |
CMmPhoNetSender* iPhoNetSender;
|
|
363 |
|
|
364 |
// Pointer to the message router
|
|
365 |
CMmMessageRouter* iMessageRouter;
|
|
366 |
|
|
367 |
// Pointer to the messhandlerlist
|
|
368 |
CMmPacketContextMesshandlerList*
|
|
369 |
iMmPacketContextMesshandlerList;
|
|
370 |
|
|
371 |
// Pointer to the TQoSGPRSNegotiated
|
|
372 |
RPacketQoS::TQoSGPRSNegotiated iQoSGPRSNegotiated;
|
|
373 |
|
|
374 |
// Pointer to the negotiated QoS 99 parameters
|
|
375 |
RPacketQoS::TQoSR99_R4Negotiated iQoSR99_R4Negotiated;
|
|
376 |
|
|
377 |
RPacketQoS::TQoSR5Negotiated iQoSR5_Negotiated;
|
|
378 |
|
|
379 |
// Structure containing server side QoS parameters
|
|
380 |
TQoS iQos;
|
|
381 |
|
|
382 |
};
|
|
383 |
|
|
384 |
#endif // CMMPACKETQOSMESSHANDLER_H
|
|
385 |
|
|
386 |
// End of file
|