24
|
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 |
// ETel Multimode Packet Data API
|
|
15 |
// MBMS Broadcast,GPRS Rel97/98, CDMAOne, CDMA2000, Release 99 and Release 4.
|
|
16 |
//
|
|
17 |
//
|
|
18 |
|
|
19 |
/**
|
|
20 |
@file
|
|
21 |
@internalAll
|
|
22 |
*/
|
|
23 |
|
|
24 |
#if !defined(__PCKTPTR_H__)
|
|
25 |
#define __PCKTPTR_H__
|
|
26 |
|
|
27 |
#if !defined(__ETELPCKT_H__)
|
|
28 |
#include "etelpckt.h"
|
|
29 |
#endif
|
|
30 |
|
|
31 |
|
|
32 |
class CEtelPacketPtrHolder : public CBase
|
|
33 |
/**
|
|
34 |
Holder class.
|
|
35 |
Non-descriptor parameters in API methods will be copied into a
|
|
36 |
descriptor and held in a descriptor array iPtrArray.
|
|
37 |
This class type also stores copies of API parameters that are passed in by value as opposed
|
|
38 |
to by reference. This keeps the size of the R-classes constant as the API evolves, thus
|
|
39 |
maintaining Binary Compatibility (BC).
|
|
40 |
@internalAll
|
|
41 |
*/
|
|
42 |
{
|
|
43 |
public:
|
|
44 |
virtual ~CEtelPacketPtrHolder();
|
|
45 |
|
|
46 |
// The ptr holder slot numbers used by RPacketService asynchronous requests
|
|
47 |
enum TPacketPtrHolderSlots
|
|
48 |
{
|
|
49 |
ESlotPacketStatus=0,
|
|
50 |
ESlotRegStatus,
|
|
51 |
ESlotGetNtwkReg,
|
|
52 |
ESlotProtocolType,
|
|
53 |
ESlotPpdAddress,
|
|
54 |
ESlotNrcaApn,
|
|
55 |
ESlotDynamicCaps,
|
|
56 |
ESlotEnumerateCount,
|
|
57 |
ESlotEnumerateMaxCount,
|
|
58 |
ESlotContextInfoIndex,
|
|
59 |
ESlotContextInfo,
|
|
60 |
ESlotSetMsClass,
|
|
61 |
ESlotNtfMsClass,
|
|
62 |
ESlotCurrentMsClass,
|
|
63 |
ESlotMaxMsClass,
|
|
64 |
ESlotSetPrefBearer,
|
|
65 |
ESlotSetAttachMode,
|
|
66 |
ESlotGetAttachMode,
|
|
67 |
ESlotGetCurrentReleaseMode,
|
|
68 |
ESlotNotifyModeChange,
|
|
69 |
ESlotEnumerateNifs,
|
|
70 |
ESlotGetNifInfo,
|
|
71 |
ESlotEnumerateContextsInNif,
|
|
72 |
ESlotGetContextNameInNif,
|
|
73 |
ESlotNotifyAttachModeChange,
|
|
74 |
ESlotGetPrefBearer,
|
|
75 |
ESlotGetMbmsNetworkServiceStatus,
|
|
76 |
ESlotGetMbmsNetworkServiceStatus2,
|
|
77 |
ESlotNotifyMbmsNetworkServiceStatusChange,
|
|
78 |
ESlotEnumerateMbmsMonitorCount,
|
|
79 |
ESlotEnumerateMbmsMonitorMaxCount,
|
|
80 |
ESlotEnumerateMbmsActiveCount,
|
|
81 |
ESlotEnumerateMbmsActiveMaxCount,
|
|
82 |
EMaxNumPacketPtrSlots
|
|
83 |
};
|
|
84 |
|
|
85 |
// The ptrC holder slot numbers used by RPacketService asynchronous requests
|
|
86 |
enum TPacketPtrCHolderSlots
|
|
87 |
{
|
|
88 |
ESlotUpdateMbmsMonitorServiceListL=0,
|
|
89 |
EMaxNumPacketPtrCSlots
|
|
90 |
};
|
|
91 |
|
|
92 |
// The ptr holder slot numbers used by RPacketContext asynchronous requests
|
|
93 |
enum TPacketContextPtrHolderSlots
|
|
94 |
{
|
|
95 |
ESlotDataPort=0,
|
|
96 |
ESlotContextStatus,
|
|
97 |
ESlotDataVolume,
|
|
98 |
ESlotGranularity,
|
|
99 |
ESlotGetSpeed,
|
|
100 |
ESlotNotifySpeed,
|
|
101 |
ESlotGetDataVolumeTransferred,
|
|
102 |
ESlotEnumeratePacketFilters,
|
|
103 |
ESlotGetPacketFilterInfo,
|
|
104 |
ESlotRemovePacketFilter,
|
|
105 |
ESlotCreateTFT,
|
|
106 |
ESlotRemoveMediaAuthorization,
|
|
107 |
EMaxNumPacketContextPtrSlots
|
|
108 |
};
|
|
109 |
|
|
110 |
// The ptrC holder slot numbers used by RPacketMbmsContext asynchronous requests
|
|
111 |
enum TPacketMbmsContextPtrCHolderSlots
|
|
112 |
{
|
|
113 |
ESlotUpdateMbmsSessionList=0,
|
|
114 |
ESlotUpdateMbmsSessionList2,
|
|
115 |
EMaxNumPacketContextPtrCSlots
|
|
116 |
};
|
|
117 |
|
|
118 |
// The ptr holder slot numbers used by RPacketQoS asynchronous requests
|
|
119 |
enum TPacketQoSPtrHolderSlots
|
|
120 |
{
|
|
121 |
EMaxNumPacketQoSPtrSlots
|
|
122 |
};
|
|
123 |
|
|
124 |
// The ptrC holder slot numbers used by RPacketQoS asynchronous requests
|
|
125 |
enum TPacketQoSPtrCHolderSlots
|
|
126 |
{
|
|
127 |
EMaxNumPacketQoSPtrCSlots
|
|
128 |
};
|
|
129 |
|
|
130 |
public:
|
|
131 |
template <typename T> inline TPtr8& Set(TInt aSlot,T& aObject)
|
|
132 |
{
|
|
133 |
TPtr8& ptr=Ptr(aSlot);
|
|
134 |
ptr.Set(reinterpret_cast<TText8*>(&aObject),sizeof(T),sizeof(T));
|
|
135 |
return ptr;
|
|
136 |
};
|
|
137 |
|
|
138 |
template <typename T> inline TPtrC8& SetC(TInt aSlot, const T& aObject)
|
|
139 |
{
|
|
140 |
TPtrC8& ptr=PtrC(aSlot);
|
|
141 |
ptr.Set(REINTERPRET_CAST(const TText8*,(&aObject)),sizeof(T));
|
|
142 |
return ptr;
|
|
143 |
};
|
|
144 |
|
|
145 |
protected:
|
|
146 |
virtual void ConstructL(const TInt aSizeOfPtrArray,TInt aSizeOfPtrCArray);
|
|
147 |
CEtelPacketPtrHolder();
|
|
148 |
private:
|
|
149 |
TPtr8& Ptr(const TInt aIndex);
|
|
150 |
TPtrC8& PtrC(const TInt aIndex);
|
|
151 |
|
|
152 |
protected:
|
|
153 |
RArray<TPtr8> iPtrArray;
|
|
154 |
RArray<TPtrC8> iPtrCArray;
|
|
155 |
};
|
|
156 |
|
|
157 |
|
|
158 |
|
|
159 |
class CPacketQoSPtrHolder : public CEtelPacketPtrHolder
|
|
160 |
/**
|
|
161 |
QoS profile ptr holder class.
|
|
162 |
This class inherits from the CEtelPacketPtrHolder class.
|
|
163 |
Currently, there are no asynch. requests in RPacketQoS that pass argument by value.
|
|
164 |
@internalAll
|
|
165 |
*/
|
|
166 |
{
|
|
167 |
public:
|
|
168 |
static CPacketQoSPtrHolder* NewL(const TInt aSizeOfPtrArray, TInt aSizeOfPtrCArray);
|
|
169 |
~CPacketQoSPtrHolder();
|
|
170 |
protected:
|
|
171 |
CPacketQoSPtrHolder();
|
|
172 |
};
|
|
173 |
|
|
174 |
|
|
175 |
class CPacketContextPtrHolder : public CEtelPacketPtrHolder
|
|
176 |
/**
|
|
177 |
Packet Context ptr holder class.
|
|
178 |
This class inherits from the CEtelPacketPtrHolder class.
|
|
179 |
@internalAll
|
|
180 |
*/
|
|
181 |
{
|
|
182 |
public:
|
|
183 |
static CPacketContextPtrHolder* NewL(const TInt aSizeOfPtrArray, TInt aSizeOfPtrCArray);
|
|
184 |
~CPacketContextPtrHolder();
|
|
185 |
protected:
|
|
186 |
CPacketContextPtrHolder();
|
|
187 |
public:
|
|
188 |
RPacketContext::TNotifyDataTransferredRequest iNotifyDataTransferRequest; //< used in RPacketContext::NotifyDataTransferred
|
|
189 |
TInt iGetPacketFilterInfoIndex; //< used in RPacketContext::GetPacketFilterInfo(*,*,*)
|
|
190 |
TInt iRemovePacketFilterId; //< used in RPacketContext::RemovePacketFilter(*,*)
|
|
191 |
TInt iCreateTFTSize; //< used in RPacketContext::CreateNewTFT
|
|
192 |
HBufC8* iStoreNetworkBuf; //< used in RPacketContext::AddMediaAuthorizationL
|
|
193 |
TPtr8 iStoreNetworkPtr; //< used in RPacketContext::AddMediaAuthorizationL
|
|
194 |
TMbmsAction iMbmsAction; //< used in RPacketContext::UpdateMbmsSessionList
|
|
195 |
TMbmsSessionId iSessionId; //< used in RPacketContext::UpdateMbmsSessionList
|
|
196 |
};
|
|
197 |
|
|
198 |
/**
|
|
199 |
Packet Service ptr holder class.
|
|
200 |
This class inherits from the CEtelPacketPtrHolder class.
|
|
201 |
@internalAll
|
|
202 |
*/
|
|
203 |
class CPacketPtrHolder : public CEtelPacketPtrHolder
|
|
204 |
{
|
|
205 |
public:
|
|
206 |
static CPacketPtrHolder* NewL(const TInt aSizeOfPtrArray, TInt aSizeOfPtrCArray);
|
|
207 |
~CPacketPtrHolder();
|
|
208 |
protected:
|
|
209 |
CPacketPtrHolder();
|
|
210 |
public:
|
|
211 |
TInt iGetContextInfoIndex; //< used in RPacketService::GetContextInfo() async. version
|
|
212 |
RPacketService::TMSClass iMSClass; //< used in RPacketService::SetMSClass() async. version
|
|
213 |
RPacketService::TPreferredBearer iPrefBearer; //< used in RPacketService::SetPreferredBearer() async. version
|
|
214 |
RPacketService::TAttachMode iAttachMode; //< used in RPacketService::SetAttachMode(), async. version
|
|
215 |
TInt iGetNifInfoIndex; //< used in RPacketService::GetNifInfo(*,*,*)
|
|
216 |
RPacketService::TContextNameInNif iGetContextNameInNif; //< used in RPacketService::GetContextNameInNif()
|
|
217 |
CBufBase* iStoreMbmsBuf; //< used in RPacketService::UpdateMbmsMonitorServiceListL
|
|
218 |
TPtr8 iStoreMbmsPtr; //< used in RPacketService::UpdateMbmsMonitorServiceListL
|
|
219 |
TBool iMbmsAttemptAttach; //< used in RPacketService::GetMbmsNetworkServiceStatus
|
|
220 |
TMbmsAction iMbmsAction; //< used in RPacketService::UpdateMbmsMonitorServiceListL
|
|
221 |
};
|
|
222 |
|
|
223 |
#endif
|