|
1 // Copyright (c) 2001-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 #if !defined(__PCKTPTR_H__) |
|
17 #define __PCKTPTR_H__ |
|
18 |
|
19 #if !defined(__ETELPCKT_H__) |
|
20 #include "etelpckt.h" |
|
21 #endif |
|
22 |
|
23 class CEtelPacketPtrHolder : public CBase |
|
24 /** |
|
25 @internalComponent |
|
26 */ |
|
27 { |
|
28 public: |
|
29 static CEtelPacketPtrHolder* NewL(const TInt aSizeOfPtrArray); |
|
30 virtual ~CEtelPacketPtrHolder(); |
|
31 |
|
32 // The ptr holder slot numbers used by RPacketService asynchronous requests |
|
33 enum TPacketPtrHolderSlots |
|
34 { |
|
35 ESlotPacketStatus=0, |
|
36 ESlotRegStatus, |
|
37 ESlotGetNtwkReg, |
|
38 ESlotProtocolType, |
|
39 ESlotPpdAddress, |
|
40 ESlotNrcaApn, |
|
41 ESlotDynamicCaps, |
|
42 ESlotEnumerateCount, |
|
43 ESlotEnumerateMaxCount, |
|
44 ESlotContextInfoIndex, |
|
45 ESlotContextInfo, |
|
46 ESlotSetMsClass, |
|
47 ESlotNtfMsClass, |
|
48 ESlotCurrentMsClass, |
|
49 ESlotMaxMsClass, |
|
50 ESlotSetPrefBearer, |
|
51 EMaxNumPacketPtrSlots |
|
52 }; |
|
53 |
|
54 // The ptr holder slot numbers used by RPacketContext asynchronous requests |
|
55 enum TPacketContextPtrHolderSlots |
|
56 { |
|
57 ESlotDataPort=0, |
|
58 ESlotContextStatus, |
|
59 ESlotDataVolume, |
|
60 ESlotGranularity, |
|
61 ESlotGetSpeed, |
|
62 ESlotNotifySpeed, |
|
63 EMaxNumPacketContextPtrSlots |
|
64 }; |
|
65 |
|
66 // The ptr holder slot numbers used by RPacketQoS asynchronous requests |
|
67 enum TPacketQoSPtrHolderSlots |
|
68 { |
|
69 EMaxNumPacketQoSPtrSlots |
|
70 }; |
|
71 |
|
72 public: |
|
73 template <typename T> inline TPtr8& Set(TInt aSlot,T& aObject) |
|
74 { |
|
75 TPtr8& ptr=Ptr(aSlot); |
|
76 ptr.Set(reinterpret_cast<TText8*>(&aObject),sizeof(T),sizeof(T)); |
|
77 return ptr; |
|
78 } |
|
79 protected: |
|
80 virtual void ConstructL(const TInt aSizeOfPtrArray); |
|
81 CEtelPacketPtrHolder(); |
|
82 private: |
|
83 TPtr8& Ptr(const TInt aIndex); |
|
84 protected: |
|
85 RArray<TPtr8> iPtrArray; |
|
86 }; |
|
87 |
|
88 class CPacketQoSPtrHolder : public CEtelPacketPtrHolder |
|
89 /** |
|
90 CPacketQoSPtrHolder |
|
91 @internalComponent |
|
92 */ |
|
93 { |
|
94 public: |
|
95 static CPacketQoSPtrHolder* NewL(const TInt aSizeOfPtrArray); |
|
96 ~CPacketQoSPtrHolder(); |
|
97 protected: |
|
98 CPacketQoSPtrHolder(); |
|
99 public: |
|
100 // currently there are no asynch. requests in RPacketQoS that pass argument by value |
|
101 }; |
|
102 |
|
103 class CPacketContextPtrHolder : public CEtelPacketPtrHolder |
|
104 /** |
|
105 CPacketContextPtrHolder |
|
106 @internalComponent |
|
107 */ |
|
108 { |
|
109 public: |
|
110 static CPacketContextPtrHolder* NewL(const TInt aSizeOfPtrArray); |
|
111 ~CPacketContextPtrHolder(); |
|
112 protected: |
|
113 CPacketContextPtrHolder(); |
|
114 public: |
|
115 RPacketContext::TNotifyDataTransferredRequest iNotifyDataTransferRequest; // SLOT_GRANULARITY (used in RPacketContext::NotifyDataTransferred) |
|
116 }; |
|
117 |
|
118 class CPacketPtrHolder : public CEtelPacketPtrHolder |
|
119 /** |
|
120 CPacketPtrHolder |
|
121 @internalComponent |
|
122 */ |
|
123 { |
|
124 public: |
|
125 static CPacketPtrHolder* NewL(const TInt aSizeOfPtrArray); |
|
126 ~CPacketPtrHolder(); |
|
127 protected: |
|
128 CPacketPtrHolder(); |
|
129 public: |
|
130 TInt iGetContextInfoIndex; // SLOT_CONTEXT_INFO_INDEX (used in RPacketService::GetContextInfo() async. version) |
|
131 RPacketService::TMSClass iMSClass; // SLOT_SET_MS_CLASS (used in RPacketService::SetMSClass() async. version) |
|
132 RPacketService::TPreferredBearer iPrefBearer; // SLOT_SET_PREF_BEARER (used in RPacketService::SetPreferredBearer() async. version) |
|
133 }; |
|
134 |
|
135 #endif |
|
136 |