|
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 // PDP config change notifier |
|
15 // |
|
16 // |
|
17 |
|
18 /** |
|
19 @file |
|
20 @internalComponent |
|
21 */ |
|
22 |
|
23 #ifndef CPDPCONFIGCHAGENOTIFIER_H |
|
24 #define CPDPCONFIGCHAGENOTIFIER_H |
|
25 |
|
26 #include <e32base.h> |
|
27 #include <etelpckt.h> |
|
28 #include <networking/umtsnifcontrolif.h> |
|
29 |
|
30 #include "eteldrivernmspace.h" |
|
31 #include "ceteldrivernotifier.h" |
|
32 |
|
33 const TInt KScratchContextConfigSize = 1024; |
|
34 |
|
35 /** notifier for packet context config */ |
|
36 class CPdpConfigChangeNotifier : public CEtelDriverNotifier |
|
37 { |
|
38 public: |
|
39 static CPdpConfigChangeNotifier* NewL(TContextId aId, RPacketContext& aPacketContext, CPdpFsmInterface& aPdpFsmInterface); |
|
40 |
|
41 virtual ~CPdpConfigChangeNotifier(); |
|
42 |
|
43 virtual void Start(); |
|
44 |
|
45 protected: |
|
46 virtual void Notify(const TRequestStatus& aStatus); |
|
47 virtual void DoCancel(); |
|
48 |
|
49 private: |
|
50 CPdpConfigChangeNotifier(TContextId aId, RPacketContext& aPacketContext, |
|
51 CPdpFsmInterface& aPdpFsmInterface); |
|
52 void ConstructL(); |
|
53 |
|
54 |
|
55 template<class CONTEXTTYPE> |
|
56 CONTEXTTYPE& GetScratchContextAs() const |
|
57 { |
|
58 __ASSERT_COMPILE(KScratchContextConfigSize >= sizeof(CONTEXTTYPE)); |
|
59 return *const_cast<CONTEXTTYPE*>(reinterpret_cast<const CONTEXTTYPE*>(iScratchContext.Ptr())); |
|
60 } |
|
61 |
|
62 private: |
|
63 /** context id */ |
|
64 TContextId iId; |
|
65 /** underlying packet context */ |
|
66 RPacketContext& iPacketContext; |
|
67 |
|
68 /** packet context config */ |
|
69 mutable RBuf8 iScratchContext; |
|
70 }; |
|
71 |
|
72 |
|
73 class CMbmsPdpConfigChangeNotifier : public CEtelDriverNotifier |
|
74 { |
|
75 public: |
|
76 CMbmsPdpConfigChangeNotifier(TContextId aId, RPacketMbmsContext& aPacketContext, |
|
77 CPdpFsmInterface& aPdpFsmInterface); |
|
78 virtual ~CMbmsPdpConfigChangeNotifier(); |
|
79 |
|
80 virtual void Start(); |
|
81 |
|
82 protected: |
|
83 virtual void Notify(const TRequestStatus& aStatus); |
|
84 virtual void DoCancel(); |
|
85 |
|
86 private: |
|
87 /** context id */ |
|
88 TContextId iId; |
|
89 /** underlying packet context */ |
|
90 RPacketMbmsContext& iMbmsPacketContext; |
|
91 |
|
92 /** packet context config */ |
|
93 RPacketMbmsContext::TContextConfigMbmsV1 iConfigMbms; |
|
94 /** packaged packet context config */ |
|
95 EtelDriver::TContextConfigMbmsV1Pckg iConfigMbmsPckg; |
|
96 }; |
|
97 |
|
98 |
|
99 #endif // CPDPCONFIGCHAGENOTIFIER_H |