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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // ETel Multimode Packet Data API
15 // MBMS Broadcast,GPRS Release 97/98, CDMAOne, CDMA2000, Release 99 and Release 4.
19 #if !defined(__ETELPCKT_H__)
20 #define __ETELPCKT_H__
27 #include <etelutils.h>
28 #include <mbmstypes.h>
31 // Global constants and types
35 // Passed into RTelServer::IsSupportedByModule()
37 Unique Packet Data API Identifier for Packet API version 1.0.
42 const TInt KETelExtPcktV1 = 4000;
44 Unique Packet Data API Identifier for Packet API version 2.0.
50 const TInt KETelExtPcktV2 = 8000;
54 Unique Packet Data API Identifier for Packet API version 3.0.
55 aka 3GPP Release 5 support
60 const TInt KETelExtPcktV3 = 12000;
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.
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.
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.
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.
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.
101 const TInt KErrGprsMSCTemporarilyNotReachable=KErrGsmMobilityManagementBase-16;
102 /** The PDP context is deactivated because of a LLC or SNDCP failure.
107 const TInt KErrGprsLlcOrSndcpFailure=KErrGsmMobilityManagementBase-25;
108 /** Insufficient GPRS resources are available for the request to complete successfully.
113 const TInt KErrGprsInsufficientResources=KErrGsmMobilityManagementBase-26;
114 /** Access Point Name is either missing from the Activation request or is unknown.
119 const TInt KErrGprsMissingorUnknownAPN=KErrGsmMobilityManagementBase-27;
120 /** The PDP address supplied with the Activation request is unknown.
125 const TInt KErrGprsUnknownPDPAddress=KErrGsmMobilityManagementBase-28;
126 /** User authentication has failed.
131 const TInt KErrGprsUserAuthenticationFailure=KErrGsmMobilityManagementBase-29;
132 /** The GGSN has rejected the activation request for some reason.
137 const TInt KErrGprsActivationRejectedByGGSN=KErrGsmMobilityManagementBase-30;
138 /** The activation request has been rejected for an unspecified reason.
143 const TInt KErrGprsActivationRejected=KErrGsmMobilityManagementBase-31;
144 /** The requested service is not supported by the PLMN.
149 const TInt KErrGprsServiceOptionNotSupported=KErrGsmMobilityManagementBase-32;
150 /** There is no active subscription to the requested service.
155 const TInt KErrGprsRequestedServiceOptionNotSubscribed=KErrGsmMobilityManagementBase-33;
156 /** The service is temporarily out of order.
161 const TInt KErrGprsServiceOptionTemporarilyOutOfOrder=KErrGsmMobilityManagementBase-34;
162 /** The NSAPI supplied with the activation request is not unique.
167 const TInt KErrGprsNSAPIAlreadyUsed=KErrGsmMobilityManagementBase-35;
168 /** The context has been deactivated successfully.
173 const TInt KErrGprsRegularContextDeactivation=KErrGsmMobilityManagementBase-36;
174 /** The Quality of Service requested has not been accepted.
179 const TInt KErrGprsQoSNotAccepted=KErrGsmMobilityManagementBase-37;
180 /** The GPRS network is requesting reactivation of a context.
185 const TInt KErrGprsReactivationRequested=KErrGsmMobilityManagementBase-39;
186 /** The feature is not supported.
191 const TInt KErrGprsFeatureNotSupported=KErrGsmMobilityManagementBase-40;
192 /** There is a semantic error in the TFT operation.
197 const TInt KErrGprsSemanticErrorInTFTOperation=KErrGsmMobilityManagementBase-41;
198 /** There is a syntactical error in the TFT operation.
203 const TInt KErrGprsSyntacticalErrorInTFTOperation=KErrGsmMobilityManagementBase-42;
204 /** The PDP context activation request is not active.
209 const TInt KErrGprsUnknownPDPContext=KErrGsmMobilityManagementBase-43;
210 /** There is one or more semantic errors in packet filter(s) of the TFT.
215 const TInt KErrGprsSemanticErrorsInPacketFilters=KErrGsmMobilityManagementBase-44;
216 /** There is one or more syntactical errors in packet filter(s) of the TFT.
221 const TInt KErrGprsSyntacticalErrorInPacketFilters=KErrGsmMobilityManagementBase-45;
222 /** The GPRS network has already activated a PDP context without TFT.
227 const TInt KErrGprsPDPContextWithoutTFTAlreadyActivated=KErrGsmMobilityManagementBase-46;
229 // UMTS-specific cause values for Call control (Annex H, 3GPP TS 24.008)
230 /** QoS not available.
235 const TInt KErrUmtsQoSNotAvailable=KErrGsmMobilityManagementBase-49;
237 /** Maximum number of PDP contexts supported by phone exceeded.
242 const TInt KErrUmtsMaxNumOfContextExceededByPhone=KErrGsmMobilityManagementBase-50;
243 /** Maximum number of PDP contexts supported by the network exceeded.
248 const TInt KErrUmtsMaxNumOfContextExceededByNetwork=KErrGsmMobilityManagementBase-51;
249 /** Phone is in offline mode.
254 const TInt KErrGprsOfflineMode=KErrGsmMobilityManagementBase-52;
256 * MBMS network support does not exist.
260 const TInt KErrMbmsNotSupported=KErrGsmMobilityManagementBase-53;
262 * Specific MBMS service is not available.
266 const TInt KErrMbmsServiceUnavailable=KErrGsmMobilityManagementBase-54;
268 * Preempts low priority MBMS/Non-MBMS service.
272 const TInt KErrMbmsServicePreempted=KErrGsmMobilityManagementBase-55;
274 * One or more invalid MBMS service entry supplied.
278 const TInt KErrMbmsImpreciseServiceEntries=KErrGsmMobilityManagementBase-56;
280 class TPacketDataConfigBase
281 /** Base class for the packet configuration classes.
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.
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.
296 @see RPacketContext::TContextConfigCDMA
297 @see RPacketContext::TContextConfigR99_R4
298 @see RPacketContext::TContextConfig_R5
299 @see RPacketContext::TContextConfigMbmsV1
308 Flags identifying the different packet networks.
313 GPRS Release 97/98 packet network.
317 CDMA and CDMA2000 packet networks.
321 GPRS/UMTS Release 99 and UMTS Release 4 networks.
323 KConfigRel99Rel4 = 0x04,
325 UMTS/IMS 3GPP Release 5 networks.
334 /** This member returns the type of class.
336 @return The type of class. */
337 inline TInt ExtensionId(){return iExtensionId;};
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)
346 class TConnectionInfoBase
347 /** Base class for the configuration info classes. It is outside the scope of
348 all the Packet data classes.
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.
358 @see RPacketContext::TConnectionInfoV1
366 Flags identifying the different connection information structures
371 Connection information version 1.
373 KConnectionInfoV1 = 0x01
376 /** Return the type of class.
378 @return The version of class.
380 inline TInt ExtensionId(){return iExtensionId;};
383 /** A bit-wise sum of TConnectionInfoFlags indicating which of the optional
384 fields contain valid data. */
388 /** Defines the type of class. */
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
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
409 IMPORT_C TInt ExtensionId() const;
412 TInt iExtensionId; ///< Extension identifier
417 Base class for all the V1 parameter types.
424 IMPORT_C TInt ExtensionId() const;
427 void InternalizeL(RReadStream& aStream);
428 void ExternalizeL(RWriteStream& aStream) const;
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. */
439 /** The handle to the underlying RTelServer session. */
441 /** The handle to the sub-session to which this API request relates. */
442 TInt iSubSessionHandle;
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.
451 The functionality associated with the context of a packet-switched connection
452 (configuring, modifying, activating, etc) are encapsulated within this class.
454 Each instance of this class has an RPacketService parent, to which it belongs.
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();
466 // Nested classes dealing with context configurations for each network type
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};
472 KPdpDataCompression = 0x01,
473 KPdpHeaderCompression = 0x02
476 /** Buffer to hold the GSN address.
478 @see KGSNNameLength */
479 typedef TBuf8<KGSNNameLength> TGSNAddress; ///< GPRS Support Node (GSN) name
480 /** Buffer to hold the protocol address.
482 @see KMaxPDPAddressLength */
483 typedef TBuf8<KMaxPDPAddressLength> TProtocolAddress; ///< GPRS Rel97/98, CDMA, Rel99 and Rel4.
486 // TProtocolType - defines the protocol used to connect to the packet data gateway
488 /** Defines the protocol used to connect to the packet data gateway.
493 /** IPv4 type gateway.
497 /** IPv6 type gateway.
501 /** X.25 type gateway.
505 /** PPP type gateway.
509 /** CDPD type gateway.
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.
519 /** Service option numbers identify the various packet data services available
520 on the CDMA packet network.
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
533 /** Anonymous access required.
536 enum TAnonymousAccess
538 /** Anonymous access not applicable.
542 /** Anonymous access required.
546 /** Anonymous access not required.
552 enum { KMaxAuthDataLength = 50 };
553 /** Buffer for various sorts of authorisation data since version 2 of the API.
555 Supported from v7.0S.
557 typedef TBuf8<KMaxAuthDataLength> TAuthData;
560 // TAuthProtocol - this enables the client to set the protocol type used on the context
570 // TAuthInfo - this enables the client to set the authentication data used on the context
574 TAuthProtocol iProtocol;
580 // TDnsInfoV2 - this class enables the client to set the primary and secondary DNS server
581 // names used on the context
583 class TDnsInfoV2 : public TPacketBase
585 Enables the client to set the primary and secondary DNS server
586 names used on the context since version 2 of the API.
588 Supported from v7.0S.
595 IMPORT_C TDnsInfoV2();
597 /** Primary DNS server name.*/
598 TProtocolAddress iPrimaryDns;
599 /** Secondary DNS server name.*/
600 TProtocolAddress iSecondaryDns;
603 DNS information package since version 2 of the API.
605 Supported from v7.0S.
607 typedef TPckg<TDnsInfoV2> TTDnsInfoV2Pckg;
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).
616 enum {KMiscProtocolBufferLength = 253};
617 typedef TBuf8<KMiscProtocolBufferLength> TMiscProtocolBuffer;
619 class TProtocolConfigOptionV2 : public TPacketBase
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
626 Can contain the DNS server names, the username, password,
627 and CHAP associated data.
629 Normal authentication uses only TAuthInfo::iUsername and
630 TAuthInfo::iPassword. The other parameters are for secure
633 The maximum combined length of the TAuthInfo::iUsername
634 and the secure information (iPassword or iResponse) is 50 bytes.
636 Rather than keep the Protocol Config Option as a buffer it
637 is encapsulated as a class. This enables data extraction to
640 Supported from v7.0S.
647 IMPORT_C TProtocolConfigOptionV2();
649 /** Authentication data.*/
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.*/
656 /** A one byte identifier that is chosen by the client.*/
658 /** Primary and secondary DNS server names since version 2
660 TDnsInfoV2 iDnsAddresses;
661 TMiscProtocolBuffer iMiscBuffer;
665 class TContextConfigGPRS : public TPacketDataConfigBase
667 Context configurations for GPRS packet data support.
669 Contains all the data necessary to configure a context on a GPRS network or
677 IMPORT_C TContextConfigGPRS();
679 /** The GPRS protocol type. The default value is EpdpTypeIPv4.
681 @see TProtocolType */
682 TProtocolType iPdpType;
683 /** The GPRS Access point name. The default value is an empty string.
686 TGSNAddress iAccessPointName;
687 /** The GPRS protocol address. The default value is an empty string.
689 @see TProtocolAddress */
690 TProtocolAddress iPdpAddress;
691 /** The GRPS compression. This is a bit-wise sum of the wanted compression. The
694 @see KPdpDataCompression
695 @see KPdpHeaderCompression */
696 TUint iPdpCompression;
697 /** Anonymous access requested. The default value is ENotRequired.
699 @see TAnonymousAccess */
700 TAnonymousAccess iAnonymousAccessReqd;
701 /** Use Edge. The default value is EFalse. True for EGPRS.*/
703 /** Protocol configuration options for version 2 of the API.
705 Supported from v7.0S.*/
706 TProtocolConfigOptionV2 iProtocolConfigOption;
707 /** Network initiated context indication. */
713 Identifiers for Packet Flow Context. See Table 10.5.161/3GPP TS 24.008.
715 enum TPacketFlowIdentifier
731 class TContextConfigR99_R4 : public TPacketDataConfigBase
733 Enables Release 99 and Release 4 context configuration for version 2 of
736 Contains all the data necessary to configure a context on a R99/R4 packet
739 Supported from v7.0S.
746 IMPORT_C TContextConfigR99_R4();
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.*/
756 /** Protocol configuration options.*/
757 TProtocolConfigOptionV2 iProtocolConfigOption;
758 TBool iNWIContext; // Network initiated context indication.
759 TPacketFlowIdentifier iPFI; // Packet Flow indicator.
762 class TContextConfigCDMA : public TPacketDataConfigBase
764 Enables context configurations for CDMA and CDMA2000 packet data
765 and high speed packet data support.
767 Contains all the data necessary to configure a context on a CDMA packet
775 IMPORT_C TContextConfigCDMA();
777 /** Identifies the CDMA packet service option range (Low, High, High CDMA2000).
778 The default value is KLowSpeedData.
780 @see TServiceOption */
781 TUint iServiceOption;
782 /** The CDMA protocol type, either PPP or CDPD. The default value is EPdpTypePPP.
784 @see TProtocolType */
785 TProtocolType iProtocolType;
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;
803 /** Current status is unknown. */
805 /** Context is not activated. */
807 /** Context is currently being activated. */
809 /** Context is active. */
811 /** Context is currently being deactivated. */
813 /** Context is suspended. */
815 /** Context has been deleted. */
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 */
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;
829 /** Holds the amount of sent and received data.
831 The total number of bytes sent is: iOverflowCounterSent*(2^32)+iOverflowCounterSent */
834 /** Overflow counter for the bytes sent.
836 The total number of bytes sent is: iOverflowCounterSent*(2^32)+iOverflowCounterSent */
837 TUint32 iOverflowCounterSent;
838 /** The number of bytes received.
840 The total number of bytes received is: iOverflowCounterReceived*(2^32)+iOverflowCounterReceived */
841 TUint32 iBytesReceived;
842 /** Overflow counter for the bytes received.
844 The total number of bytes received is: iOverflowCounterReceived*(2^32)+iOverflowCounterReceived */
845 TUint32 iOverflowCounterReceived;
848 struct TNotifyDataTransferredRequest
850 TUint iRcvdGranularity;
851 TUint iSentGranularity;
855 Determines which fields in the TConnectionInfoXXX parameter class are valid.
857 @see TConnectionInfoV1
859 enum TConnectionInfoFlags
861 /** The HSDPA category field is valid in the connection info class.
864 KHSDPACategory = 0x00000001,
866 /** The HSUPA category field is valid in the connection info class.
869 KHSUPACategory = 0x00000002
872 class TConnectionInfoV1 : public TConnectionInfoBase
874 Connection info class is used to carry miscellaneous information about data connection.
876 Contains all kind of packet data connection related information that is useful for
886 IMPORT_C TConnectionInfoV1();
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;
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;
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
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
909 IMPORT_C TInt GetLastErrorCause(TInt& aError) const;
911 IMPORT_C void GetDataVolumeTransferred(TRequestStatus& aStatus, TDataVolume& aVolume) const; // Recommended method variant.
913 class TDataChannelV2 : public TPacketBase
915 Contains data channel parameters.
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.
922 It is passed as a packaged parameter to RPacketContext::InitialiseContext().
929 IMPORT_C TDataChannelV2();
932 @deprecated Data previously used by LoanDataPort() in version 1 of the API.*/
935 @deprecated Data previously used by LoanDataPort(). */
938 The Channel name information returned by the lower layers (Nif). */
942 Data channel package since version 2 of the API.
944 Supported from v7.0S.
946 typedef TPckg<TDataChannelV2> TDataChannelV2Pckg;
948 IMPORT_C void InitialiseContext(TRequestStatus& aStatus, TDes8& aDataChannelV2Pckg) const; // This method supersedes the LoanCommPort() and RecoverCommPort() methods.
950 enum {KIPAddressSize = 16}; ///< TIPAddress size
952 Array to hold either IPv4 or IPv6 address or Subnet mask since version 2 of the API.
954 Supported from v7.0S.
956 typedef TUint8 TIPAddress[KIPAddressSize];
959 class TPacketFilterV2 : public TPacketBase
961 Packet filter package since version 2 of the API.
963 Contains member data compatible with parameters required for configuring
964 a packet filter on a Rel99/R4 packet network.
966 Inherits from the TPacketBase class to make it future
969 Supported from v7.0S.
977 IMPORT_C TPacketFilterV2();
979 /** Packet filter identifier. Value range: 1 - 8.*/
981 /** Evaluation Precedence Index. Value range: 255 (lowest) - 0 (highest).*/
982 TInt iEvaluationPrecedenceIndex;
983 /** Domain Source address.*/
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.*/
992 /** Maximum source port number of incoming packets. Value range 0 - 65535.*/
994 /** Lowest destination port number of incoming packets. Value range 0 - 65535.*/
996 /** Maximum destination port number of incoming packets. Value range 0 - 65535.*/
998 /** Security Parameter Index, 32-bit field.*/
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.*/
1007 /** Packaged TPacketFilterV2.*/
1008 typedef TPckg<TPacketFilterV2> TPacketFilterV2Pckg;
1012 Maximum length of DNS Fully Qualified Domain Name (RFC 1123)
1021 typedef TBuf8<KMaxFQDNLength> TAuthorizationToken;
1024 Packet Filter type identifier.
1029 enum TPacketFilterType
1031 /** Unknown filter type.*/
1032 EPacketFilterTypeUnknown,
1033 /** Filter Type One.*/
1034 EPacketFilterTypeOne,
1035 /** Filter Type Two.*/
1036 EPacketFilterTypeTwo,
1037 /** Filter Type Three.*/
1038 EPacketFilterTypeThree,
1041 class TPacketFilterV3 : public TPacketFilterV2
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. .
1047 Inherits from the TPacketFilterV2 class.
1056 IMPORT_C TPacketFilterV3(TPacketFilterType aType);
1057 IMPORT_C TPacketFilterV3();
1058 enum TPacketFilterDataBitmapPos
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,
1082 inline TBool IsPresent(TPacketFilterDataBitmapPos aDataMemberBitmapPos);
1083 inline void Reset(TPacketFilterDataBitmapPos aDataMemberBitmapPos);
1084 inline void Reset();
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;
1093 IMPORT_C TBool SetSrcAddr(TIPAddress &aSrcAddr);
1094 IMPORT_C TBool SetSrcAddrSubnetMask(TIPAddress &aSrcAddrSubnetMask);
1096 IMPORT_C TBool SetProtocolNumberOrNextHeader(TInt aProtocolNumberOrNextHeader);
1098 IMPORT_C TBool SetSrcPortMin(TInt aSrcPortMin);
1099 IMPORT_C TBool SetSrcPortMax(TInt aSrcPortMax);
1101 IMPORT_C TBool SetDestPortMin(TInt aDestPortMin);
1102 IMPORT_C TBool SetDestPortMax(TInt aDestPortMax);
1104 IMPORT_C TBool SetSPI(TUint32 aIPSecSPI);
1106 IMPORT_C TBool SetTOSorTrafficClass(TUint16 aTOSorTrafficClass);
1107 IMPORT_C TBool SetFlowLabel(TUint32 aFlowLabel);
1112 /** Return the Domain Source address.
1114 @return Domain Source address.
1116 inline const TIPAddress& SrcAddr()
1121 /** Return the Domain Subnet mask.
1123 @return Domain Subnet mask.
1125 inline const TIPAddress& SrcAddrSubnetMask()
1127 return iSrcAddrSubnetMask;
1130 inline TInt ProtocolNumberOrNextHeader();
1132 inline TInt SrcPortMin();
1133 inline TInt SrcPortMax();
1135 inline TInt DestPortMin();
1136 inline TInt DestPortMax();
1138 inline TUint32 SPI();
1140 inline TUint16 TOSorTrafficClass();
1141 inline TUint32 FlowLabel();
1143 /** Initialised in the constructor - type can be I, II or III
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.
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.
1153 TUint16 iPresentDataBitmap;
1155 /** Packaged TPacketFilterV3.*/
1156 typedef TPckg<TPacketFilterV3> TPacketFilterV3Pckg;
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.
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()).
1170 class CTFTMediaAuthorizationV3 : public CBase
1173 IMPORT_C ~CTFTMediaAuthorizationV3();
1174 IMPORT_C static CTFTMediaAuthorizationV3* NewL();
1176 IMPORT_C virtual void ExternalizeL(HBufC8*& aBuffer) const;
1177 IMPORT_C virtual void InternalizeL(TDes8& aBuffer);
1178 IMPORT_C TUint ExtensionId()const;
1181 /** Flow identifier */
1182 struct TFlowIdentifier
1184 /** Media component number. */
1185 TUint16 iMediaComponentNumber;
1186 /** IP flow number. */
1187 TUint16 iIPFlowNumber;
1189 /** Authorization token */
1190 TAuthorizationToken iAuthorizationToken;
1191 /** List of flow identifiers authorization token is granted for*/
1192 RArray<TFlowIdentifier> iFlowIds;
1194 CTFTMediaAuthorizationV3();
1198 IMPORT_C void AddMediaAuthorizationL(TRequestStatus& aStatus, CTFTMediaAuthorizationV3& aMediaAuthorization) const;
1199 IMPORT_C void RemoveMediaAuthorization(TRequestStatus& aStatus, TAuthorizationToken& aAuthorizationToken) const;
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;
1214 Protocol identifiers, as defined in 24.008, section 10.5.6.3
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
1229 PCO additional parameter identifiers in MS to network direction, as defined in 3GPP TS 24.008, section 10.5.6.3
1231 enum TPcoIDMSToNetwork
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,
1244 PCO additional parameter identifiers in network to MS direction, as defined in 3GPP TS 24.008, section 10.5.6.3
1246 enum TPcoIDNetworkToMS
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,
1260 Helper class that implements PCO IE identifier.
1265 class TPcoId : public MTlvItemIdType
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;
1282 Helper class that implements PCO IE identifier length.
1287 class TPcoItemDataLength: public MTlvItemDataLengthType
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;
1298 /** length of associated item data*/
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.
1309 enum TDataCompression
1316 Compression algorithm preferred by the device manufacturer
1318 EManufacturerDefaultDataCompression,
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.
1336 enum THeaderCompression
1341 ENoHeaderCompression,
1343 Compression algorithm preferred by the device manufacturer
1345 EManufacturerDefaultHeaderCompression,
1347 Compression algorithm defined in RFC 1144
1351 Compression algorithm defined in RFC 2507
1355 Robust header compression algorithm defined in RFC 3095
1360 class TContextConfig_R5 : public TContextConfigR99_R4
1362 Reintroduces support for setting of header/data compression in SNDCP & PDCP
1363 Supported from v9.1.
1369 IMPORT_C TContextConfig_R5();
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.
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.
1381 TDataCompression iPdpDataCompression;
1385 IMPORT_C virtual void ConstructL();
1386 IMPORT_C virtual void Destruct();
1388 CPacketContextPtrHolder* iEtelPacketContextPtrHolder;
1391 ///////////////////////////////////////////////////////////////////
1393 ///////////////////////////////////////////////////////////////////
1394 class RPacketMbmsContext : public RPacketContext
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.
1408 IMPORT_C RPacketMbmsContext();
1409 IMPORT_C TInt OpenNewContext(RPacketService& aPacketNetwork, TDes& aContextName);
1410 IMPORT_C void Close();
1411 friend class CRetrievePcktMbmsSessionList;
1413 class TContextConfigMbmsV1: public TPacketDataConfigBase
1415 Context configurations for MBMS support.
1417 Contains all the data necessary to configure a context on a MBMS network.
1419 @see RPacketContext::SetConfig()
1426 IMPORT_C TContextConfigMbmsV1();
1428 /** Input parameter : Temporary mobile group identity
1429 * A unique name to an MBMS service
1433 /** Input Parameter : MBMS access bearer information
1436 TMbmsScope iMbmsAccessBearer;
1438 /** Input parameter : MBMS service priority options
1439 * Specifies the priority of the MBMS service to be received.
1440 * @see TMbmsServicePriority
1442 TMbmsServicePriority iMbmsServicePriority;
1444 /** Input parameter : MBMS service mode
1445 * @see TMbmsServiceMode
1447 TMbmsServiceMode iMbmsServiceMode;
1449 /** Input parameter : MBMS session flag
1450 * ETrue indicates that an MBMS service has one or more sessions.
1452 TBool iMbmsSessionFlag;
1456 //Packaged version of TContextConfigMbmsV1, used when this structure has to be passed via IPC.
1457 typedef TPckg<TContextConfigMbmsV1> TContextConfigMbmsV1Pckg;
1459 IMPORT_C void UpdateMbmsSessionList(TRequestStatus& aStatus,const TMbmsAction aAction, const TMbmsSessionId aSessionId = 0) const;
1461 class CMbmsSession : public CBase
1463 * Captures the list of session(s) of an MBMS service.
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();
1477 * Contains the list of sessions pertaining to the MBMS service.
1479 TMbmsSessionIdList iSessionIdList;
1481 * Defines the type of the class
1490 class CPacketPtrHolder;
1491 class CPcktMbmsMonitoredServiceList;
1492 class RPacketService : public RTelSubSessionBase
1494 Defines a packet-switched connection to a packet network.
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.
1504 IMPORT_C RPacketService();
1505 IMPORT_C TInt Open(RPhone& aPhone);
1506 IMPORT_C void Close();
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;
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);
1516 friend class CRetrievePcktMbmsMonitoredServices;
1518 /** Defines the packet data connection status. */
1521 /** Unattached to network and inactive packet data connection. */
1523 /** Attached to network and inactive packet data connection. */
1525 /** Attached to network and active packet data connection. */
1527 /** Attached to network and suspended packet data connection. */
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;
1537 /** Struct to contain the context information.
1539 @see GetContextInfo() */
1541 /** The name of the context.
1545 /** The current status of the context.
1547 @see RPacketContext::TContextStatus */
1548 RPacketContext::TContextStatus iStatus;
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;
1555 // Packet Network Registration and Availability
1557 /** Packet Network Registration/Availability. */
1558 enum TRegistrationStatus
1560 /** Not registered and not searching for a network. A network may or may not be
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. */
1571 /** Registered on foreign network. */
1573 /** Not registered or searching, but network available. */
1574 ENotRegisteredButAvailable,
1575 /** Not registered or searching, and network not available. */
1576 ENotRegisteredAndNotAvailable
1579 IMPORT_C void GetNtwkRegStatus(TRequestStatus& aStatus, TRegistrationStatus& aRegistrationStatus) const;
1580 IMPORT_C void NotifyChangeOfNtwkRegStatus(TRequestStatus& aStatus,TRegistrationStatus& aRegistrationStatus) const;
1582 /** MS class configuration. */
1585 /** Active simultaneous PS and CS calls supported (Class A). */
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 */
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;
1603 /** Static capabilities.
1606 enum TStaticMiscCaps
1611 /** Suspend supported.
1614 KCapsSuspendSupported=0x0001,
1615 /** Anonymous Access supported.
1618 KCapsAASupported=0x0002,
1619 /** Network availability supported.
1622 KCapsNetworkAvailabilitySupported=0x0004,
1623 /** Set default context supported.
1626 KCapsSetDefaultContextSupported=0x0008,
1627 /** Change attach mode supported.
1630 KCapsChangeAttachModeSupported=0x0010,
1631 /** Get data transferred supported.
1634 KCapsGetDataTransferredSupported=0x0020,
1635 /** Notify data transferred supported
1638 KCapsNotifyDataTransferredSupported=0x0040,
1639 /** Preferred bearer supported.
1642 KCapsPreferredBearerSupported=0x0080,
1643 /** PDP data compression supported.
1646 KCapsPdpDataCompSupported=0x0100,
1647 /** PDP header compression supported
1650 KCapsPdpHeaderCompSupported=0x0200,
1651 /** MS class supported.
1654 KCapsMSClassSupported=0x0400,
1655 /** Notify MS class changes supported.
1658 KCapsNotifyMSClassSupported=0x0800,
1662 /** Service Option (7,15) or (8,16).
1665 KCapsCDMAOneLowSpeedDataSupported=0x00001000,
1666 /** Service Option (22-25) or (26-29).
1669 KCapsCDMAOneHighSpeedDataSupported=0x00002000,
1670 /** Service Option 33 or 34.
1673 KCapsCDMA2000HighSpeedDataSupported=0x00004000,
1674 /** PPP protocol supported.
1677 KCapsProtocolPPPSupported=0x00008000,
1678 /** CDPD protocol supported
1681 KCapsProtocolCDPDSupported=0x00010000,
1682 KCapsPacketReleaseModeSupported=0x00020000,
1683 KCapsNotifyReleaseModeChangeSupported=0x00040000,
1685 /** The phone supports HSDPA
1688 KCapsHSDPASupported=0x00080000,
1690 /** The phone supports EGPRS
1692 Modes: GPRS/WCDMA */
1693 KCapsEGPRSSupported=0x00100000,
1695 /** The phone supports HSUPA
1698 KCapsHSUPASupported=0x00200000,
1699 /** The phone supports MBMS
1701 Modes: GPRS/WCDMA */
1702 KCapsMBMSSupported=0x00400000
1705 IMPORT_C TInt GetStaticCaps(TUint& aCaps, RPacketContext::TProtocolType aPdpType) const;
1707 /** Dynamic capabilities.
1712 // Common GPRS and CDMA caps
1713 /** Activate supported.
1716 KCapsActivate=0x00000001,
1717 /** Rx Circuit Switched call supported.
1720 KCapsRxCSCall=0x00000002,
1721 /** RX context activation request supported.
1724 KCapsRxContextActivationReq=0x00000004,
1725 // GPRS-specific caps
1726 /** Manual attach supported.
1729 KCapsManualAttach=0x00000008,
1730 /** Manual detach supported.
1733 KCapsManualDetach=0x00000010,
1734 /** SMS transfer supported.
1737 KCapsSMSTransfer=0x00000020,
1738 // CDMA-specific caps
1739 /** Service Option (7,15) or (8,16).
1742 KCapsCDMAOneLowSpeedDataAllowed=0x00000040,
1743 /** Service Option (22-25) or (26-29).
1746 KCapsCDMAOneHighSpeedDataAllowed=0x00000080,
1747 /** Service Option 33 or 34.
1750 KCapsCDMA2000HighSpeedDataAllowed=0x00000100,
1752 /** HSDPA is currently being used
1755 KCapsHSDPA=0x00000200,
1757 /** EGPRS is currently being used
1759 Modes: GPRS/WCDMA */
1760 KCapsEGPRS=0x00000400,
1762 /** HSUPA is currently being used
1765 KCapsHSUPA=0x00000800,
1767 /** MBMS is currently being used
1769 Modes: GPRS/WCDMA */
1770 KCapsMBMS=0x00001000
1774 /** Typedef to hold the RPacketService::TDynamicCaps. */
1775 typedef TUint TDynamicCapsFlags;
1777 IMPORT_C TInt GetDynamicCaps(TDynamicCapsFlags& aCaps) const;
1778 IMPORT_C void NotifyDynamicCapsChange(TRequestStatus& aStatus, TDynamicCapsFlags& aCaps) const;
1780 /** The preferred bearer. */
1781 enum TPreferredBearer
1783 /** Packet Switched (PS) bearer preferred. */
1784 EBearerPacketSwitched,
1785 /** Circuit Switched (CS) bearer preferred. */
1786 EBearerCircuitSwitched
1789 IMPORT_C void SetPreferredBearer(TRequestStatus& aStatus, TPreferredBearer aBearer) const;
1790 IMPORT_C TInt GetPreferredBearer(TPreferredBearer& aBearer) const;// Deprecated method.
1792 IMPORT_C void GetPreferredBearer(TRequestStatus& aStatus, TPreferredBearer& aBearer) const; // Recommended method variant
1794 /** Defines when the attachment to the GPRS network should occur.
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
1803 EAttachWhenNeeded // instruct phone stack to attach to network only when required
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.
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
1817 enum TPacketReleaseMode
1819 EReleaseModeUnknown,
1820 EReleaseModeUnregistered,
1824 EReleaseModeCDMA2000
1827 IMPORT_C void GetCurrentReleaseMode(TRequestStatus& aStatus, TPacketReleaseMode& aReleaseMode) const;
1828 IMPORT_C void NotifyReleaseModeChange(TRequestStatus& aStatus, TPacketReleaseMode& aReleaseMode) const;
1832 EUnspecified, ///< Unspecified context type
1833 EInternalContext, ///< Internally created context
1834 EExternalContext ///< Externally created context
1838 class TNifInfoV2 : public TPacketBase
1840 Rel99/R4 Network information class. This V2 class inherits from the
1841 TPacketBase class to make it future proof (extensible).
1847 IMPORT_C TNifInfoV2(); ///< Constructor
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)
1855 typedef TPckg<TNifInfoV2> TNifInfoV2Pckg; ///< TNifInfoV2 package
1857 // Internal API/TSY struct, used by GetContextNameInNif() method
1858 struct TContextNameInNif
1860 TInt iIndex; ///< Integer specifying a context within a Nif.
1861 TName iExistingContextName; ///< Existing Context name.
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;
1870 ////////////////////////////////////////////////////////
1872 // MBMS Service Availability
1874 ////////////////////////////////////////////////////////
1876 class TMbmsServiceAvailabilityV1 : public TPacketType
1878 Holds the service availability parameters needed to register with TSY
1879 for the services to be monitored.
1886 IMPORT_C TMbmsServiceAvailabilityV1();
1888 void InternalizeL(RReadStream& aStream);
1889 void ExternalizeL(RWriteStream& aStream) const;
1891 /** Input Parameter : Temporary Mobile Group Identity */
1894 /** Input Parameter : MBMS service mode */
1895 TMbmsServiceMode iMbmsServiceMode;
1897 /** Output Parameter : MBMS availability status */
1898 TMbmsAvailabilityStatus iMbmsAvailabilityStatus;
1900 /** Input Parameter : MBMS access bearer information */
1901 TMbmsScope iMbmsAccessBearer;
1904 //Packaged version of TMbmsServiceAvailabilityV1, used when this structure has to be passed via IPC.
1905 typedef TPckg<TMbmsServiceAvailabilityV1> TMbmsServiceAvailabilityV1Pckg;
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;
1914 IMPORT_C virtual void ConstructL();
1915 IMPORT_C virtual void Destruct();
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()
1922 #include <etelpckt.inl>