datacommsserver/networkcontroller/ts_common/etelpckt.h
changeset 0 dfb7c4ff071f
equal deleted inserted replaced
-1:000000000000 0:dfb7c4ff071f
       
     1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 #ifndef __ETELPCKT_H__
       
    17 #define __ETELPCKT_H__
       
    18 
       
    19 #include "etel.h"
       
    20 
       
    21 
       
    22 class TPacketDataConfigBase 
       
    23 /** Base class for the packet configuration classes.
       
    24 
       
    25 The Context configuration, QoS profile (Requested and Negotiated) and QoS 
       
    26 Capabilities classes inherit from this class. It is outside the scope of all 
       
    27 the Packet data classes. 
       
    28 
       
    29 To allow future configuration structures (e.g. TContextConfigWCDMA, 
       
    30 TContextConfigPDC, etc.) to be added in such a way that a completely different 
       
    31 structure may be defined and passed into the same functions as this one, all 
       
    32 existing configuration structures are derived from this thin base class 
       
    33 which provides just one function, ExtensionId(). This function returns the 
       
    34 one protected member variable, iExtensionId. A new structure would define an 
       
    35 associated new constant to be set in iExtensionId on construction, which would 
       
    36 then be queried by the TSY prior to unpackaging the structure. 
       
    37 
       
    38 @see RPacketContext::TContextConfigGPRS
       
    39 @see RPacketContext::TContextConfigCDMA 
       
    40 @see RPacketContext::TContextConfigR99_R4  
       
    41 @see RPacketContext::TContextConfigR5
       
    42 
       
    43 @publishedPartner
       
    44 @released
       
    45 
       
    46 */
       
    47 	{
       
    48 public:
       
    49 	/**
       
    50 	Flags identifying the different packet networks.
       
    51 	*/
       
    52 	enum 
       
    53 		{
       
    54 		/**
       
    55 		GPRS Release 97/98 packet network.
       
    56 		*/
       
    57 		KConfigGPRS= 0x01,				
       
    58 		/**
       
    59 		GPRS/UMTS Release 99 and UMTS Release 4 networks.
       
    60 		*/ 
       
    61 		KConfigRel99Rel4 = 0x04,
       
    62 		/**
       
    63 		UMTS/IMS 3GPP Release 5 networks.
       
    64 		*/ 
       
    65 		KConfigRel5 = 0x05,		
       
    66 		};
       
    67 		
       
    68 	/** This member returns the type of class.
       
    69 	
       
    70 	@return The type of class. */
       
    71 	inline TInt ExtensionId(){return iExtensionId;};
       
    72 protected:
       
    73 	/**
       
    74 	Defines the type of class: either KConfigGPRS, KConfigCMDA or KConfigRel99Rel4, 
       
    75 	which identifies the type of packet network (GPRS R97/98, CDMA, Release 99 or 4 or 5)
       
    76 	*/
       
    77 	TInt iExtensionId;	
       
    78 	};
       
    79 	
       
    80 	
       
    81 class RPacketService
       
    82 	{
       
    83 public:
       
    84 	TInt Open(RPhone& aPhone);
       
    85 	void Close();
       
    86 
       
    87 	void CancelAsyncRequest(TInt aReqToCancel) const;
       
    88 
       
    89 	enum TStatus
       
    90 		{
       
    91 		EStatusUnattached,	// unattached to network & inactive packet data connection
       
    92 		EStatusAttached,	// attached to network & inactive packet data connection
       
    93 		EStatusActive,		// attached to network & active packet data connection
       
    94 		EStatusSuspended	// attached to network & suspended packet data connection
       
    95 		};
       
    96 
       
    97 	TInt GetStatus(TStatus& aPacketStatus) const;
       
    98 
       
    99 	enum TMSClass
       
   100 		{
       
   101 		EMSClassDualMode,			// Active Simultaneous PS & CS calls supported (ClassA)
       
   102 		EMSClassSuspensionRequired, // Active CS & Suspended PS simultaneous calls supported (ClassB)
       
   103 		EMSClassAlternateMode,		// Active CS or Active PS only call supported (ClassC)
       
   104 		EMSClassCircuitSwitchedOnly,// Active CS only call supported (ClassC)
       
   105 		EMSClassPacketSwitchedOnly, // Active PS only call supported (ClassC)
       
   106 		EMSClassUnknown				// Unknown what configuration is supported
       
   107 		};
       
   108 
       
   109 	void GetMSClass(TRequestStatus& aStatus, TMSClass& aCurrentClass, TMSClass& aMaxClass) const;
       
   110 
       
   111 	enum TRegistrationStatus
       
   112 		{
       
   113 		ENotRegisteredNotSearching,
       
   114 		ERegisteredOnHomeNetwork,
       
   115 		ENotRegisteredSearching,
       
   116 		ERegistrationDenied,
       
   117 		EUnknown,
       
   118 		ERegisteredRoaming, // foreign network
       
   119 		ENotRegisteredButAvailable,	
       
   120 		ENotRegisteredAndNotAvailable
       
   121 		};
       
   122 	
       
   123 	void GetNtwkRegStatus(TRequestStatus& aStatus, TRegistrationStatus& aRegistrationStatus) const;
       
   124 	
       
   125 	enum TAttachMode
       
   126 		{
       
   127 		EAttachWhenPossible,// instruct phone stack to attach to packet network whenever it can
       
   128 		EAttachWhenNeeded	// instruct phone stack to attach to network only when required (eg: activating a connection)
       
   129 		};
       
   130 
       
   131 	TInt GetAttachMode(TAttachMode& aMode) const;
       
   132 
       
   133 private:
       
   134 	CEtelBehaviourBase* iTestBehaviour;
       
   135 	};
       
   136 
       
   137 #endif // __ETELPCKT_H__
       
   138