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