epoc32/include/etelpckt.h
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
permissions -rw-r--r--
Final list of Symbian^2 public API header files
williamr@2
     1
// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
williamr@2
     2
// All rights reserved.
williamr@2
     3
// This component and the accompanying materials are made available
williamr@2
     4
// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
williamr@2
     5
// which accompanies this distribution, and is available
williamr@2
     6
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
williamr@2
     7
//
williamr@2
     8
// Initial Contributors:
williamr@2
     9
// Nokia Corporation - initial contribution.
williamr@2
    10
//
williamr@2
    11
// Contributors:
williamr@2
    12
//
williamr@2
    13
// Description:
williamr@2
    14
// ETel Multimode Packet Data API 
williamr@2
    15
// MBMS Broadcast,GPRS Release 97/98, CDMAOne, CDMA2000, Release 99 and Release 4.
williamr@2
    16
// 
williamr@2
    17
//
williamr@2
    18
williamr@2
    19
#if !defined(__ETELPCKT_H__)
williamr@2
    20
#define __ETELPCKT_H__
williamr@2
    21
williamr@2
    22
#include <e32base.h>
williamr@2
    23
#include <s32mem.h>
williamr@2
    24
#include <etel.h>
williamr@2
    25
#include <cdblen.h>
williamr@2
    26
#include <exterror.h>
williamr@2
    27
#include <etelutils.h>
williamr@2
    28
#include <mbmstypes.h>
williamr@2
    29
williamr@2
    30
//
williamr@2
    31
//  Global constants and types
williamr@2
    32
// 
williamr@2
    33
williamr@2
    34
// General
williamr@2
    35
// Passed into RTelServer::IsSupportedByModule()
williamr@2
    36
/**
williamr@2
    37
Unique Packet Data API Identifier for Packet API version 1.0.
williamr@2
    38
williamr@2
    39
@publishedPartner
williamr@2
    40
@released
williamr@2
    41
*/
williamr@2
    42
const TInt KETelExtPcktV1 = 4000;	
williamr@2
    43
/**
williamr@2
    44
Unique Packet Data API Identifier for Packet API version 2.0.
williamr@2
    45
williamr@2
    46
@publishedPartner
williamr@2
    47
@released
williamr@2
    48
*/
williamr@2
    49
williamr@2
    50
const TInt KETelExtPcktV2 = 8000;	 
williamr@2
    51
williamr@2
    52
williamr@2
    53
/**
williamr@2
    54
Unique Packet Data API Identifier for Packet API version 3.0.
williamr@2
    55
aka 3GPP Release 5 support
williamr@2
    56
williamr@2
    57
@publishedPartner
williamr@2
    58
@released
williamr@2
    59
*/
williamr@2
    60
const TInt KETelExtPcktV3 = 12000;	 
williamr@2
    61
 
williamr@2
    62
williamr@2
    63
// GPRS-specific causes for Session Management (Annex I, 3GPP TS 24.008)
williamr@2
    64
/** This cause is sent to the MS if it requests an IMSI attachment for GPRS services, 
williamr@2
    65
but is not allowed to operate GPRS services.  
williamr@2
    66
williamr@2
    67
@publishedPartner
williamr@2
    68
@released
williamr@2
    69
*/
williamr@2
    70
const TInt KErrGprsServicesNotAllowed=KErrGsmMobilityManagementBase-7;
williamr@2
    71
/** This cause is sent to the MS if it requests a combined IMSI attach for GPRS 
williamr@2
    72
and non-GPRS services, but is not allowed to operate either of them. 
williamr@2
    73
williamr@2
    74
@publishedPartner
williamr@2
    75
@released
williamr@2
    76
*/
williamr@2
    77
const TInt KErrGprsAndNonGprsServicesNotAllowed=KErrGsmMobilityManagementBase-8;
williamr@2
    78
/** This cause is sent to the MS when the network cannot derive the MS's identity 
williamr@2
    79
from the P-TMSI in case of an inter-SGSN routing area update.  
williamr@2
    80
williamr@2
    81
@publishedPartner
williamr@2
    82
@released
williamr@2
    83
*/
williamr@2
    84
const TInt KErrGprsMSIdentityCannotBeDerivedByTheNetwork=KErrGsmMobilityManagementBase-9;
williamr@2
    85
/** This cause is sent to the MS either if the network has implicitly detached 
williamr@2
    86
the MS, e.g. some while after the Mobile reachable timer has expired, or if 
williamr@2
    87
the GMM context data relating to the subscription does not exist in the SGSN, 
williamr@2
    88
e.g. because of a SGSN restart.  
williamr@2
    89
williamr@2
    90
@publishedPartner
williamr@2
    91
@released
williamr@2
    92
*/
williamr@2
    93
const TInt KErrGprsMSImplicitlyDetached=KErrGsmMobilityManagementBase-10;
williamr@2
    94
/** This cause is sent to the MS if it requests a combined GPRS attachment or routing 
williamr@2
    95
is updating in a PLMN where the MSC is temporarily not reachable via the GPRS 
williamr@2
    96
part of the GSM network.  
williamr@2
    97
williamr@2
    98
@publishedPartner
williamr@2
    99
@released
williamr@2
   100
*/
williamr@2
   101
const TInt KErrGprsMSCTemporarilyNotReachable=KErrGsmMobilityManagementBase-16;
williamr@2
   102
/** The PDP context is deactivated because of a LLC or SNDCP failure.  
williamr@2
   103
williamr@2
   104
@publishedPartner
williamr@2
   105
@released
williamr@2
   106
*/
williamr@2
   107
const TInt KErrGprsLlcOrSndcpFailure=KErrGsmMobilityManagementBase-25;
williamr@2
   108
/** Insufficient GPRS resources are available for the request to complete successfully.  
williamr@2
   109
williamr@2
   110
@publishedPartner
williamr@2
   111
@released
williamr@2
   112
*/
williamr@2
   113
const TInt KErrGprsInsufficientResources=KErrGsmMobilityManagementBase-26;
williamr@2
   114
/** Access Point Name is either missing from the Activation request or is unknown.  
williamr@2
   115
williamr@2
   116
@publishedPartner
williamr@2
   117
@released
williamr@2
   118
*/
williamr@2
   119
const TInt KErrGprsMissingorUnknownAPN=KErrGsmMobilityManagementBase-27;
williamr@2
   120
/** The PDP address supplied with the Activation request is unknown.  
williamr@2
   121
williamr@2
   122
@publishedPartner
williamr@2
   123
@released
williamr@2
   124
*/
williamr@2
   125
const TInt KErrGprsUnknownPDPAddress=KErrGsmMobilityManagementBase-28;
williamr@2
   126
/** User authentication has failed.  
williamr@2
   127
williamr@2
   128
@publishedPartner
williamr@2
   129
@released
williamr@2
   130
*/
williamr@2
   131
const TInt KErrGprsUserAuthenticationFailure=KErrGsmMobilityManagementBase-29;
williamr@2
   132
/** The GGSN has rejected the activation request for some reason.  
williamr@2
   133
williamr@2
   134
@publishedPartner
williamr@2
   135
@released
williamr@2
   136
*/
williamr@2
   137
const TInt KErrGprsActivationRejectedByGGSN=KErrGsmMobilityManagementBase-30;
williamr@2
   138
/** The activation request has been rejected for an unspecified reason.  
williamr@2
   139
williamr@2
   140
@publishedPartner
williamr@2
   141
@released
williamr@2
   142
*/
williamr@2
   143
const TInt KErrGprsActivationRejected=KErrGsmMobilityManagementBase-31;
williamr@2
   144
/** The requested service is not supported by the PLMN.
williamr@2
   145
williamr@2
   146
@publishedPartner
williamr@2
   147
@released
williamr@2
   148
*/
williamr@2
   149
const TInt KErrGprsServiceOptionNotSupported=KErrGsmMobilityManagementBase-32;
williamr@2
   150
/** There is no active subscription to the requested service.
williamr@2
   151
williamr@2
   152
@publishedPartner
williamr@2
   153
@released
williamr@2
   154
*/
williamr@2
   155
const TInt KErrGprsRequestedServiceOptionNotSubscribed=KErrGsmMobilityManagementBase-33;
williamr@2
   156
/** The service is temporarily out of order.
williamr@2
   157
williamr@2
   158
@publishedPartner
williamr@2
   159
@released
williamr@2
   160
*/
williamr@2
   161
const TInt KErrGprsServiceOptionTemporarilyOutOfOrder=KErrGsmMobilityManagementBase-34;
williamr@2
   162
/** The NSAPI supplied with the activation request is not unique.  
williamr@2
   163
williamr@2
   164
@publishedPartner
williamr@2
   165
@released
williamr@2
   166
*/
williamr@2
   167
const TInt KErrGprsNSAPIAlreadyUsed=KErrGsmMobilityManagementBase-35;
williamr@2
   168
/** The context has been deactivated successfully.  
williamr@2
   169
williamr@2
   170
@publishedPartner
williamr@2
   171
@released
williamr@2
   172
*/
williamr@2
   173
const TInt KErrGprsRegularContextDeactivation=KErrGsmMobilityManagementBase-36;
williamr@2
   174
/** The Quality of Service requested has not been accepted.  
williamr@2
   175
williamr@2
   176
@publishedPartner
williamr@2
   177
@released
williamr@2
   178
*/
williamr@2
   179
const TInt KErrGprsQoSNotAccepted=KErrGsmMobilityManagementBase-37;	
williamr@2
   180
/** The GPRS network is requesting reactivation of a context.  
williamr@2
   181
williamr@2
   182
@publishedPartner
williamr@2
   183
@released
williamr@2
   184
*/
williamr@2
   185
const TInt KErrGprsReactivationRequested=KErrGsmMobilityManagementBase-39;
williamr@2
   186
/** The feature is not supported.  
williamr@2
   187
williamr@2
   188
@publishedPartner
williamr@2
   189
@released
williamr@2
   190
*/
williamr@2
   191
const TInt KErrGprsFeatureNotSupported=KErrGsmMobilityManagementBase-40;
williamr@2
   192
/** There is a semantic error in the TFT operation.
williamr@2
   193
williamr@2
   194
@publishedPartner
williamr@2
   195
@released
williamr@2
   196
*/
williamr@2
   197
const TInt KErrGprsSemanticErrorInTFTOperation=KErrGsmMobilityManagementBase-41;
williamr@2
   198
/** There is a syntactical error in the TFT operation.
williamr@2
   199
williamr@2
   200
@publishedPartner
williamr@2
   201
@released
williamr@2
   202
*/
williamr@2
   203
const TInt KErrGprsSyntacticalErrorInTFTOperation=KErrGsmMobilityManagementBase-42;
williamr@2
   204
/** The PDP context activation request is not active. 
williamr@2
   205
williamr@2
   206
@publishedPartner
williamr@2
   207
@released
williamr@2
   208
*/
williamr@2
   209
const TInt KErrGprsUnknownPDPContext=KErrGsmMobilityManagementBase-43;
williamr@2
   210
/** There is one or more semantic errors in packet filter(s) of the TFT.
williamr@2
   211
 
williamr@2
   212
@publishedPartner
williamr@2
   213
@released
williamr@2
   214
*/
williamr@2
   215
const TInt KErrGprsSemanticErrorsInPacketFilters=KErrGsmMobilityManagementBase-44;
williamr@2
   216
/** There is one or more syntactical errors in packet filter(s) of the TFT.
williamr@2
   217
williamr@2
   218
@publishedPartner
williamr@2
   219
@released
williamr@2
   220
*/
williamr@2
   221
const TInt KErrGprsSyntacticalErrorInPacketFilters=KErrGsmMobilityManagementBase-45;
williamr@2
   222
/** The GPRS network has already activated a PDP context without TFT.
williamr@2
   223
williamr@2
   224
@publishedPartner
williamr@2
   225
@released
williamr@2
   226
*/
williamr@2
   227
const TInt KErrGprsPDPContextWithoutTFTAlreadyActivated=KErrGsmMobilityManagementBase-46;
williamr@2
   228
williamr@2
   229
// UMTS-specific cause values for Call control (Annex H, 3GPP TS 24.008)
williamr@2
   230
/** QoS not available.
williamr@2
   231
williamr@2
   232
@publishedPartner
williamr@2
   233
@released
williamr@2
   234
*/
williamr@2
   235
const TInt KErrUmtsQoSNotAvailable=KErrGsmMobilityManagementBase-49;
williamr@2
   236
williamr@2
   237
/** Maximum number of PDP contexts supported by phone exceeded.  
williamr@2
   238
williamr@2
   239
@publishedPartner
williamr@2
   240
@released
williamr@2
   241
*/
williamr@2
   242
const TInt KErrUmtsMaxNumOfContextExceededByPhone=KErrGsmMobilityManagementBase-50;
williamr@2
   243
/** Maximum number of PDP contexts supported by the network exceeded.  
williamr@2
   244
williamr@2
   245
@publishedPartner
williamr@2
   246
@released
williamr@2
   247
*/
williamr@2
   248
const TInt KErrUmtsMaxNumOfContextExceededByNetwork=KErrGsmMobilityManagementBase-51;
williamr@2
   249
/** Phone is in offline mode.  
williamr@2
   250
williamr@2
   251
@publishedPartner
williamr@2
   252
@released
williamr@2
   253
*/
williamr@2
   254
const TInt KErrGprsOfflineMode=KErrGsmMobilityManagementBase-52;
williamr@2
   255
/** 
williamr@2
   256
 * MBMS network support does not exist.
williamr@2
   257
 * @publishedPartner
williamr@2
   258
 * @released
williamr@2
   259
 */
williamr@2
   260
const TInt KErrMbmsNotSupported=KErrGsmMobilityManagementBase-53;
williamr@2
   261
/**
williamr@2
   262
 * Specific MBMS service is not available.  
williamr@2
   263
 * @publishedPartner
williamr@2
   264
 * @released
williamr@2
   265
 */
williamr@2
   266
const TInt KErrMbmsServiceUnavailable=KErrGsmMobilityManagementBase-54;
williamr@2
   267
/**
williamr@2
   268
 * Preempts low priority MBMS/Non-MBMS service.  
williamr@2
   269
 * @publishedPartner
williamr@2
   270
 * @released
williamr@2
   271
 */
williamr@2
   272
const TInt KErrMbmsServicePreempted=KErrGsmMobilityManagementBase-55;
williamr@2
   273
/**
williamr@2
   274
 * One or more invalid MBMS service entry supplied.  
williamr@2
   275
 * @publishedPartner
williamr@2
   276
 * @released
williamr@2
   277
 */
williamr@2
   278
const TInt KErrMbmsImpreciseServiceEntries=KErrGsmMobilityManagementBase-56;
williamr@2
   279
williamr@2
   280
class TPacketDataConfigBase 
williamr@2
   281
/** Base class for the packet configuration classes.
williamr@2
   282
williamr@2
   283
The Context configuration, QoS profile (Requested and Negotiated) and QoS 
williamr@2
   284
Capabilities classes inherit from this class. It is outside the scope of all 
williamr@2
   285
the Packet data classes. 
williamr@2
   286
williamr@2
   287
To allow future configuration structures (e.g. TContextConfigWCDMA, 
williamr@2
   288
TContextConfigPDC, etc.) to be added in such a way that a completely different 
williamr@2
   289
structure may be defined and passed into the same functions as this one, all 
williamr@2
   290
existing configuration structures are derived from this thin base class 
williamr@2
   291
which provides just one function, ExtensionId(). This function returns the 
williamr@2
   292
one protected member variable, iExtensionId. A new structure would define an 
williamr@2
   293
associated new constant to be set in iExtensionId on construction, which would 
williamr@2
   294
then be queried by the TSY prior to unpackaging the structure. 
williamr@2
   295
williamr@2
   296
@see RPacketContext::TContextConfigCDMA 
williamr@2
   297
@see RPacketContext::TContextConfigR99_R4  
williamr@2
   298
@see RPacketContext::TContextConfig_R5
williamr@2
   299
@see RPacketContext::TContextConfigMbmsV1
williamr@2
   300
williamr@2
   301
@publishedPartner
williamr@2
   302
@released
williamr@2
   303
williamr@2
   304
*/
williamr@2
   305
	{
williamr@2
   306
public:
williamr@2
   307
	/**
williamr@2
   308
	Flags identifying the different packet networks.
williamr@2
   309
	*/
williamr@2
   310
	enum 
williamr@2
   311
		{
williamr@2
   312
		/**
williamr@2
   313
		GPRS Release 97/98 packet network.
williamr@2
   314
		*/
williamr@2
   315
		KConfigGPRS= 0x01,				
williamr@2
   316
		/**
williamr@2
   317
		CDMA and CDMA2000 packet networks.
williamr@2
   318
		*/
williamr@2
   319
		KConfigCDMA = 0x02,		
williamr@2
   320
		/**
williamr@2
   321
		GPRS/UMTS Release 99 and UMTS Release 4 networks.
williamr@2
   322
		*/ 
williamr@2
   323
		KConfigRel99Rel4 = 0x04,
williamr@2
   324
		/**
williamr@2
   325
		UMTS/IMS 3GPP Release 5 networks.
williamr@2
   326
		*/ 
williamr@2
   327
		KConfigRel5 = 0x05,	
williamr@2
   328
		/**
williamr@2
   329
		MBMS networks
williamr@2
   330
		*/
williamr@2
   331
		KConfigMBMS = 0x06		
williamr@2
   332
		};
williamr@2
   333
		
williamr@2
   334
	/** This member returns the type of class.
williamr@2
   335
	
williamr@2
   336
	@return The type of class. */
williamr@2
   337
	inline TInt ExtensionId(){return iExtensionId;};
williamr@2
   338
protected:
williamr@2
   339
	/**
williamr@2
   340
	Defines the type of class: either KConfigGPRS, KConfigCDMA or KConfigRel99Rel4,
williamr@2
   341
	which identifies the type of packet network (GPRS R97/98, CDMA, Release 99 or 4 or 5)
williamr@2
   342
	*/
williamr@2
   343
	TInt iExtensionId;	
williamr@2
   344
	};
williamr@2
   345
williamr@2
   346
class TConnectionInfoBase 
williamr@2
   347
/** Base class for the configuration info classes. It is outside the scope of 
williamr@2
   348
all the Packet data classes. 
williamr@2
   349
williamr@2
   350
To allow future connection information structures (e.g. TConnectionInfoV2, 
williamr@2
   351
TConnectionInfoV3, etc.) to be added and as a result information carried by the 
williamr@2
   352
structure can be increased. All information structures are derived from this 
williamr@2
   353
thin base class which provides just one function, ExtensionId(). This function 
williamr@2
   354
returns the protected member variable, iExtensionId. A new structure would 
williamr@2
   355
define an associated new constant to be set in iExtensionId on construction, 
williamr@2
   356
which would then be queried by the TSY prior to unpackaging the structure. 
williamr@2
   357
williamr@2
   358
@see RPacketContext::TConnectionInfoV1
williamr@2
   359
williamr@2
   360
@publishedPartner
williamr@2
   361
@released
williamr@2
   362
*/
williamr@2
   363
	{
williamr@2
   364
public:
williamr@2
   365
	/**
williamr@2
   366
	Flags identifying the different connection information structures
williamr@2
   367
	*/
williamr@2
   368
	enum 
williamr@2
   369
		{
williamr@2
   370
		/**
williamr@2
   371
		Connection information version 1.
williamr@2
   372
		*/
williamr@2
   373
		KConnectionInfoV1 = 0x01
williamr@2
   374
		};
williamr@2
   375
		
williamr@2
   376
	/** Return the type of class.
williamr@2
   377
	*
williamr@2
   378
	@return The version of class. 
williamr@2
   379
	*/
williamr@2
   380
	inline TInt ExtensionId(){return iExtensionId;};
williamr@2
   381
	
williamr@2
   382
public:
williamr@2
   383
	/** A bit-wise sum of TConnectionInfoFlags indicating which of the optional 
williamr@2
   384
	fields contain valid data. */
williamr@2
   385
    TUint32 iValid;        	
williamr@2
   386
	
williamr@2
   387
protected:
williamr@2
   388
	/** Defines the type of class. */
williamr@2
   389
	TInt iExtensionId;	
williamr@2
   390
	};
williamr@2
   391
williamr@2
   392
class TPacketBase
williamr@2
   393
/** 
williamr@2
   394
Base class for the Packet data ETel API parameters which are version dependent
williamr@2
   395
(version 2 onwards). Note that even though the 7.0 version of the API does not define
williamr@2
   396
version dependent classes, this implementation HAS been employed in the v7.0S version
williamr@2
   397
(V2.0) of the API.
williamr@2
   398
williamr@2
   399
The TPacketBase::ExtensionId() method is used to determine which version of a packaged
williamr@2
   400
parameter has been created. 
williamr@2
   401
Note that the TPacketDataConfigBase::ExtensionId() method returns a packet network 
williamr@2
   402
type.
williamr@2
   403
williamr@2
   404
@publishedPartner
williamr@2
   405
@released
williamr@2
   406
*/
williamr@2
   407
	{
williamr@2
   408
public:
williamr@2
   409
	IMPORT_C TInt ExtensionId() const;
williamr@2
   410
protected:
williamr@2
   411
	TPacketBase();
williamr@2
   412
	TInt iExtensionId;					///< Extension identifier
williamr@2
   413
	};
williamr@2
   414
											   
williamr@2
   415
class TPacketType
williamr@2
   416
/**
williamr@2
   417
Base class for all the V1 parameter types.
williamr@2
   418
williamr@2
   419
@publishedPartner
williamr@2
   420
@released
williamr@2
   421
*/
williamr@2
   422
{
williamr@2
   423
public:
williamr@2
   424
	IMPORT_C TInt ExtensionId() const;
williamr@2
   425
protected:
williamr@2
   426
	TPacketType();
williamr@2
   427
	void InternalizeL(RReadStream& aStream);
williamr@2
   428
	void ExternalizeL(RWriteStream& aStream) const;
williamr@2
   429
protected:
williamr@2
   430
	TInt iExtensionId;
williamr@2
   431
};
williamr@2
   432
	
williamr@2
   433
struct TClientId
williamr@2
   434
/**Holds the session and subsession handles which would be used  
williamr@2
   435
within the 2-phase list retrieval mechanism. During both the phases, 
williamr@2
   436
the client-side API code will pass down the TClientId so that TSY can use
williamr@2
   437
this information to match the first phase of the request to the second phase. */
williamr@2
   438
	{
williamr@2
   439
	/** The handle to the underlying RTelServer session. */
williamr@2
   440
	TInt iSessionHandle;
williamr@2
   441
	/** The handle to the sub-session to which this API request relates. */
williamr@2
   442
	TInt iSubSessionHandle;
williamr@2
   443
	};	
williamr@2
   444
		
williamr@2
   445
class RPacketService;
williamr@2
   446
class CPacketContextPtrHolder;
williamr@2
   447
class RPacketContext : public RTelSubSessionBase
williamr@2
   448
/** Defines the context and the configuration of a connection to the network's 
williamr@2
   449
packet-switched service. 
williamr@2
   450
williamr@2
   451
The functionality associated with the context of a packet-switched connection 
williamr@2
   452
(configuring, modifying, activating, etc) are encapsulated within this class.
williamr@2
   453
williamr@2
   454
Each instance of this class has an RPacketService parent, to which it belongs.
williamr@2
   455
williamr@2
   456
@publishedPartner
williamr@2
   457
@released
williamr@2
   458
*/
williamr@2
   459
	{
williamr@2
   460
public:
williamr@2
   461
	IMPORT_C RPacketContext();
williamr@2
   462
	IMPORT_C TInt OpenNewContext(RPacketService& aPacketNetwork, TDes& aContextName);	
williamr@2
   463
	IMPORT_C TInt OpenExistingContext(RPacketService& aPacketNetwork,const TDesC& aContextName);	
williamr@2
   464
	IMPORT_C void Close();
williamr@2
   465
// 
williamr@2
   466
//	Nested classes dealing with context configurations for each network type
williamr@2
   467
//
williamr@2
   468
	enum {KGSNNameLength = 252};	// 3GPP TS 24.008, section 10.5.6.1 gives a range of 3 - 102 octets for the APN. 252 has been chosen as an adequate value for practical purposes.
williamr@2
   469
	enum {KMaxPDPAddressLength = KCommsDbSvrMaxFieldLength}; 
williamr@2
   470
	enum 
williamr@2
   471
		{
williamr@2
   472
		KPdpDataCompression		= 0x01,
williamr@2
   473
		KPdpHeaderCompression	= 0x02
williamr@2
   474
		};
williamr@2
   475
williamr@2
   476
/** Buffer to hold the GSN address.
williamr@2
   477
williamr@2
   478
@see KGSNNameLength */
williamr@2
   479
	typedef TBuf8<KGSNNameLength> TGSNAddress;				///< GPRS Support Node (GSN) name
williamr@2
   480
/** Buffer to hold the protocol address.
williamr@2
   481
williamr@2
   482
@see KMaxPDPAddressLength */
williamr@2
   483
	typedef TBuf8<KMaxPDPAddressLength> TProtocolAddress;	///< GPRS Rel97/98, CDMA, Rel99 and Rel4.
williamr@2
   484
williamr@2
   485
	//
williamr@2
   486
	// TProtocolType - defines the protocol used to connect to the packet data gateway
williamr@2
   487
	// 
williamr@2
   488
/** Defines the protocol used to connect to the packet data gateway.
williamr@2
   489
williamr@2
   490
Modes: GRPS */
williamr@2
   491
	enum TProtocolType
williamr@2
   492
		{
williamr@2
   493
	/** IPv4 type gateway.
williamr@2
   494
	
williamr@2
   495
	Modes: GRPS */
williamr@2
   496
		EPdpTypeIPv4,	
williamr@2
   497
	/** IPv6 type gateway.
williamr@2
   498
	
williamr@2
   499
	Modes: GPRS */
williamr@2
   500
		EPdpTypeIPv6,	
williamr@2
   501
	/** X.25 type gateway.
williamr@2
   502
	
williamr@2
   503
	Modes: GPRS */
williamr@2
   504
		EPdpTypeX25,	
williamr@2
   505
	/** PPP type gateway.
williamr@2
   506
	
williamr@2
   507
	Modes: GRPS, CDMA */
williamr@2
   508
		EPdpTypePPP,	
williamr@2
   509
	/** CDPD type gateway.
williamr@2
   510
	
williamr@2
   511
	Modes: CDMA */
williamr@2
   512
		EPdpTypeCDPD
williamr@2
   513
		};
williamr@2
   514
williamr@2
   515
	//
williamr@2
   516
	// TServiceOption - service option numbers are CDMA specific and used in the API to 
williamr@2
   517
	// identify the various packet data services available on the CDMA packet network.
williamr@2
   518
	// 
williamr@2
   519
/** Service option numbers identify the various packet data services available 
williamr@2
   520
on the CDMA packet network.
williamr@2
   521
williamr@2
   522
Modes: CDMA */
williamr@2
   523
	enum TServiceOption
williamr@2
   524
		{
williamr@2
   525
	/** Service Options 7 and 15, 8-16. */
williamr@2
   526
		KLowSpeedData		   = 0x01,	
williamr@2
   527
	/** Service Options 22-25 IP and 26-29 CDPD. */
williamr@2
   528
		KHighSpeedData	 	   = 0x02,	
williamr@2
   529
	/** Service Option 33 on CDMA2000 network only. */
williamr@2
   530
		KHighSpeedCDMA2000Data = 0x04	
williamr@2
   531
		};
williamr@2
   532
williamr@2
   533
	/** Anonymous access required.
williamr@2
   534
williamr@2
   535
	Modes: GRPS, CDMA */
williamr@2
   536
	enum TAnonymousAccess
williamr@2
   537
		{
williamr@2
   538
	/** Anonymous access not applicable.
williamr@2
   539
	
williamr@2
   540
	Modes: GRPS, CDMA */
williamr@2
   541
		ENotApplicable,
williamr@2
   542
	/** Anonymous access required.
williamr@2
   543
	
williamr@2
   544
	Modes: GRPS */
williamr@2
   545
		ERequired,		
williamr@2
   546
	/** Anonymous access not required.
williamr@2
   547
	
williamr@2
   548
	Modes: GPRS */
williamr@2
   549
		ENotRequired	
williamr@2
   550
		};
williamr@2
   551
williamr@2
   552
	enum { KMaxAuthDataLength = 50 };
williamr@2
   553
	/** Buffer for various sorts of authorisation data since version 2 of the API.
williamr@2
   554
	
williamr@2
   555
	Supported from v7.0S.
williamr@2
   556
	*/
williamr@2
   557
	typedef TBuf8<KMaxAuthDataLength> TAuthData;
williamr@2
   558
williamr@2
   559
	//
williamr@2
   560
	// TAuthProtocol - this enables the client to set the protocol type used on the context
williamr@2
   561
	// 
williamr@2
   562
	enum TAuthProtocol
williamr@2
   563
        {
williamr@2
   564
        EProtocolNone,
williamr@2
   565
        EProtocolPAP,
williamr@2
   566
        EProtocolCHAP
williamr@2
   567
        };
williamr@2
   568
williamr@2
   569
	//
williamr@2
   570
	// TAuthInfo - this enables the client to set the authentication data used on the context
williamr@2
   571
	//
williamr@2
   572
	struct TAuthInfo
williamr@2
   573
		{
williamr@2
   574
		TAuthProtocol iProtocol;
williamr@2
   575
        TAuthData iUsername;
williamr@2
   576
        TAuthData iPassword;
williamr@2
   577
		};
williamr@2
   578
williamr@2
   579
	//
williamr@2
   580
	// TDnsInfoV2 - this class enables the client to set the primary and secondary DNS server
williamr@2
   581
	// names used on the context 
williamr@2
   582
	//
williamr@2
   583
	class TDnsInfoV2 : public TPacketBase
williamr@2
   584
	/**
williamr@2
   585
	Enables the client to set the primary and secondary DNS server
williamr@2
   586
	names used on the context since version 2 of the API.
williamr@2
   587
	
williamr@2
   588
	Supported from v7.0S.
williamr@2
   589
williamr@2
   590
	@publishedPartner
williamr@2
   591
	@released
williamr@2
   592
	*/
williamr@2
   593
		{
williamr@2
   594
	public:
williamr@2
   595
		IMPORT_C TDnsInfoV2();
williamr@2
   596
	public:
williamr@2
   597
		/** Primary DNS server name.*/
williamr@2
   598
		TProtocolAddress iPrimaryDns;
williamr@2
   599
		/** Secondary DNS server name.*/
williamr@2
   600
		TProtocolAddress iSecondaryDns;
williamr@2
   601
		};
williamr@2
   602
	/**
williamr@2
   603
	DNS information package since version 2 of the API.
williamr@2
   604
	
williamr@2
   605
	Supported from v7.0S.
williamr@2
   606
	*/
williamr@2
   607
	typedef TPckg<TDnsInfoV2> TTDnsInfoV2Pckg;
williamr@2
   608
williamr@2
   609
	//
williamr@2
   610
	//  - this buffer can be used to store protocol related data
williamr@2
   611
	// (such as "PPP config options") which do not fit into the other fields of the
williamr@2
   612
	// TProtocolConfigOptionV2 class (see below).  The length of the buffer is based on
williamr@2
   613
	// the previous buffer used (before TProtocolConfigOptionV2 was implemented), which 
williamr@2
   614
	// was based on 3GPP TS 24.008 (253 octets).
williamr@2
   615
	//
williamr@2
   616
	enum {KMiscProtocolBufferLength = 253};
williamr@2
   617
	typedef TBuf8<KMiscProtocolBufferLength> TMiscProtocolBuffer;
williamr@2
   618
		
williamr@2
   619
	class TProtocolConfigOptionV2 : public TPacketBase
williamr@2
   620
	/**
williamr@2
   621
	Holds authentication data encapsulated in TAuthInfo, as 
williamr@2
   622
	well as further data that may be required for CHAP protocol 
williamr@2
   623
	authentication, such a challenge and response, since version
williamr@2
   624
	2 of the API.
williamr@2
   625
	
williamr@2
   626
	Can contain the DNS server names, the username, password, 
williamr@2
   627
	and CHAP associated data.
williamr@2
   628
williamr@2
   629
	Normal authentication uses only TAuthInfo::iUsername and 
williamr@2
   630
	TAuthInfo::iPassword. The other parameters are for secure 
williamr@2
   631
	authentication. 
williamr@2
   632
williamr@2
   633
	The maximum combined length of the TAuthInfo::iUsername 
williamr@2
   634
	and the secure information (iPassword or iResponse) is 50 bytes.
williamr@2
   635
	
williamr@2
   636
	Rather than keep the Protocol Config Option as a buffer it 
williamr@2
   637
	is encapsulated as a class. This enables data extraction to 
williamr@2
   638
	occur easily.
williamr@2
   639
	
williamr@2
   640
	Supported from v7.0S. 
williamr@2
   641
williamr@2
   642
	@publishedPartner
williamr@2
   643
	@released
williamr@2
   644
	*/
williamr@2
   645
		{
williamr@2
   646
	public:
williamr@2
   647
		IMPORT_C TProtocolConfigOptionV2();
williamr@2
   648
	public:
williamr@2
   649
		/** Authentication data.*/
williamr@2
   650
		TAuthInfo iAuthInfo;
williamr@2
   651
		/** The pseudorandom data that is chosen by the client.*/
williamr@2
   652
		TAuthData iChallenge;
williamr@2
   653
		/** Calculated by the client with the MD5 algorithm using 
williamr@2
   654
		iChallenge, iId and iPassword.*/
williamr@2
   655
		TAuthData iResponse;
williamr@2
   656
		/** A one byte identifier that is chosen by the client.*/
williamr@2
   657
		TUint8 iId;
williamr@2
   658
		/** Primary and secondary DNS server names since version 2 
williamr@2
   659
		of the API.*/
williamr@2
   660
		TDnsInfoV2 iDnsAddresses;
williamr@2
   661
		TMiscProtocolBuffer iMiscBuffer;
williamr@2
   662
		};
williamr@2
   663
		
williamr@2
   664
	
williamr@2
   665
	class TContextConfigGPRS : public TPacketDataConfigBase
williamr@2
   666
	/**
williamr@2
   667
	Context configurations for GPRS packet data support. 
williamr@2
   668
	
williamr@2
   669
	Contains all the data necessary to configure a context on a GPRS network or 
williamr@2
   670
	UMTS packet network.
williamr@2
   671
williamr@2
   672
	@publishedPartner
williamr@2
   673
	@released
williamr@2
   674
	*/
williamr@2
   675
		{
williamr@2
   676
	public:
williamr@2
   677
		IMPORT_C TContextConfigGPRS();
williamr@2
   678
	public:
williamr@2
   679
		/** The GPRS protocol type. The default value is EpdpTypeIPv4.
williamr@2
   680
	
williamr@2
   681
		@see TProtocolType */
williamr@2
   682
		TProtocolType iPdpType;
williamr@2
   683
		/** The GPRS Access point name. The default value is an empty string.
williamr@2
   684
	
williamr@2
   685
		@see TGSNAddress */
williamr@2
   686
		TGSNAddress iAccessPointName;
williamr@2
   687
		/** The GPRS protocol address. The default value is an empty string.
williamr@2
   688
	
williamr@2
   689
		@see TProtocolAddress */
williamr@2
   690
		TProtocolAddress iPdpAddress;		
williamr@2
   691
		/** The GRPS compression. This is a bit-wise sum of the wanted compression. The 
williamr@2
   692
		default value is 0.
williamr@2
   693
	
williamr@2
   694
		@see KPdpDataCompression
williamr@2
   695
		@see KPdpHeaderCompression */
williamr@2
   696
		TUint iPdpCompression;
williamr@2
   697
		/** Anonymous access requested. The default value is ENotRequired.
williamr@2
   698
	
williamr@2
   699
		@see TAnonymousAccess */
williamr@2
   700
		TAnonymousAccess iAnonymousAccessReqd;
williamr@2
   701
		/** Use Edge. The default value is EFalse. True for EGPRS.*/
williamr@2
   702
		TBool iUseEdge; // 
williamr@2
   703
		/** Protocol configuration options for version 2 of the API.
williamr@2
   704
		
williamr@2
   705
		Supported from v7.0S.*/
williamr@2
   706
		TProtocolConfigOptionV2 iProtocolConfigOption;
williamr@2
   707
		/** Network initiated context indication. */
williamr@2
   708
		TBool iNWIContext;
williamr@2
   709
		};
williamr@2
   710
	
williamr@2
   711
  	
williamr@2
   712
   	/**
williamr@2
   713
	Identifiers for Packet Flow Context.  See Table 10.5.161/3GPP TS 24.008.
williamr@2
   714
   	*/
williamr@2
   715
   	enum TPacketFlowIdentifier
williamr@2
   716
   		{
williamr@2
   717
   		/**
williamr@2
   718
   		Best Effort
williamr@2
   719
   		*/
williamr@2
   720
   		EBestEffort,
williamr@2
   721
		/**
williamr@2
   722
		Signalling
williamr@2
   723
		*/
williamr@2
   724
		ESignalling,
williamr@2
   725
		/**
williamr@2
   726
		Sms
williamr@2
   727
		*/
williamr@2
   728
   		ESms
williamr@2
   729
   		};
williamr@2
   730
   		
williamr@2
   731
  	class TContextConfigR99_R4 : public TPacketDataConfigBase
williamr@2
   732
	/**
williamr@2
   733
	Enables Release 99 and Release 4 context configuration for version 2 of 
williamr@2
   734
  	the API.
williamr@2
   735
  	
williamr@2
   736
  	Contains all the data necessary to configure a context on a R99/R4 packet 
williamr@2
   737
  	network. 
williamr@2
   738
  	
williamr@2
   739
  	Supported from v7.0S.
williamr@2
   740
williamr@2
   741
	@publishedPartner
williamr@2
   742
	@released
williamr@2
   743
  	*/
williamr@2
   744
  		{
williamr@2
   745
  	public:
williamr@2
   746
  		IMPORT_C TContextConfigR99_R4();
williamr@2
   747
  	public:
williamr@2
   748
  		/** The Rel99/Rel4 protocol type. The default value is EpdpTypeIPv4.*/
williamr@2
   749
  		TProtocolType iPdpType;
williamr@2
   750
  		/** The Rel99/Rel4 access point name. The default is an empty string.*/
williamr@2
   751
  		TGSNAddress iAccessPointName;
williamr@2
   752
  		/** The Rel99/Rel4 protocol address. The default value is an empty string.*/
williamr@2
   753
  		TProtocolAddress iPdpAddress;		
williamr@2
   754
  		/** Use Edge. The default is EFalse. True for EGPRS.*/
williamr@2
   755
   		TBool iUseEdge; 
williamr@2
   756
   		/** Protocol configuration options.*/
williamr@2
   757
		TProtocolConfigOptionV2 iProtocolConfigOption;
williamr@2
   758
		TBool iNWIContext; // Network initiated context indication.
williamr@2
   759
		TPacketFlowIdentifier iPFI; // Packet Flow indicator.
williamr@2
   760
		};
williamr@2
   761
williamr@2
   762
	class TContextConfigCDMA : public TPacketDataConfigBase
williamr@2
   763
	/**
williamr@2
   764
	Enables context configurations for CDMA and CDMA2000 packet data 
williamr@2
   765
	and high speed packet data support. 
williamr@2
   766
	
williamr@2
   767
	Contains all the data necessary to configure a context on a CDMA packet 
williamr@2
   768
	network.
williamr@2
   769
williamr@2
   770
	@publishedPartner
williamr@2
   771
	@released
williamr@2
   772
	*/
williamr@2
   773
		{
williamr@2
   774
	public:
williamr@2
   775
		IMPORT_C TContextConfigCDMA();
williamr@2
   776
	public:
williamr@2
   777
	/** Identifies the CDMA packet service option range (Low, High, High CDMA2000). 
williamr@2
   778
	The default value is KLowSpeedData.
williamr@2
   779
	
williamr@2
   780
	@see TServiceOption */
williamr@2
   781
		TUint			iServiceOption; 
williamr@2
   782
	/** The CDMA protocol type, either PPP or CDPD. The default value is EPdpTypePPP.
williamr@2
   783
	
williamr@2
   784
	@see TProtocolType */
williamr@2
   785
		TProtocolType	iProtocolType;	
williamr@2
   786
		};
williamr@2
   787
williamr@2
   788
	// Configuration-related calls
williamr@2
   789
	IMPORT_C void SetConfig(TRequestStatus& aStatus, const TDesC8& aConfig) const;
williamr@2
   790
	IMPORT_C void GetConfig(TRequestStatus& aStatus, TDes8& aConfig) const;
williamr@2
   791
	IMPORT_C void NotifyConfigChanged(TRequestStatus& aStatus, TDes8& aConfig) const;
williamr@2
   792
	IMPORT_C void Activate(TRequestStatus& aStatus) const;
williamr@2
   793
	IMPORT_C void Deactivate(TRequestStatus& aStatus) const;
williamr@2
   794
	IMPORT_C void Delete(TRequestStatus& aStatus) const;
williamr@2
   795
	IMPORT_C void LoanCommPort(TRequestStatus& aStatus, RCall::TCommPort& aDataPort) const; // Deprecated method.
williamr@2
   796
	IMPORT_C void RecoverCommPort(TRequestStatus& aStatus) const; // Deprecated method.
williamr@2
   797
	IMPORT_C void GetDnsInfo(TRequestStatus& aStatus, TDes8& aDnsInfo) const; 
williamr@2
   798
williamr@2
   799
williamr@2
   800
williamr@2
   801
	enum TContextStatus
williamr@2
   802
		{
williamr@2
   803
	/** Current status is unknown. */
williamr@2
   804
		EStatusUnknown,
williamr@2
   805
	/** Context is not activated. */
williamr@2
   806
		EStatusInactive,
williamr@2
   807
	/** Context is currently being activated. */
williamr@2
   808
		EStatusActivating,
williamr@2
   809
	/** Context is active. */
williamr@2
   810
		EStatusActive,
williamr@2
   811
	/** Context is currently being deactivated. */
williamr@2
   812
		EStatusDeactivating,		
williamr@2
   813
	/** Context is suspended. */
williamr@2
   814
		EStatusSuspended,
williamr@2
   815
	/** Context has been deleted. */
williamr@2
   816
		EStatusDeleted,
williamr@2
   817
	/** Context is currently in data receiving mode.The service transitions 
williamr@2
   818
		to this state when the data transmission starts.This is expected 
williamr@2
   819
		to happen after some time of arrival of SESSION START message from the network.
williamr@2
   820
	    Note : Applicable only to MBMS context */	
williamr@2
   821
		EStatusReceiving
williamr@2
   822
		};
williamr@2
   823
williamr@2
   824
	IMPORT_C TInt GetStatus(TContextStatus& aContextStatus) const;
williamr@2
   825
	IMPORT_C void NotifyStatusChange(TRequestStatus& aStatus,TContextStatus& aContextStatus);
williamr@2
   826
	IMPORT_C TInt GetProfileName(TName& aQoSProfile) const;
williamr@2
   827
williamr@2
   828
	struct TDataVolume 
williamr@2
   829
/** Holds the amount of sent and received data.
williamr@2
   830
williamr@2
   831
The total number of bytes sent is: iOverflowCounterSent*(2^32)+iOverflowCounterSent */
williamr@2
   832
		{
williamr@2
   833
		TUint32 iBytesSent;
williamr@2
   834
	/** Overflow counter for the bytes sent.
williamr@2
   835
	
williamr@2
   836
	The total number of bytes sent is: iOverflowCounterSent*(2^32)+iOverflowCounterSent */
williamr@2
   837
		TUint32 iOverflowCounterSent;
williamr@2
   838
	/** The number of bytes received.
williamr@2
   839
	
williamr@2
   840
	The total number of bytes received is: iOverflowCounterReceived*(2^32)+iOverflowCounterReceived */
williamr@2
   841
		TUint32 iBytesReceived;
williamr@2
   842
	/** Overflow counter for the bytes received.
williamr@2
   843
	
williamr@2
   844
	The total number of bytes received is: iOverflowCounterReceived*(2^32)+iOverflowCounterReceived */
williamr@2
   845
		TUint32 iOverflowCounterReceived;
williamr@2
   846
		};
williamr@2
   847
williamr@2
   848
	struct TNotifyDataTransferredRequest
williamr@2
   849
		{
williamr@2
   850
		TUint iRcvdGranularity;
williamr@2
   851
		TUint iSentGranularity;
williamr@2
   852
		};
williamr@2
   853
williamr@2
   854
    /** 
williamr@2
   855
    Determines which fields in the TConnectionInfoXXX parameter class are valid.
williamr@2
   856
    
williamr@2
   857
    @see TConnectionInfoV1 
williamr@2
   858
    */
williamr@2
   859
	enum TConnectionInfoFlags
williamr@2
   860
		{
williamr@2
   861
    	/** The HSDPA category field is valid in the connection info class.
williamr@2
   862
    	
williamr@2
   863
    	Modes: WCDMA */
williamr@2
   864
		KHSDPACategory		= 0x00000001,
williamr@2
   865
		
williamr@2
   866
    	/** The HSUPA category field is valid in the connection info class.
williamr@2
   867
    	
williamr@2
   868
    	Modes: WCDMA */		
williamr@2
   869
		KHSUPACategory		= 0x00000002
williamr@2
   870
        };
williamr@2
   871
williamr@2
   872
  	class TConnectionInfoV1 : public TConnectionInfoBase
williamr@2
   873
	/**
williamr@2
   874
	Connection info class is used to carry miscellaneous information about data connection.
williamr@2
   875
  	
williamr@2
   876
  	Contains all kind of packet data connection related information that is useful for
williamr@2
   877
  	ETel API clients.
williamr@2
   878
  	
williamr@2
   879
  	Supported from v9.5.
williamr@2
   880
williamr@2
   881
	@publishedPartner
williamr@2
   882
	@released
williamr@2
   883
  	*/
williamr@2
   884
  		{
williamr@2
   885
  	public:
williamr@2
   886
  		IMPORT_C TConnectionInfoV1();
williamr@2
   887
  	public:
williamr@2
   888
        /**HSDPA UE category as defined in 3GPP TS 25.306 Table 5.1a: "FDD 
williamr@2
   889
        HS-DSCH physical layer categories". Value "0" means HSDPA is not used,
williamr@2
   890
        value "1" means category 1, value "2" means category 2 etc.*/
williamr@2
   891
        TUint iHSDPACategory;
williamr@2
   892
 
williamr@2
   893
        /*HSUPA (E-DCH) UE category as defined in 3GPP TS 25.306 Table 5.1g: 
williamr@2
   894
        "FDD E-DCH physical layer categories". Value "0" means HSUPA is not used,
williamr@2
   895
        value "1" means category 1, value "2" means category 2 etc.*/       
williamr@2
   896
        TUint iHSUPACategory;
williamr@2
   897
		};
williamr@2
   898
williamr@2
   899
williamr@2
   900
	IMPORT_C TInt GetDataVolumeTransferred(TDataVolume& aVolume) const; // Deprecated method.
williamr@2
   901
	IMPORT_C void NotifyDataTransferred(TRequestStatus& aStatus, TDataVolume& aVolume, TUint aRcvdGranularity=0x1000,TUint aSentGranularity=0x1000) const; 
williamr@2
   902
	IMPORT_C void GetConnectionSpeed(TRequestStatus& aStatus, TUint& aRate) const; // get the current speed (bits per second) of the connection
williamr@2
   903
	IMPORT_C void NotifyConnectionSpeedChange(TRequestStatus& aStatus, TUint& aRate) const;  // notify client if there's a change in the connection speed
williamr@2
   904
williamr@2
   905
	// N.B. the following 2 methoda are only supported if telephony was built with SYMBIAN_ADAPTIVE_TCP_RECEIVE_WINDOW macro
williamr@2
   906
    IMPORT_C void GetConnectionInfo(TRequestStatus& aStatus, TDes8& aInfo) const; // get connection information
williamr@2
   907
	IMPORT_C void NotifyConnectionInfoChange(TRequestStatus &aStatus, TDes8& aInfo) const; // notify client if connection information changes	
williamr@2
   908
williamr@2
   909
	IMPORT_C TInt GetLastErrorCause(TInt& aError) const;
williamr@2
   910
williamr@2
   911
	IMPORT_C void GetDataVolumeTransferred(TRequestStatus& aStatus, TDataVolume& aVolume) const; // Recommended method variant.
williamr@2
   912
	
williamr@2
   913
	class TDataChannelV2 : public TPacketBase
williamr@2
   914
	/**
williamr@2
   915
	Contains data channel parameters.
williamr@2
   916
	
williamr@2
   917
	Contains the information previously returned by	LoanCommPort() 
williamr@2
   918
	(iCsy and iPort), as well as the new information which is generated 
williamr@2
   919
	by context creation, e.g. the context (data channel) identity, 
williamr@2
   920
	for version 2 of the API.  
williamr@2
   921
williamr@2
   922
	It is passed as a packaged parameter to RPacketContext::InitialiseContext().
williamr@2
   923
	
williamr@2
   924
	@publishedPartner
williamr@2
   925
	@released
williamr@2
   926
	*/
williamr@2
   927
		{
williamr@2
   928
	public:
williamr@2
   929
		IMPORT_C TDataChannelV2();
williamr@2
   930
	public:
williamr@2
   931
		/**CSY name.
williamr@2
   932
		@deprecated Data previously used by LoanDataPort() in version 1 of the API.*/
williamr@2
   933
		TFileName iCsy;		
williamr@2
   934
		/**Port name 
williamr@2
   935
		@deprecated Data previously used by LoanDataPort(). */
williamr@2
   936
		TName iPort;			
williamr@2
   937
		/**Context Identity.
williamr@2
   938
		The Channel name information returned by the lower layers (Nif). */
williamr@2
   939
		TName iChannelId;	
williamr@2
   940
		};
williamr@2
   941
	/** 
williamr@2
   942
	Data channel package since version 2 of the API.
williamr@2
   943
williamr@2
   944
	Supported from v7.0S.
williamr@2
   945
	*/
williamr@2
   946
	typedef TPckg<TDataChannelV2> TDataChannelV2Pckg;	
williamr@2
   947
williamr@2
   948
	IMPORT_C void InitialiseContext(TRequestStatus& aStatus, TDes8& aDataChannelV2Pckg) const; // This method supersedes the LoanCommPort() and RecoverCommPort() methods.
williamr@2
   949
williamr@2
   950
	enum {KIPAddressSize = 16};				   ///< TIPAddress size
williamr@2
   951
	/**
williamr@2
   952
	Array to hold either IPv4 or IPv6 address or Subnet mask since version 2 of the API.
williamr@2
   953
	
williamr@2
   954
	Supported from v7.0S.
williamr@2
   955
	*/	
williamr@2
   956
	typedef TUint8 TIPAddress[KIPAddressSize]; 
williamr@2
   957
	
williamr@2
   958
	
williamr@2
   959
	class TPacketFilterV2 : public TPacketBase
williamr@2
   960
	/**
williamr@2
   961
	Packet filter package since version 2 of the API.
williamr@2
   962
williamr@2
   963
	Contains member data compatible with parameters required for configuring 
williamr@2
   964
	a packet filter on a Rel99/R4 packet network. 
williamr@2
   965
williamr@2
   966
	Inherits from the TPacketBase class to make it future 
williamr@2
   967
	proof (extensible).
williamr@2
   968
williamr@2
   969
	Supported from v7.0S.
williamr@2
   970
williamr@2
   971
	@publishedPartner
williamr@2
   972
	@released
williamr@2
   973
	*/
williamr@2
   974
williamr@2
   975
		{
williamr@2
   976
	public:
williamr@2
   977
		IMPORT_C TPacketFilterV2();
williamr@2
   978
	public:
williamr@2
   979
		/** Packet filter identifier. Value range: 1 - 8.*/
williamr@2
   980
		TInt iId;						
williamr@2
   981
		/** Evaluation Precedence Index. Value range: 255 (lowest) - 0 (highest).*/
williamr@2
   982
		TInt iEvaluationPrecedenceIndex;	
williamr@2
   983
		/** Domain Source address.*/
williamr@2
   984
		TIPAddress iSrcAddr;				
williamr@2
   985
		/** Domain Subnet mask.*/
williamr@2
   986
		TIPAddress iSrcAddrSubnetMask;		
williamr@2
   987
		/** Protocol number (IPv4) or Next Header (IPv6) field of incoming packets. 
williamr@2
   988
		Value range 0 - 255.*/
williamr@2
   989
		TInt iProtocolNumberOrNextHeader;	 
williamr@2
   990
		/** Minimum source port number of incoming packets. Value range 0 - 65535.*/
williamr@2
   991
		TInt iSrcPortMin;					 
williamr@2
   992
		/** Maximum source port number of incoming packets. Value range 0 - 65535.*/
williamr@2
   993
		TInt iSrcPortMax;					 
williamr@2
   994
		/** Lowest destination port number of incoming packets. Value range 0 - 65535.*/
williamr@2
   995
		TInt iDestPortMin;					
williamr@2
   996
		/** Maximum destination port number of incoming packets. Value range 0 - 65535.*/
williamr@2
   997
		TInt iDestPortMax;					 
williamr@2
   998
		/** Security Parameter Index, 32-bit field.*/
williamr@2
   999
		TUint32 iIPSecSPI;					
williamr@2
  1000
		/** Type of Service (IPv4) or Traffic Class (IPv6). 
williamr@2
  1001
		1 octet TOS/Traffic class + 1 octet TOS/Traffic class Mask.*/
williamr@2
  1002
		TUint16 iTOSorTrafficClass;			 
williamr@2
  1003
		/** Flow label (IPv6 only) of incoming packets. 3 octets with 20-bit field 
williamr@2
  1004
		containing the flow label.*/
williamr@2
  1005
		TUint32 iFlowLabel;					
williamr@2
  1006
		};
williamr@2
  1007
	/** Packaged TPacketFilterV2.*/
williamr@2
  1008
	typedef TPckg<TPacketFilterV2> TPacketFilterV2Pckg;	
williamr@2
  1009
		
williamr@2
  1010
	
williamr@2
  1011
	/**
williamr@2
  1012
	Maximum length of DNS Fully Qualified Domain Name (RFC 1123)
williamr@2
  1013
	
williamr@2
  1014
	@internalComponent
williamr@2
  1015
	*/
williamr@2
  1016
	enum TFQDNLength
williamr@2
  1017
	{
williamr@2
  1018
	KMaxFQDNLength=255,
williamr@2
  1019
	};
williamr@2
  1020
	
williamr@2
  1021
	typedef TBuf8<KMaxFQDNLength> TAuthorizationToken;
williamr@2
  1022
	
williamr@2
  1023
	/**
williamr@2
  1024
	Packet Filter type identifier.
williamr@2
  1025
	
williamr@2
  1026
	@publishedPartner
williamr@2
  1027
	@released
williamr@2
  1028
	*/
williamr@2
  1029
	enum TPacketFilterType
williamr@2
  1030
		{
williamr@2
  1031
		/** Unknown filter type.*/
williamr@2
  1032
		EPacketFilterTypeUnknown,
williamr@2
  1033
		/** Filter Type One.*/
williamr@2
  1034
		EPacketFilterTypeOne,
williamr@2
  1035
		/** Filter Type Two.*/
williamr@2
  1036
		EPacketFilterTypeTwo,
williamr@2
  1037
		/** Filter Type Three.*/
williamr@2
  1038
		EPacketFilterTypeThree,
williamr@2
  1039
		};
williamr@2
  1040
		
williamr@2
  1041
	class TPacketFilterV3 : public TPacketFilterV2
williamr@2
  1042
	/**
williamr@2
  1043
	Packet filter that supports packet filter types.
williamr@2
  1044
	Contains member data compatible with parameters required
williamr@2
  1045
    for configuring a packet filter on a Rel99/R4/R5 packet network. . 
williamr@2
  1046
williamr@2
  1047
	Inherits from the TPacketFilterV2 class.
williamr@2
  1048
williamr@2
  1049
	Supported from 9.1
williamr@2
  1050
williamr@2
  1051
	@publishedPartner
williamr@2
  1052
	@released
williamr@2
  1053
	*/
williamr@2
  1054
		{
williamr@2
  1055
	public:
williamr@2
  1056
		IMPORT_C TPacketFilterV3(TPacketFilterType aType);
williamr@2
  1057
		IMPORT_C TPacketFilterV3();
williamr@2
  1058
		enum TPacketFilterDataBitmapPos
williamr@2
  1059
			{
williamr@2
  1060
			/** Bitmap for Domain Source address.*/
williamr@2
  1061
			EPacketFilterSrcAddr						= 0x001,
williamr@2
  1062
			/** Bitmap for Domain Subnet mask.*/
williamr@2
  1063
			EPacketFilterSrcAddrSubnetMask			= 0x002,
williamr@2
  1064
			/** Bitmap for Protocol number (IPv4) or Next Header (IPv6) field of incoming packets.*/
williamr@2
  1065
			EPacketFilterProtocolNumberOrNextHeader	= 0x004,
williamr@2
  1066
			/** Bitmap for Minimum source port number of incoming packets.*/
williamr@2
  1067
			EPacketFilterSrcPortMin					= 0x008,
williamr@2
  1068
			/** Bitmap for Maximum source port number of incoming packets.*/
williamr@2
  1069
			EPacketFilterSrcPortMax					= 0x010,
williamr@2
  1070
			/** Bitmap for Lowest destination port number of incoming packets.*/
williamr@2
  1071
			EPacketFilterDestPortMin					= 0x020,
williamr@2
  1072
			/** Bitmap for Maximum destination port number of incoming packets.*/
williamr@2
  1073
			EPacketFilterDestPortMax					= 0x040,
williamr@2
  1074
			/** Bitmap for Security Parameter Index.*/
williamr@2
  1075
			EPacketFilterIPSecSPI					= 0x080,
williamr@2
  1076
			/** Bitmap for Type of Service (IPv4) or Traffic Class (IPv6).*/
williamr@2
  1077
			EPacketFilterTOSorTrafficClass			= 0x100,
williamr@2
  1078
			/** Bitmap for Flow label (IPv6 only) of incoming packets.*/
williamr@2
  1079
			EPacketFilterFlowLabel					= 0x200,
williamr@2
  1080
			};
williamr@2
  1081
			
williamr@2
  1082
		inline TBool IsPresent(TPacketFilterDataBitmapPos aDataMemberBitmapPos);
williamr@2
  1083
		inline void Reset(TPacketFilterDataBitmapPos aDataMemberBitmapPos);
williamr@2
  1084
		inline void Reset();
williamr@2
  1085
	public:
williamr@2
  1086
		/** Packet filter identifier. Value range: 1 - 8.*/
williamr@2
  1087
		using TPacketFilterV2::iId;
williamr@2
  1088
		/** Evaluation Precedence Index. Value range: 255 (lowest) - 0 (highest).*/
williamr@2
  1089
		using TPacketFilterV2::iEvaluationPrecedenceIndex;
williamr@2
  1090
	
williamr@2
  1091
	public:
williamr@2
  1092
		
williamr@2
  1093
		IMPORT_C TBool SetSrcAddr(TIPAddress &aSrcAddr);
williamr@2
  1094
		IMPORT_C TBool SetSrcAddrSubnetMask(TIPAddress &aSrcAddrSubnetMask);
williamr@2
  1095
		
williamr@2
  1096
		IMPORT_C TBool SetProtocolNumberOrNextHeader(TInt aProtocolNumberOrNextHeader);
williamr@2
  1097
		
williamr@2
  1098
		IMPORT_C TBool SetSrcPortMin(TInt aSrcPortMin);
williamr@2
  1099
		IMPORT_C TBool SetSrcPortMax(TInt aSrcPortMax);
williamr@2
  1100
		
williamr@2
  1101
		IMPORT_C TBool SetDestPortMin(TInt aDestPortMin);
williamr@2
  1102
		IMPORT_C TBool SetDestPortMax(TInt aDestPortMax);
williamr@2
  1103
		
williamr@2
  1104
		IMPORT_C TBool SetSPI(TUint32 aIPSecSPI);
williamr@2
  1105
		
williamr@2
  1106
		IMPORT_C TBool SetTOSorTrafficClass(TUint16 aTOSorTrafficClass);
williamr@2
  1107
		IMPORT_C TBool SetFlowLabel(TUint32 aFlowLabel);
williamr@2
  1108
		
williamr@2
  1109
	
williamr@2
  1110
	public:
williamr@2
  1111
	
williamr@2
  1112
		/** Return the Domain Source address. 
williamr@2
  1113
		
williamr@2
  1114
		@return Domain Source address.
williamr@2
  1115
		*/
williamr@2
  1116
		inline const TIPAddress& SrcAddr()
williamr@2
  1117
		{
williamr@2
  1118
			return iSrcAddr;
williamr@2
  1119
		};
williamr@2
  1120
		
williamr@2
  1121
		/** Return the Domain Subnet mask.
williamr@2
  1122
		
williamr@2
  1123
		@return Domain Subnet mask.
williamr@2
  1124
		*/
williamr@2
  1125
		inline const TIPAddress& SrcAddrSubnetMask()
williamr@2
  1126
		{
williamr@2
  1127
			return iSrcAddrSubnetMask;
williamr@2
  1128
		};
williamr@2
  1129
				
williamr@2
  1130
		inline TInt ProtocolNumberOrNextHeader();
williamr@2
  1131
		
williamr@2
  1132
		inline TInt SrcPortMin();
williamr@2
  1133
		inline TInt SrcPortMax();
williamr@2
  1134
		
williamr@2
  1135
		inline TInt DestPortMin();
williamr@2
  1136
		inline TInt DestPortMax();
williamr@2
  1137
		
williamr@2
  1138
		inline TUint32 SPI(); 
williamr@2
  1139
		
williamr@2
  1140
		inline TUint16 TOSorTrafficClass();
williamr@2
  1141
		inline TUint32 FlowLabel();
williamr@2
  1142
	protected:
williamr@2
  1143
		/** Initialised in the constructor - type can be I, II or III
williamr@2
  1144
		*/
williamr@2
  1145
		TPacketFilterType iType;
williamr@2
  1146
		/** Bitmap of allowed attributes set in the constructor in accordance to type
williamr@2
  1147
		of the filter as defined in TS 23.060.
williamr@2
  1148
		*/
williamr@2
  1149
		TUint16 iAllowedDataBitmap;
williamr@2
  1150
		/** Bitmap of data members that are set(initialised) - data member can be set
williamr@2
  1151
		in allowed for the specified type of the filter only.
williamr@2
  1152
		*/
williamr@2
  1153
		TUint16 iPresentDataBitmap;
williamr@2
  1154
		};
williamr@2
  1155
	/** Packaged TPacketFilterV3.*/
williamr@2
  1156
	typedef TPckg<TPacketFilterV3> TPacketFilterV3Pckg;	
williamr@2
  1157
	
williamr@2
  1158
	/**
williamr@2
  1159
	Contains Authorization Token and associated Flow Identifiers.
williamr@2
  1160
	Defines member data needed to set media authorization TFT parameters - single Authorization Token parameter 
williamr@2
  1161
	followed by the list of Flow Identifier parameter(s), as defined in 3GPP TS 24.008. 
williamr@2
  1162
	
williamr@2
  1163
	Contains data member that's instance of TPacketBase class to make it future proof (extensible); In order to support serialization,
williamr@2
  1164
	present implementation of TPacketBase has to be extended so that it supports methods needed (ExternalizeL()/InternalizeL()).
williamr@2
  1165
	Supported from 9.1.
williamr@2
  1166
williamr@2
  1167
	@publishedPartner
williamr@2
  1168
	@released
williamr@2
  1169
	*/
williamr@2
  1170
	class CTFTMediaAuthorizationV3 : public CBase	
williamr@2
  1171
		{
williamr@2
  1172
	public:
williamr@2
  1173
		IMPORT_C ~CTFTMediaAuthorizationV3();
williamr@2
  1174
		IMPORT_C static CTFTMediaAuthorizationV3* NewL();			
williamr@2
  1175
	public:	
williamr@2
  1176
		IMPORT_C virtual void ExternalizeL(HBufC8*& aBuffer) const;
williamr@2
  1177
		IMPORT_C virtual void InternalizeL(TDes8& aBuffer);
williamr@2
  1178
		IMPORT_C TUint ExtensionId()const;
williamr@2
  1179
williamr@2
  1180
williamr@2
  1181
		/** Flow identifier */	
williamr@2
  1182
		struct TFlowIdentifier
williamr@2
  1183
			{
williamr@2
  1184
			/** Media component number. */
williamr@2
  1185
			TUint16 iMediaComponentNumber;
williamr@2
  1186
			/** IP flow number. */
williamr@2
  1187
			TUint16 iIPFlowNumber;
williamr@2
  1188
			};				
williamr@2
  1189
		/** Authorization token */		
williamr@2
  1190
		TAuthorizationToken iAuthorizationToken;			 
williamr@2
  1191
		/** List of flow identifiers authorization token is granted for*/
williamr@2
  1192
		RArray<TFlowIdentifier>	iFlowIds;
williamr@2
  1193
	protected:
williamr@2
  1194
		CTFTMediaAuthorizationV3();
williamr@2
  1195
		TUint iExtensionId;
williamr@2
  1196
		};
williamr@2
  1197
	
williamr@2
  1198
	IMPORT_C void AddMediaAuthorizationL(TRequestStatus& aStatus, CTFTMediaAuthorizationV3& aMediaAuthorization) const;
williamr@2
  1199
	IMPORT_C void RemoveMediaAuthorization(TRequestStatus& aStatus, TAuthorizationToken& aAuthorizationToken) const;
williamr@2
  1200
williamr@2
  1201
williamr@2
  1202
	IMPORT_C TInt OpenNewSecondaryContext(RPacketService& aPacketService, const TDesC& aExistingContextName, TDes& aNewContextName);
williamr@2
  1203
	IMPORT_C void EnumeratePacketFilters(TRequestStatus& aStatus, TInt& aCount) const;
williamr@2
  1204
	IMPORT_C void GetPacketFilterInfo(TRequestStatus& aStatus, TInt aIndex, TDes8& aPacketFilterInfo) const;
williamr@2
  1205
	IMPORT_C void AddPacketFilter(TRequestStatus& aStatus, const TDesC8& aPacketFilterInfo) const;
williamr@2
  1206
	IMPORT_C void RemovePacketFilter(TRequestStatus& aStatus, TInt aId) const;
williamr@2
  1207
	IMPORT_C void ModifyActiveContext(TRequestStatus& aStatus) const;
williamr@2
  1208
	IMPORT_C void CreateNewTFT(TRequestStatus& aStatus, const TInt aSize) const;
williamr@2
  1209
	IMPORT_C void DeleteTFT(TRequestStatus& aStatus) const;
williamr@2
  1210
	
williamr@2
  1211
	
williamr@2
  1212
	
williamr@2
  1213
	/**
williamr@2
  1214
	Protocol identifiers, as defined in 24.008, section 10.5.6.3
williamr@2
  1215
	*/
williamr@2
  1216
	enum TPcoProtocolId
williamr@2
  1217
	{
williamr@2
  1218
	/** PCO identifier for LCP.*/
williamr@2
  1219
	EETelPcktProtocolLcpId = 0xc021,	
williamr@2
  1220
	/** PCO identifier for PAP.*/
williamr@2
  1221
	EETelPcktProtocolPapId = 0xc023,
williamr@2
  1222
	/** PCO identifier for CHAP.*/
williamr@2
  1223
	EETelPcktProtocolChapId = 0xc223,
williamr@2
  1224
	/** PCO identifier for IPCP.*/
williamr@2
  1225
	EETelPcktProtocolIpcpId = 0x8021
williamr@2
  1226
	};
williamr@2
  1227
williamr@2
  1228
	/**
williamr@2
  1229
	PCO additional parameter identifiers in MS to network direction, as defined in 3GPP TS 24.008, section 10.5.6.3
williamr@2
  1230
	*/
williamr@2
  1231
	enum TPcoIDMSToNetwork
williamr@2
  1232
	{
williamr@2
  1233
	/** PCO MS additional parameter identifier for a PCSCF address request.*/
williamr@2
  1234
	EEtelPcktPCSCFAddressRequest = 0x01,
williamr@2
  1235
	/** PCO MS additional parameter identifier for an IM CN subsystem signalling flag.*/
williamr@2
  1236
	EEtelPcktIMCNMSSubsystemSignallingFlag = 0x02,
williamr@2
  1237
	/** PCO MS additional parameter identifier for a DNS server address request.*/
williamr@2
  1238
	EEtelPcktDNSServerAddressRequest = 0x03,
williamr@2
  1239
	/** Not currently supported.*/
williamr@2
  1240
	EEtelPcktNotSupported = 0x04,
williamr@2
  1241
	};
williamr@2
  1242
williamr@2
  1243
	/**
williamr@2
  1244
	PCO additional parameter identifiers in  network to MS direction, as defined in 3GPP TS 24.008, section 10.5.6.3
williamr@2
  1245
	*/
williamr@2
  1246
	enum TPcoIDNetworkToMS
williamr@2
  1247
	{
williamr@2
  1248
	/** PCO network additional parameter identifier for a PCSCF address.*/
williamr@2
  1249
	EEtelPcktPCSCFAddress = 0x01,
williamr@2
  1250
	/** PCO network additional parameter identifier for an IM CN subsystem signalling flag.*/
williamr@2
  1251
	EEtelPcktIMCNNetworkSubsystemSignallingFlag = 0x02,
williamr@2
  1252
	/** PCO network additional parameter identifier for a DNS server address.*/
williamr@2
  1253
	EEtePcktDNSServerAddress= 0x03,
williamr@2
  1254
	/** PCO network additional parameter identifier for a policy control rejection code.*/
williamr@2
  1255
	EEtelPcktPolicyControlRejectionCode = 0x04,
williamr@2
  1256
	};
williamr@2
  1257
williamr@2
  1258
williamr@2
  1259
	/** 
williamr@2
  1260
	Helper class that implements PCO IE identifier.
williamr@2
  1261
	
williamr@2
  1262
	@publishedPartner
williamr@2
  1263
	@released
williamr@2
  1264
	*/
williamr@2
  1265
	class TPcoId : public MTlvItemIdType
williamr@2
  1266
	{
williamr@2
  1267
	public:
williamr@2
  1268
		inline TPcoId();
williamr@2
  1269
		inline TPcoId(TUint16 aId);
williamr@2
  1270
		inline void ExternalizeL(TDes8&)const;
williamr@2
  1271
		inline void InternalizeL(TDesC8&);
williamr@2
  1272
		inline TUint SerializedLength() const;	
williamr@2
  1273
		inline TUint16 Id()const;
williamr@2
  1274
		inline void SetId(TUint16);
williamr@2
  1275
		inline TBool IsEqual(const MTlvItemIdType& aOtherIdType)const;	
williamr@2
  1276
	protected:
williamr@2
  1277
		/** PCO Id*/
williamr@2
  1278
  		TUint16 iId;
williamr@2
  1279
	};
williamr@2
  1280
	
williamr@2
  1281
	/** 
williamr@2
  1282
	Helper class that implements PCO IE identifier length.
williamr@2
  1283
	
williamr@2
  1284
	@publishedPartner
williamr@2
  1285
	@released
williamr@2
  1286
	*/
williamr@2
  1287
	class TPcoItemDataLength: public MTlvItemDataLengthType
williamr@2
  1288
	{
williamr@2
  1289
	public:
williamr@2
  1290
		inline TPcoItemDataLength();
williamr@2
  1291
		inline TPcoItemDataLength(TUint8 aLen);
williamr@2
  1292
		inline void SetDataLength(TUint aLength);
williamr@2
  1293
		inline TUint DataLength() const;
williamr@2
  1294
		inline void ExternalizeL(TDes8&) const;
williamr@2
  1295
		inline void InternalizeL(TDesC8&);
williamr@2
  1296
		inline TUint SerializedLength()const;
williamr@2
  1297
	protected:
williamr@2
  1298
		/** length of associated item data*/
williamr@2
  1299
  		TUint8 iDataLength;
williamr@2
  1300
	};
williamr@2
  1301
williamr@2
  1302
	/** 
williamr@2
  1303
	Identifiers for the type of data data compression applicable for SNDCP only, 
williamr@2
  1304
	as defined in 3GPP TS  44.065, section 6.6.1.1.4. 
williamr@2
  1305
	Values listed in the enumeration do not hold same numerical values as those defined in the specifications, 
williamr@2
  1306
	as ENoDataComression and EManufacturerDefaultDataComression are introduced in order to be utilised when no 
williamr@2
  1307
	compression and device default compression algorithm are needed, respectively. 
williamr@2
  1308
	*/ 
williamr@2
  1309
	enum TDataCompression 
williamr@2
  1310
		{ 
williamr@2
  1311
		/** 
williamr@2
  1312
		No compression 
williamr@2
  1313
		*/ 
williamr@2
  1314
		ENoDataCompression,         
williamr@2
  1315
		/** 
williamr@2
  1316
		Compression algorithm preferred by the device manufacturer 
williamr@2
  1317
		*/ 
williamr@2
  1318
		EManufacturerDefaultDataCompression,         
williamr@2
  1319
		/** 
williamr@2
  1320
		V.42 bis 
williamr@2
  1321
		*/ 
williamr@2
  1322
		EV42, 
williamr@2
  1323
        /** 
williamr@2
  1324
        V.44   
williamr@2
  1325
        */ 
williamr@2
  1326
        EV44, 
williamr@2
  1327
        };
williamr@2
  1328
        
williamr@2
  1329
	/** 
williamr@2
  1330
	Identifiers for type of SNDCP & PDCP header compression as defined 
williamr@2
  1331
	in 3GPP TS  44.065, section 6.5.1.1.4, 
williamr@2
  1332
	Values listed in the enumeration do not hold same numerical values as those defined in the specifications, 
williamr@2
  1333
	as ENoHeaderCompression and EManufacturerDefaultHeaderCompression are introduced in order to be utilised when no 
williamr@2
  1334
	compression and device default compression algorithm are needed, respectively. 
williamr@2
  1335
	*/ 
williamr@2
  1336
	enum THeaderCompression 
williamr@2
  1337
		{ 
williamr@2
  1338
		/** 
williamr@2
  1339
		No compression 
williamr@2
  1340
		*/ 
williamr@2
  1341
		ENoHeaderCompression,         
williamr@2
  1342
		/** 
williamr@2
  1343
		Compression algorithm preferred by the device manufacturer 
williamr@2
  1344
		*/ 
williamr@2
  1345
		EManufacturerDefaultHeaderCompression,         
williamr@2
  1346
		/** 
williamr@2
  1347
		Compression algorithm defined in RFC 1144 
williamr@2
  1348
		*/ 
williamr@2
  1349
		ERfc1144,         
williamr@2
  1350
		/** 
williamr@2
  1351
		Compression algorithm defined in RFC 2507 
williamr@2
  1352
		*/ 
williamr@2
  1353
		ERfc2507,         
williamr@2
  1354
		/** 
williamr@2
  1355
		Robust header compression algorithm defined in RFC 3095 
williamr@2
  1356
		*/ 
williamr@2
  1357
		ERohc,         
williamr@2
  1358
		};
williamr@2
  1359
williamr@2
  1360
	class TContextConfig_R5 : public TContextConfigR99_R4 
williamr@2
  1361
	/** 
williamr@2
  1362
	Reintroduces support for setting of header/data compression in SNDCP & PDCP         
williamr@2
  1363
	Supported from v9.1. 
williamr@2
  1364
	@publishedPartner 
williamr@2
  1365
	@released
williamr@2
  1366
	*/ 
williamr@2
  1367
		{ 
williamr@2
  1368
	public: 
williamr@2
  1369
		IMPORT_C TContextConfig_R5(); 
williamr@2
  1370
	         
williamr@2
  1371
	public: 
williamr@2
  1372
		/** defines whether SNDCP & PDCP header compression shall be utilised or not. 
williamr@2
  1373
		If former is the case, it holds value of that defines compression algorithm to be exercised. 
williamr@2
  1374
		The default value is ENone - no compression is needed. 
williamr@2
  1375
		*/ 
williamr@2
  1376
		THeaderCompression iPdpHeaderCompression; 
williamr@2
  1377
		/** defines whether SNDCP data compression shall be utilised or not. 
williamr@2
  1378
		If former is the case, it holds value of that defines compression algorithm to be exercised.                   
williamr@2
  1379
		The default value is ENone - no compression is needed. 
williamr@2
  1380
		*/ 
williamr@2
  1381
		TDataCompression iPdpDataCompression; 
williamr@2
  1382
		}; 
williamr@2
  1383
	
williamr@2
  1384
protected:
williamr@2
  1385
	IMPORT_C virtual void ConstructL();
williamr@2
  1386
	IMPORT_C virtual void Destruct();
williamr@2
  1387
protected:
williamr@2
  1388
	CPacketContextPtrHolder* iEtelPacketContextPtrHolder;
williamr@2
  1389
	};
williamr@2
  1390
williamr@2
  1391
///////////////////////////////////////////////////////////////////
williamr@2
  1392
//                       MBMS Context 
williamr@2
  1393
///////////////////////////////////////////////////////////////////
williamr@2
  1394
class RPacketMbmsContext : public RPacketContext
williamr@2
  1395
/** 
williamr@2
  1396
Defines the MBMS context and the configuration of a connection to the network's 
williamr@2
  1397
packet-switched service. 
williamr@2
  1398
The functionality associated with the context of a MBMS connection is inherited 
williamr@2
  1399
from RPacketContext class.
williamr@2
  1400
The behaviour of OpenNewContext API is redefined.
williamr@2
  1401
Every instance of this class has RPacketService as a base class.
williamr@2
  1402
williamr@2
  1403
@publishedPartner
williamr@2
  1404
@released
williamr@2
  1405
*/	
williamr@2
  1406
	{
williamr@2
  1407
public:
williamr@2
  1408
	IMPORT_C RPacketMbmsContext();
williamr@2
  1409
	IMPORT_C TInt OpenNewContext(RPacketService& aPacketNetwork, TDes& aContextName);	
williamr@2
  1410
	IMPORT_C void Close();
williamr@2
  1411
	friend class CRetrievePcktMbmsSessionList;
williamr@2
  1412
	
williamr@2
  1413
	class TContextConfigMbmsV1: public TPacketDataConfigBase
williamr@2
  1414
	/**
williamr@2
  1415
	Context configurations for MBMS support. 
williamr@2
  1416
	
williamr@2
  1417
	Contains all the data necessary to configure a context on a MBMS network.
williamr@2
  1418
	
williamr@2
  1419
	@see RPacketContext::SetConfig()
williamr@2
  1420
	
williamr@2
  1421
   	@publishedPartner
williamr@2
  1422
	@released
williamr@2
  1423
	*/	
williamr@2
  1424
		{
williamr@2
  1425
	public:
williamr@2
  1426
		IMPORT_C TContextConfigMbmsV1();
williamr@2
  1427
	public:
williamr@2
  1428
		/** Input parameter : Temporary mobile group identity 
williamr@2
  1429
		 * A unique name to an MBMS service
williamr@2
  1430
		 */
williamr@2
  1431
		TTmgi   iTmgi;
williamr@2
  1432
		
williamr@2
  1433
		/** Input Parameter : MBMS access bearer information 
williamr@2
  1434
		 * @see TMbmsScope
williamr@2
  1435
		 */
williamr@2
  1436
		TMbmsScope	iMbmsAccessBearer;
williamr@2
  1437
		
williamr@2
  1438
		/** Input parameter : MBMS service priority options 
williamr@2
  1439
		 * Specifies the priority of the MBMS service to be received.
williamr@2
  1440
		 * @see  TMbmsServicePriority
williamr@2
  1441
		 */
williamr@2
  1442
		TMbmsServicePriority	iMbmsServicePriority;
williamr@2
  1443
		
williamr@2
  1444
		/** Input parameter : MBMS service mode 
williamr@2
  1445
		 * @see TMbmsServiceMode
williamr@2
  1446
		 */
williamr@2
  1447
		TMbmsServiceMode	iMbmsServiceMode;
williamr@2
  1448
		
williamr@2
  1449
		/** Input parameter : MBMS session flag 
williamr@2
  1450
		 * ETrue indicates that an MBMS service has one or more sessions. 
williamr@2
  1451
		 */
williamr@2
  1452
		TBool	iMbmsSessionFlag;
williamr@2
  1453
     	};
williamr@2
  1454
		
williamr@2
  1455
    
williamr@2
  1456
	//Packaged version of TContextConfigMbmsV1, used when this structure has to be passed via IPC.
williamr@2
  1457
	typedef TPckg<TContextConfigMbmsV1> TContextConfigMbmsV1Pckg;
williamr@2
  1458
	
williamr@2
  1459
	IMPORT_C void UpdateMbmsSessionList(TRequestStatus& aStatus,const TMbmsAction aAction, const TMbmsSessionId aSessionId = 0) const;	
williamr@2
  1460
	
williamr@2
  1461
	class CMbmsSession : public CBase
williamr@2
  1462
	/**
williamr@2
  1463
	 * Captures the list of session(s) of an MBMS service.
williamr@2
  1464
	 * @publishedPartner
williamr@2
  1465
	 * @released
williamr@2
  1466
	 */
williamr@2
  1467
     	{
williamr@2
  1468
     public:
williamr@2
  1469
	     IMPORT_C static CMbmsSession* NewL();
williamr@2
  1470
	     IMPORT_C void InternalizeL(const TDesC8& aBuffer);
williamr@2
  1471
	     IMPORT_C void ExternalizeL(HBufC8*& aBuffer);
williamr@2
  1472
	     IMPORT_C TUint ExtensionId() const;
williamr@2
  1473
	     IMPORT_C ~CMbmsSession();
williamr@2
  1474
     public:
williamr@2
  1475
     	/**
williamr@2
  1476
     	 * Output Parameter.
williamr@2
  1477
     	 * Contains the list of sessions pertaining to the MBMS service.
williamr@2
  1478
     	 */
williamr@2
  1479
     	TMbmsSessionIdList iSessionIdList;
williamr@2
  1480
     	/**
williamr@2
  1481
     	 * Defines the type of the class
williamr@2
  1482
     	 */
williamr@2
  1483
     	TUint iExtensionId;
williamr@2
  1484
     protected:
williamr@2
  1485
     	CMbmsSession();
williamr@2
  1486
     	};
williamr@2
  1487
     
williamr@2
  1488
	};
williamr@2
  1489
williamr@2
  1490
class CPacketPtrHolder;
williamr@2
  1491
class CPcktMbmsMonitoredServiceList;
williamr@2
  1492
class RPacketService : public RTelSubSessionBase
williamr@2
  1493
/**
williamr@2
  1494
Defines a packet-switched connection to a packet network.
williamr@2
  1495
williamr@2
  1496
This is the main packet network class. 
williamr@2
  1497
It encapsulates functionality associated with controlling a packet-switched connection: 
williamr@2
  1498
attaching, detaching, querying packet network capabilities, etc.
williamr@2
  1499
@publishedPartner
williamr@2
  1500
@released
williamr@2
  1501
*/
williamr@2
  1502
	{
williamr@2
  1503
public:
williamr@2
  1504
	IMPORT_C RPacketService();
williamr@2
  1505
	IMPORT_C TInt Open(RPhone& aPhone);
williamr@2
  1506
	IMPORT_C void Close();
williamr@2
  1507
williamr@2
  1508
	IMPORT_C void NotifyContextAdded(TRequestStatus& aStatus, TDes& aContextId) const;
williamr@2
  1509
	IMPORT_C void Attach(TRequestStatus& aStatus) const;	
williamr@2
  1510
	IMPORT_C void Detach(TRequestStatus& aStatus) const;	
williamr@2
  1511
williamr@2
  1512
	friend TInt RPacketContext::OpenNewSecondaryContext(RPacketService& aPacketService, const TDesC& aExistingContextName, TDes& aNewContextName);	///< This method calls the internal method RPacketService::PrepareOpenSecondary(const TDesC& aOriginalContextName)
williamr@2
  1513
	friend TInt RPacketContext::OpenNewContext(RPacketService& aPacketNetwork, TDes& aContextName);	
williamr@2
  1514
	friend TInt RPacketMbmsContext::OpenNewContext(RPacketService& aPacketNetwork, TDes& aContextName);	
williamr@2
  1515
williamr@2
  1516
	friend class CRetrievePcktMbmsMonitoredServices;
williamr@2
  1517
	
williamr@2
  1518
/** Defines the packet data connection status. */
williamr@2
  1519
	enum TStatus
williamr@2
  1520
		{
williamr@2
  1521
	/** Unattached to network and inactive packet data connection. */
williamr@2
  1522
		EStatusUnattached,	
williamr@2
  1523
	/** Attached to network and inactive packet data connection. */
williamr@2
  1524
		EStatusAttached,	
williamr@2
  1525
	/** Attached to network and active packet data connection. */
williamr@2
  1526
		EStatusActive,		
williamr@2
  1527
	/** Attached to network and suspended packet data connection. */
williamr@2
  1528
		EStatusSuspended	
williamr@2
  1529
		};
williamr@2
  1530
williamr@2
  1531
	IMPORT_C TInt GetStatus(TStatus& aPacketStatus) const;
williamr@2
  1532
	IMPORT_C void NotifyStatusChange(TRequestStatus& aStatus,TStatus& aPacketStatus) const;
williamr@2
  1533
	IMPORT_C void NotifyContextActivationRequested(TRequestStatus& aStatus, TDes8& aContextParameters) const;
williamr@2
  1534
	IMPORT_C void RejectActivationRequest(TRequestStatus& aStatus) const;
williamr@2
  1535
williamr@2
  1536
	struct TContextInfo
williamr@2
  1537
	/** Struct to contain the context information.
williamr@2
  1538
williamr@2
  1539
	@see GetContextInfo() */
williamr@2
  1540
		{
williamr@2
  1541
		/** The name of the context.
williamr@2
  1542
		
williamr@2
  1543
		@see TName */
williamr@2
  1544
		TName iName;
williamr@2
  1545
		/** The current status of the context.
williamr@2
  1546
		
williamr@2
  1547
		@see RPacketContext::TContextStatus */
williamr@2
  1548
		RPacketContext::TContextStatus iStatus;
williamr@2
  1549
		};
williamr@2
  1550
williamr@2
  1551
	IMPORT_C void EnumerateContexts(TRequestStatus& aStatus,TInt& aCount, TInt& aMaxAllowed) const; ///< Enumerate all Primary and Secondary contexts (whether active or inactive)
williamr@2
  1552
	IMPORT_C void GetContextInfo(TRequestStatus& aStatus, TInt aIndex, TContextInfo& aInfo) const;
williamr@2
  1553
williamr@2
  1554
	//
williamr@2
  1555
	//	Packet Network Registration and Availability
williamr@2
  1556
	//
williamr@2
  1557
	/** Packet Network Registration/Availability. */
williamr@2
  1558
	enum TRegistrationStatus
williamr@2
  1559
		{
williamr@2
  1560
		/** Not registered and not searching for a network. A network may or may not be 
williamr@2
  1561
		available. */
williamr@2
  1562
		ENotRegisteredNotSearching,
williamr@2
  1563
		/** Registered on a home network. */
williamr@2
  1564
		ERegisteredOnHomeNetwork,
williamr@2
  1565
		/** Not registered but searching for a network. */
williamr@2
  1566
		ENotRegisteredSearching,
williamr@2
  1567
		/** Registration denied. */
williamr@2
  1568
		ERegistrationDenied,
williamr@2
  1569
		/** Registration status unknown. */
williamr@2
  1570
		EUnknown,
williamr@2
  1571
		/** Registered on foreign network. */
williamr@2
  1572
		ERegisteredRoaming,
williamr@2
  1573
		/** Not registered or searching, but network available. */
williamr@2
  1574
		ENotRegisteredButAvailable,	
williamr@2
  1575
		/** Not registered or searching, and network not available. */
williamr@2
  1576
		ENotRegisteredAndNotAvailable
williamr@2
  1577
		};
williamr@2
  1578
williamr@2
  1579
	IMPORT_C void GetNtwkRegStatus(TRequestStatus& aStatus, TRegistrationStatus& aRegistrationStatus) const;
williamr@2
  1580
	IMPORT_C void NotifyChangeOfNtwkRegStatus(TRequestStatus& aStatus,TRegistrationStatus& aRegistrationStatus) const;
williamr@2
  1581
williamr@2
  1582
	/** MS class configuration. */
williamr@2
  1583
	enum TMSClass
williamr@2
  1584
		{
williamr@2
  1585
		/** Active simultaneous PS and CS calls supported (Class A). */
williamr@2
  1586
		EMSClassDualMode,			
williamr@2
  1587
		/** Active CS and Suspended PS simultaneous calls supported (Class B). */
williamr@2
  1588
		EMSClassSuspensionRequired, 
williamr@2
  1589
		/** Active CS or Active PS only call supported (Class C). */
williamr@2
  1590
		EMSClassAlternateMode,		
williamr@2
  1591
		/** Active CS only call supported (Class C). */
williamr@2
  1592
		EMSClassCircuitSwitchedOnly,
williamr@2
  1593
		/** Active PS only call supported (Class C) */
williamr@2
  1594
		EMSClassPacketSwitchedOnly, 
williamr@2
  1595
		/** Unknown what configuration is supported */
williamr@2
  1596
		EMSClassUnknown				
williamr@2
  1597
		};
williamr@2
  1598
williamr@2
  1599
	IMPORT_C void GetMSClass(TRequestStatus& aStatus, TMSClass& aCurrentClass, TMSClass& aMaxClass) const;
williamr@2
  1600
	IMPORT_C void SetMSClass(TRequestStatus& aStatus, TMSClass aClass) const;
williamr@2
  1601
	IMPORT_C void NotifyMSClassChange(TRequestStatus& aStatus, TMSClass& aNewClass) const;
williamr@2
  1602
williamr@2
  1603
	/** Static capabilities.
williamr@2
  1604
williamr@2
  1605
	Modes: GPRS */
williamr@2
  1606
	enum TStaticMiscCaps
williamr@2
  1607
			{
williamr@2
  1608
		//
williamr@2
  1609
		// GPRS-specific
williamr@2
  1610
		//
williamr@2
  1611
			/** Suspend supported.
williamr@2
  1612
			
williamr@2
  1613
			Modes: GPRS */
williamr@2
  1614
			KCapsSuspendSupported=0x0001,
williamr@2
  1615
			/** Anonymous Access supported.
williamr@2
  1616
			
williamr@2
  1617
			Modes: GPRS */
williamr@2
  1618
			KCapsAASupported=0x0002,
williamr@2
  1619
			/** Network availability supported.
williamr@2
  1620
			
williamr@2
  1621
			Modes: GPRS */
williamr@2
  1622
			KCapsNetworkAvailabilitySupported=0x0004,
williamr@2
  1623
			/** Set default context supported.
williamr@2
  1624
			
williamr@2
  1625
			Modes: GPRS */
williamr@2
  1626
			KCapsSetDefaultContextSupported=0x0008,
williamr@2
  1627
			/** Change attach mode supported.
williamr@2
  1628
			
williamr@2
  1629
			Modes: GPRS */
williamr@2
  1630
			KCapsChangeAttachModeSupported=0x0010,
williamr@2
  1631
			/** Get data transferred supported.
williamr@2
  1632
			
williamr@2
  1633
			Modes: GPRS */
williamr@2
  1634
			KCapsGetDataTransferredSupported=0x0020,
williamr@2
  1635
			/** Notify data transferred supported
williamr@2
  1636
			
williamr@2
  1637
			Modes: GPRS */
williamr@2
  1638
			KCapsNotifyDataTransferredSupported=0x0040,
williamr@2
  1639
			/** Preferred bearer supported.
williamr@2
  1640
			
williamr@2
  1641
			Modes: GPRS */
williamr@2
  1642
			KCapsPreferredBearerSupported=0x0080,
williamr@2
  1643
			/** PDP data compression supported.
williamr@2
  1644
			
williamr@2
  1645
			Modes: GPRS */
williamr@2
  1646
			KCapsPdpDataCompSupported=0x0100,
williamr@2
  1647
			/** PDP header compression supported
williamr@2
  1648
			
williamr@2
  1649
			Modes: GPRS */
williamr@2
  1650
			KCapsPdpHeaderCompSupported=0x0200,
williamr@2
  1651
			/** MS class supported.
williamr@2
  1652
			
williamr@2
  1653
			Modes: GPRS */
williamr@2
  1654
			KCapsMSClassSupported=0x0400,
williamr@2
  1655
			/** Notify MS class changes supported.
williamr@2
  1656
			
williamr@2
  1657
			Modes: GPRS */
williamr@2
  1658
			KCapsNotifyMSClassSupported=0x0800,
williamr@2
  1659
		//
williamr@2
  1660
		// CDMA Specific
williamr@2
  1661
		//
williamr@2
  1662
			/** Service Option (7,15) or (8,16).
williamr@2
  1663
			
williamr@2
  1664
			Modes: CDMA2000 */
williamr@2
  1665
			KCapsCDMAOneLowSpeedDataSupported=0x00001000,	
williamr@2
  1666
			/** Service Option (22-25) or (26-29).
williamr@2
  1667
			
williamr@2
  1668
			Modes: CDMA2000 */
williamr@2
  1669
			KCapsCDMAOneHighSpeedDataSupported=0x00002000,	
williamr@2
  1670
			/** Service Option 33 or 34.
williamr@2
  1671
			
williamr@2
  1672
			Modes: CDMA2000 */
williamr@2
  1673
			KCapsCDMA2000HighSpeedDataSupported=0x00004000,	
williamr@2
  1674
			/** PPP protocol supported.
williamr@2
  1675
			
williamr@2
  1676
			Modes: CDMA2000 */
williamr@2
  1677
			KCapsProtocolPPPSupported=0x00008000,
williamr@2
  1678
			/** CDPD protocol supported
williamr@2
  1679
			
williamr@2
  1680
			Modes: CDMA2000 */
williamr@2
  1681
			KCapsProtocolCDPDSupported=0x00010000,
williamr@2
  1682
			KCapsPacketReleaseModeSupported=0x00020000,
williamr@2
  1683
			KCapsNotifyReleaseModeChangeSupported=0x00040000,
williamr@2
  1684
			
williamr@2
  1685
			/** The phone supports HSDPA
williamr@2
  1686
			
williamr@2
  1687
			Modes: WCDMA */
williamr@2
  1688
			KCapsHSDPASupported=0x00080000,
williamr@2
  1689
			
williamr@2
  1690
			/** The phone supports EGPRS
williamr@2
  1691
			
williamr@2
  1692
			Modes: GPRS/WCDMA */
williamr@2
  1693
			KCapsEGPRSSupported=0x00100000,
williamr@2
  1694
			
williamr@2
  1695
			/** The phone supports HSUPA
williamr@2
  1696
			
williamr@2
  1697
			Modes: WCDMA */
williamr@2
  1698
			KCapsHSUPASupported=0x00200000,
williamr@2
  1699
			/** The phone supports MBMS
williamr@2
  1700
			
williamr@2
  1701
			Modes: GPRS/WCDMA */
williamr@2
  1702
			KCapsMBMSSupported=0x00400000
williamr@2
  1703
			};
williamr@2
  1704
williamr@2
  1705
	IMPORT_C TInt GetStaticCaps(TUint& aCaps, RPacketContext::TProtocolType aPdpType) const;
williamr@2
  1706
williamr@2
  1707
	/** Dynamic capabilities.
williamr@2
  1708
williamr@2
  1709
	Modes: GPRS/CDMA */
williamr@2
  1710
	enum TDynamicCaps
williamr@2
  1711
		{
williamr@2
  1712
		// Common GPRS and CDMA caps
williamr@2
  1713
		/** Activate supported.
williamr@2
  1714
		
williamr@2
  1715
		Modes: GPRS/CDMA */
williamr@2
  1716
		KCapsActivate=0x00000001,
williamr@2
  1717
		/** Rx Circuit Switched call supported.
williamr@2
  1718
		
williamr@2
  1719
		Modes: GPRS/CDMA */
williamr@2
  1720
		KCapsRxCSCall=0x00000002,
williamr@2
  1721
		/** RX context activation request supported.
williamr@2
  1722
		
williamr@2
  1723
		Modes: GPRS/CDMA */
williamr@2
  1724
		KCapsRxContextActivationReq=0x00000004,
williamr@2
  1725
		// GPRS-specific caps
williamr@2
  1726
		/** Manual attach supported.
williamr@2
  1727
		
williamr@2
  1728
		Modes: GPRS */
williamr@2
  1729
		KCapsManualAttach=0x00000008,
williamr@2
  1730
		/** Manual detach supported.
williamr@2
  1731
		
williamr@2
  1732
		Modes: GPRS */
williamr@2
  1733
		KCapsManualDetach=0x00000010,
williamr@2
  1734
		/** SMS transfer supported.
williamr@2
  1735
		
williamr@2
  1736
		Modes: GPRS */
williamr@2
  1737
		KCapsSMSTransfer=0x00000020,
williamr@2
  1738
		// CDMA-specific caps
williamr@2
  1739
		/** Service Option (7,15) or (8,16).
williamr@2
  1740
		
williamr@2
  1741
		Modes: CDMA */
williamr@2
  1742
		KCapsCDMAOneLowSpeedDataAllowed=0x00000040,
williamr@2
  1743
		/** Service Option (22-25) or (26-29).
williamr@2
  1744
		
williamr@2
  1745
		Modes: CDMA */
williamr@2
  1746
		KCapsCDMAOneHighSpeedDataAllowed=0x00000080,
williamr@2
  1747
		/** Service Option 33 or 34.
williamr@2
  1748
		
williamr@2
  1749
		Modes: CDMA */
williamr@2
  1750
		KCapsCDMA2000HighSpeedDataAllowed=0x00000100,
williamr@2
  1751
		
williamr@2
  1752
		/** HSDPA is currently being used
williamr@2
  1753
		
williamr@2
  1754
		Modes: WCDMA */
williamr@2
  1755
		KCapsHSDPA=0x00000200,
williamr@2
  1756
		
williamr@2
  1757
		/** EGPRS is currently being used
williamr@2
  1758
		
williamr@2
  1759
		Modes: GPRS/WCDMA  */
williamr@2
  1760
		KCapsEGPRS=0x00000400,
williamr@2
  1761
		
williamr@2
  1762
		/** HSUPA is currently being used
williamr@2
  1763
		
williamr@2
  1764
		Modes: WCDMA */
williamr@2
  1765
		KCapsHSUPA=0x00000800,
williamr@2
  1766
		
williamr@2
  1767
		/** MBMS is currently being used
williamr@2
  1768
		
williamr@2
  1769
		Modes: GPRS/WCDMA */
williamr@2
  1770
		KCapsMBMS=0x00001000
williamr@2
  1771
		
williamr@2
  1772
		};
williamr@2
  1773
	
williamr@2
  1774
	/** Typedef to hold the RPacketService::TDynamicCaps. */
williamr@2
  1775
	typedef TUint TDynamicCapsFlags;
williamr@2
  1776
williamr@2
  1777
	IMPORT_C TInt GetDynamicCaps(TDynamicCapsFlags& aCaps) const;
williamr@2
  1778
	IMPORT_C void NotifyDynamicCapsChange(TRequestStatus& aStatus, TDynamicCapsFlags& aCaps) const;
williamr@2
  1779
williamr@2
  1780
	/** The preferred bearer. */
williamr@2
  1781
	enum TPreferredBearer
williamr@2
  1782
		{
williamr@2
  1783
		/** Packet Switched (PS) bearer preferred. */
williamr@2
  1784
		EBearerPacketSwitched,
williamr@2
  1785
		/** Circuit Switched (CS) bearer preferred. */
williamr@2
  1786
		EBearerCircuitSwitched
williamr@2
  1787
		};
williamr@2
  1788
williamr@2
  1789
	IMPORT_C void SetPreferredBearer(TRequestStatus& aStatus, TPreferredBearer aBearer) const;
williamr@2
  1790
	IMPORT_C TInt GetPreferredBearer(TPreferredBearer& aBearer) const;// Deprecated method.
williamr@2
  1791
	
williamr@2
  1792
	IMPORT_C void GetPreferredBearer(TRequestStatus& aStatus, TPreferredBearer& aBearer) const; // Recommended method variant
williamr@2
  1793
williamr@2
  1794
	/** Defines when the attachment to the GPRS network should occur.
williamr@2
  1795
williamr@2
  1796
	Modes: GPRS */
williamr@2
  1797
	enum TAttachMode
williamr@2
  1798
		{
williamr@2
  1799
		/** The phone will attach to the packet network whenever it can. */
williamr@2
  1800
		EAttachWhenPossible,// instruct phone stack to attach to packet network whenever it can
williamr@2
  1801
		/** The phone will attach to the packet network only when required (e.g. when activating 
williamr@2
  1802
		a connection). */
williamr@2
  1803
		EAttachWhenNeeded	// instruct phone stack to attach to network only when required
williamr@2
  1804
		};
williamr@2
  1805
williamr@2
  1806
	IMPORT_C TInt SetAttachMode(TAttachMode aMode) const;  // Deprecated method.
williamr@2
  1807
	IMPORT_C TInt GetAttachMode(TAttachMode& aMode) const; // Deprecated method.
williamr@2
  1808
	IMPORT_C TInt SetDefaultContextParams(const TDesC8& aPckg) const; // Deprecated method.
williamr@2
  1809
	IMPORT_C TInt GetDefaultContextParams(TDes8& aPckg) const; // Deprecated method.
williamr@2
  1810
williamr@2
  1811
	IMPORT_C void SetAttachMode(TRequestStatus& aStatus, TAttachMode aMode) const; // Recommended method variant
williamr@2
  1812
	IMPORT_C void GetAttachMode(TRequestStatus& aStatus, TAttachMode& aMode) const; // Recommended method variant
williamr@2
  1813
	IMPORT_C void NotifyAttachModeChange(TRequestStatus& aStatus, TAttachMode& aMode) const;
williamr@2
  1814
	IMPORT_C void SetDefaultContextParams(TRequestStatus& aStatus, const TDesC8& aPckg) const; // Recommended method variant
williamr@2
  1815
	IMPORT_C void GetDefaultContextParams(TRequestStatus& aStatus, TDes8& aPckg) const; // Recommended method variant
williamr@2
  1816
williamr@2
  1817
	enum TPacketReleaseMode
williamr@2
  1818
		{
williamr@2
  1819
		EReleaseModeUnknown,
williamr@2
  1820
		EReleaseModeUnregistered,
williamr@2
  1821
		EReleaseMode97_98,
williamr@2
  1822
		EReleaseMode99,
williamr@2
  1823
		EReleaseMode4,
williamr@2
  1824
		EReleaseModeCDMA2000
williamr@2
  1825
		};
williamr@2
  1826
williamr@2
  1827
	IMPORT_C void GetCurrentReleaseMode(TRequestStatus& aStatus, TPacketReleaseMode& aReleaseMode) const;
williamr@2
  1828
	IMPORT_C void NotifyReleaseModeChange(TRequestStatus& aStatus, TPacketReleaseMode& aReleaseMode) const;
williamr@2
  1829
williamr@2
  1830
	enum TContextType
williamr@2
  1831
		{
williamr@2
  1832
		EUnspecified,		///< Unspecified context type
williamr@2
  1833
		EInternalContext,	///< Internally created context
williamr@2
  1834
		EExternalContext	///< Externally created context
williamr@2
  1835
		};
williamr@2
  1836
williamr@2
  1837
	
williamr@2
  1838
	class TNifInfoV2 : public TPacketBase
williamr@2
  1839
	/**
williamr@2
  1840
	Rel99/R4 Network information class. This V2 class inherits from the 
williamr@2
  1841
	TPacketBase class to make it future proof (extensible).
williamr@2
  1842
	@publishedPartner
williamr@2
  1843
	@released
williamr@2
  1844
	*/
williamr@2
  1845
		{
williamr@2
  1846
	public:
williamr@2
  1847
		IMPORT_C TNifInfoV2();							///< Constructor
williamr@2
  1848
	public:
williamr@2
  1849
		TName iContextName;								///< The name of any defined context for this Network Interface
williamr@2
  1850
		TInt iNumberOfContexts;							///< Number of contexts belonging to the Network Interface
williamr@2
  1851
		RPacketContext::TContextStatus iNifStatus;		///< Status of the Network Interface
williamr@2
  1852
		RPacketContext::TProtocolAddress iPdpAddress;	///< PDP address of the interface
williamr@2
  1853
		TContextType iContextType;						///< Context type (internally or externally created)
williamr@2
  1854
		};
williamr@2
  1855
	typedef TPckg<TNifInfoV2> TNifInfoV2Pckg;			///< TNifInfoV2 package
williamr@2
  1856
williamr@2
  1857
	// Internal API/TSY struct, used by GetContextNameInNif() method
williamr@2
  1858
	struct TContextNameInNif
williamr@2
  1859
		{
williamr@2
  1860
		TInt iIndex;				///< Integer specifying a context within a Nif.
williamr@2
  1861
		TName iExistingContextName;	///< Existing Context name.
williamr@2
  1862
		};
williamr@2
  1863
williamr@2
  1864
	IMPORT_C void EnumerateNifs(TRequestStatus& aStatus, TInt& aCount) const;
williamr@2
  1865
	IMPORT_C void GetNifInfo(TRequestStatus& aStatus, TInt aIndex, TDes8& aNifInfoV2) const;
williamr@2
  1866
	IMPORT_C void EnumerateContextsInNif(TRequestStatus& aStatus, const TDesC& aExistingContextName, TInt& aCount) const;
williamr@2
  1867
	IMPORT_C void GetContextNameInNif(TRequestStatus& aStatus,  const TDesC& aExistingContextName, TInt aIndex, TDes& aContextName) const;
williamr@2
  1868
	IMPORT_C void DeactivateNIF(TRequestStatus& aStatus, const TDesC& aContextName) const;
williamr@2
  1869
williamr@2
  1870
////////////////////////////////////////////////////////
williamr@2
  1871
//
williamr@2
  1872
// MBMS Service Availability
williamr@2
  1873
//
williamr@2
  1874
////////////////////////////////////////////////////////
williamr@2
  1875
	
williamr@2
  1876
	class TMbmsServiceAvailabilityV1 : public TPacketType
williamr@2
  1877
	/**
williamr@2
  1878
	Holds the service availability parameters needed to register with TSY
williamr@2
  1879
	for the services to be monitored.
williamr@2
  1880
	
williamr@2
  1881
	@publishedPartner
williamr@2
  1882
	@released
williamr@2
  1883
	*/
williamr@2
  1884
		{
williamr@2
  1885
	public:	
williamr@2
  1886
		IMPORT_C TMbmsServiceAvailabilityV1();
williamr@2
  1887
	public:
williamr@2
  1888
		void InternalizeL(RReadStream& aStream);
williamr@2
  1889
		void ExternalizeL(RWriteStream& aStream) const;
williamr@2
  1890
	public:
williamr@2
  1891
		/** Input Parameter : Temporary Mobile Group Identity */
williamr@2
  1892
		TTmgi	iTmgi;
williamr@2
  1893
		
williamr@2
  1894
		/** Input Parameter : MBMS service mode */
williamr@2
  1895
		TMbmsServiceMode iMbmsServiceMode;
williamr@2
  1896
		
williamr@2
  1897
		/** Output Parameter : MBMS availability status */
williamr@2
  1898
		TMbmsAvailabilityStatus iMbmsAvailabilityStatus;
williamr@2
  1899
		
williamr@2
  1900
		/** Input Parameter : MBMS access bearer information */
williamr@2
  1901
		TMbmsScope iMbmsAccessBearer;
williamr@2
  1902
		};
williamr@2
  1903
	
williamr@2
  1904
	//Packaged version of TMbmsServiceAvailabilityV1, used when this structure has to be passed via IPC.
williamr@2
  1905
	typedef TPckg<TMbmsServiceAvailabilityV1> TMbmsServiceAvailabilityV1Pckg;
williamr@2
  1906
		
williamr@2
  1907
	IMPORT_C void NotifyMbmsServiceAvailabilityChange(TRequestStatus& aReqStatus) const;
williamr@2
  1908
	IMPORT_C void UpdateMbmsMonitorServiceListL (TRequestStatus& aReqStatus, const TMbmsAction aAction, CPcktMbmsMonitoredServiceList* aList = NULL) const;		
williamr@2
  1909
	IMPORT_C void GetMbmsNetworkServiceStatus(TRequestStatus& aStatus, TBool aAttemptAttach, TMbmsNetworkServiceStatus& aServiceStatus) const;
williamr@2
  1910
	IMPORT_C void NotifyMbmsNetworkServiceStatusChange(TRequestStatus& aStatus, TMbmsNetworkServiceStatus& aServiceStatus) const;
williamr@2
  1911
	IMPORT_C void EnumerateMbmsMonitorServiceList(TRequestStatus& aStatus, TInt& aCount, TInt& aMaxAllowed) const;
williamr@2
  1912
	IMPORT_C void EnumerateMbmsActiveServiceList(TRequestStatus& aStatus, TInt& aCount, TInt& aMaxAllowed) const;
williamr@2
  1913
protected:
williamr@2
  1914
	IMPORT_C virtual void ConstructL();
williamr@2
  1915
	IMPORT_C virtual void Destruct();
williamr@2
  1916
private:
williamr@2
  1917
	TInt PrepareOpenSecondary(const TDesC& aOriginalContextName); ///< Internal method, not for Client use
williamr@2
  1918
	CPacketPtrHolder* iEtelPacketPtrHolder;
williamr@2
  1919
	RMutex iMutex;   ///< Internal mutex, used to prevent concurent use of PrepareOpenSecondary() and OpenNewContext()
williamr@2
  1920
	};
williamr@2
  1921
	
williamr@2
  1922
#include <etelpckt.inl>
williamr@2
  1923
#endif