|
1 // Copyright (c) 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 // CLtsyPacketServicesHandler |
|
15 |
|
16 #ifndef __CLTSYDISPATCHPACKETSERVICESHANDLER_H_ |
|
17 #define __CLTSYDISPATCHPACKETSERVICESHANDLER_H_ |
|
18 |
|
19 // INCLUDES |
|
20 #include <e32std.h> |
|
21 #include <e32base.h> |
|
22 |
|
23 #include <ctsy/ltsy/mltsydispatchinterface.h> |
|
24 #include <ctsy/ltsy/mltsydispatchpacketservicesinterface.h> |
|
25 #include "misdispatchinterfacesupported.h" |
|
26 #include "ltsymacros.h" |
|
27 |
|
28 struct TContextInfomation |
|
29 { |
|
30 RPacketContext::TContextConfigGPRS iDefContextConfigGPRS; |
|
31 RPacketQoS::TQoSGPRSRequested iQoSConfig; |
|
32 RPacketService::TContextInfo iInfo; |
|
33 TInt iContextID; |
|
34 }; |
|
35 |
|
36 // FORWARD DECLARATIONS |
|
37 class CCtsyDispatcherCallback; |
|
38 class CGlobalPhonemanager; |
|
39 class CAsyncHelperRequest; |
|
40 class CATGprsNtwkRegStatusChange; |
|
41 class CInitialisePdpContext; |
|
42 |
|
43 |
|
44 // Can be removed in real LTSY implementation |
|
45 MTEST_FORWARD_DECLARE_MOCKLTSYENGINE |
|
46 |
|
47 // CLASS DECLARATION |
|
48 |
|
49 /** |
|
50 * Implements interfaces from the CTSY Dispatcher. The CTSY Dispatcher uses these |
|
51 * interfaces to make requests to the Licensee LTSY. |
|
52 */ |
|
53 class CLtsyPacketServicesHandler : public CBase, |
|
54 public MIsDispatchInterfaceSupported, |
|
55 public MLtsyDispatchPacketServicesPacketAttach, |
|
56 public MLtsyDispatchPacketServicesGetPacketAttachMode, |
|
57 public MLtsyDispatchPacketServicesGetPacketNetworkRegistrationStatus, |
|
58 public MLtsyDispatchPacketServicesPacketDetach, |
|
59 public MLtsyDispatchPacketServicesSetPdpContextConfig, |
|
60 public MLtsyDispatchPacketServicesModifyActivePdpContext, |
|
61 public MLtsyDispatchPacketServicesInitialisePdpContext, |
|
62 public MLtsyDispatchPacketServicesDeletePdpContext, |
|
63 public MLtsyDispatchPacketServicesSetPacketAttachMode, |
|
64 public MLtsyDispatchPacketServicesNotifyPacketStatusChange, |
|
65 public MLtsyDispatchPacketServicesSetDefaultPdpContextGprsParams, |
|
66 public MLtsyDispatchPacketServicesSetDefaultPdpContextR99R4Params, |
|
67 public MLtsyDispatchPacketServicesActivatePdpContext, |
|
68 public MLtsyDispatchPacketServicesSetPdpContextQosGprs, |
|
69 public MLtsyDispatchPacketServicesSetPdpContextQosR99R4, |
|
70 public MLtsyDispatchPacketServicesSetPdpContextQosR5, |
|
71 public MLtsyDispatchPacketServicesRejectNetworkInitiatedContextActivationRequest, |
|
72 public MLtsyDispatchPacketServicesDeactivatePdpContext, |
|
73 public MLtsyDispatchPacketServicesAddPacketFilter, |
|
74 public MLtsyDispatchPacketServicesGetStatus, |
|
75 public MLtsyDispatchPacketServicesGetStaticCapabilities, |
|
76 public MLtsyDispatchPacketServicesGetMaxNoMonitoredServiceLists, |
|
77 public MLtsyDispatchPacketServicesGetMaxNoActiveServices, |
|
78 public MLtsyDispatchPacketServicesInitialiseMbmsContext, |
|
79 public MLtsyDispatchPacketServicesGetMbmsNetworkServiceStatus, |
|
80 public MLtsyDispatchPacketServicesUpdateMbmsMonitorServiceList, |
|
81 public MLtsyDispatchPacketServicesUpdateMbmsSessionList, |
|
82 public MLtsyDispatchPacketServicesRemovePacketFilter |
|
83 |
|
84 |
|
85 { |
|
86 public: |
|
87 |
|
88 virtual ~CLtsyPacketServicesHandler(); |
|
89 static CLtsyPacketServicesHandler* NewL(CCtsyDispatcherCallback& aCtsyDispatcherCallback,CGlobalPhonemanager* aGloblePhone); |
|
90 static CLtsyPacketServicesHandler* NewLC(CCtsyDispatcherCallback& aCtsyDispatcherCallback,CGlobalPhonemanager* aGloblePhone); |
|
91 |
|
92 // From MIsDispatchInterfaceSupported |
|
93 virtual TBool IsInterfaceSupported(TLtsyDispatchInterfaceApiId aDispatchApiId); |
|
94 void IsCallbackIndicatorSupported(TLtsyDispatchIndIdGroup aIdGroup, TUint32& aIndIdBitMask); |
|
95 |
|
96 |
|
97 |
|
98 // From MLtsyDispatchPacketServicesPacketAttach //finished |
|
99 virtual TInt HandlePacketAttachReqL(); |
|
100 |
|
101 // From MLtsyDispatchPacketServicesGetPacketAttachMode //Nosupport |
|
102 virtual TInt HandleGetPacketAttachModeReqL(); |
|
103 |
|
104 // From MLtsyDispatchPacketServicesGetPacketNetworkRegistrationStatus //finished |
|
105 virtual TInt HandleGetPacketNetworkRegistrationStatusReqL(); |
|
106 |
|
107 // From MLtsyDispatchPacketServicesPacketDetach //finished |
|
108 virtual TInt HandlePacketDetachReqL(); |
|
109 |
|
110 // From MLtsyDispatchPacketServicesSetPdpContextConfig //implementing |
|
111 virtual TInt HandleSetPdpContextConfigReqL(const TDesC& aContextId, |
|
112 const TDesC8& aAccessPointName, |
|
113 const RPacketContext::TProtocolType aPdpType, |
|
114 const TDesC8& aPdpAddress, |
|
115 const TDesC8& aPcoBuffer); |
|
116 |
|
117 // From MLtsyDispatchPacketServicesModifyActivePdpContext |
|
118 virtual TInt HandleModifyActivePdpContextReqL(const TDesC& aContextName); |
|
119 |
|
120 // From MLtsyDispatchPacketServicesInitialisePdpContext //implementing |
|
121 virtual TInt HandleInitialisePdpContextReqL(const TDesC& aPrimaryContextName, const TDesC& aSecondaryContextName); |
|
122 |
|
123 // From MLtsyDispatchPacketServicesDeletePdpContext |
|
124 virtual TInt HandleDeletePdpContextReqL(const TDesC& aContextName); |
|
125 |
|
126 // From MLtsyDispatchPacketServicesSetPacketAttachMode |
|
127 virtual TInt HandleSetPacketAttachModeReqL(RPacketService::TAttachMode aAttachMode); |
|
128 |
|
129 // From MLtsyDispatchPacketServicesNotifyPacketStatusChange |
|
130 virtual TInt HandleNotifyPacketStatusChangeReqL(); |
|
131 |
|
132 // From MLtsyDispatchPacketServicesSetDefaultPdpGprsContextParams |
|
133 virtual TInt HandleSetDefaultPdpContextGprsParamsReqL(const RPacketContext::TContextConfigGPRS& aContextConfigGprs); |
|
134 |
|
135 // From MLtsyDispatchPacketServicesSetDefaultPdpR99R4ContextParams |
|
136 virtual TInt HandleSetDefaultPdpContextR99R4ParamsReqL(const RPacketContext::TContextConfigR99_R4& aContextConfigR99R4); |
|
137 |
|
138 // From MLtsyDispatchPacketServicesActivatePdpContext |
|
139 virtual TInt HandleActivatePdpContextReqL(const TDesC& aContextName); |
|
140 |
|
141 // From MLtsyDispatchPacketServicesSetPdpContextQosGprs |
|
142 virtual TInt HandleSetPdpContextQosGprsReqL(const TDesC& aContextName, const RPacketQoS::TQoSGPRSRequested& aQoSConfig); |
|
143 |
|
144 // From MLtsyDispatchPacketServicesSetPdpContextQosGprs |
|
145 virtual TInt HandleSetPdpContextQosR99R4ReqL(const TDesC& aContextName, const RPacketQoS::TQoSR99_R4Requested& aQoSConfig); |
|
146 |
|
147 // From MLtsyDispatchPacketServicesSetPdpContextQosGprs |
|
148 virtual TInt HandleSetPdpContextQosR5ReqL(const TDesC& aContextName, const RPacketQoS::TQoSR5Requested& aQoSConfig); |
|
149 |
|
150 // From MLtsyDispatchPacketServicesRejectNetworkInitiatedContextActivationRequest |
|
151 virtual TInt HandleRejectNetworkInitiatedContextActivationRequestReqL(); |
|
152 |
|
153 // From MLtsyDispatchPacketServicesDeactivatePdpContext |
|
154 virtual TInt HandleDeactivatePdpContextReqL(const TDesC& aContextName); |
|
155 |
|
156 // From MLtsyDispatchPacketServicesAddPacketFilter |
|
157 virtual TInt HandleAddPacketFilterSyncL(const TDesC& aContextName, CArrayFixFlat<RPacketContext::TPacketFilterV2>& aContextFilter); |
|
158 |
|
159 // From MLtsyDispatchPacketServicesGetStatus |
|
160 virtual TInt HandleGetStatusReqL(); |
|
161 |
|
162 // From MLtsyDispatchPacketServicesRemovePacketFilter |
|
163 virtual TInt HandleRemovePacketFilterSyncL(const TDesC& aContextName, TInt aFilterId); |
|
164 |
|
165 |
|
166 // From MLtsyDispatchPacketServicesGetStaticCapabilities |
|
167 virtual TInt HandleGetStaticCapabilitiesReqL(); |
|
168 |
|
169 // From MLtsyDispatchPacketServicesGetMaxNoMonitoredServiceLists |
|
170 virtual TInt HandleGetMaxNoMonitoredServiceListsReqL(); |
|
171 |
|
172 // From MLtsyDispatchPacketServicesGetMaxNoActiveServices |
|
173 virtual TInt HandleGetMaxNoActiveServicesReqL(); |
|
174 |
|
175 // From MLtsyDispatchPacketServicesInitialiseMbmsContext |
|
176 virtual TInt HandleInitialiseMbmsContextReqL(const TDesC& aContextName); |
|
177 |
|
178 // From MLtsyDispatchPacketServicesGetMbmsNetworkServiceStatus |
|
179 virtual TInt HandleGetMbmsNetworkServiceStatusReqL(TBool aAttemptAttach); |
|
180 |
|
181 // From MLtsyDispatchPacketServicesUpdateMbmsMonitorServiceList |
|
182 virtual TInt HandleUpdateMbmsMonitorServiceListsReqL(TMbmsAction aAction, const CPcktMbmsMonitoredServiceList& aServiceList, const CPcktMbmsMonitoredServiceList& aChangeList); |
|
183 |
|
184 // From MLtsyDispatchPacketServicesUpdateMbmsSessionList |
|
185 virtual TInt HandleUpdateMbmsSessionListReqL(const TDesC& aContextName, TMbmsAction aAction, TMbmsSessionId aSessionId, const TMbmsSessionIdList& aServiceList); |
|
186 |
|
187 |
|
188 |
|
189 |
|
190 TDes* NameOfLastAddedContext(); |
|
191 TInt MaxNumberOfContexts(); |
|
192 TInt GetContext(const TDesC& aName); |
|
193 |
|
194 private: |
|
195 |
|
196 |
|
197 CLtsyPacketServicesHandler(CCtsyDispatcherCallback& aCtsyDispatcherCallback,CGlobalPhonemanager* aGloblePhone); |
|
198 void ConstructL(); |
|
199 |
|
200 |
|
201 TInt GenerateNewContextCid(const TDesC& aName); |
|
202 void SetDefaultContextConfigGPRS(const RPacketContext::TContextConfigGPRS* aContextConfigGPRS); |
|
203 //void ContextConfigGPRS(RPacketContext::TContextConfigGPRS* aContextConfigGPRS); |
|
204 |
|
205 private: |
|
206 |
|
207 // Not owned |
|
208 |
|
209 /** |
|
210 * Callback object in the CTSY Dispatcher. |
|
211 * |
|
212 * Used to complete a request back to the CTSY Dispatcher. |
|
213 */ |
|
214 CCtsyDispatcherCallback& iCtsyDispatcherCallback; |
|
215 CGlobalPhonemanager* iGloblePhone; |
|
216 CAsyncHelperRequest* iAsyncHelperRequest; |
|
217 CATGprsNtwkRegStatusChange* iNtwkRegStatusChange; |
|
218 CInitialisePdpContext* iInitialisePdpContext; |
|
219 |
|
220 RPacketContext::TContextConfigGPRS iDefContextConfigGPRS; |
|
221 }; // class CLtsyPacketServicesHandler |
|
222 |
|
223 #endif // __CLTSYDISPATCHPACKETSERVICESHANDLER_H_ |
|
224 |