telephonyprotocols/pdplayer/inc/PDPProvision.h
changeset 0 3553901f7fa8
child 9 962e6306d9d2
equal deleted inserted replaced
-1:000000000000 0:3553901f7fa8
       
     1 /**
       
     2 * Copyright (c) 2006-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:
       
    15 * Header file declaring the RawIP Provisioning structures.
       
    16 * 
       
    17 *
       
    18 */
       
    19 
       
    20 
       
    21 
       
    22 /**
       
    23  @file
       
    24  @internalTechnology
       
    25 */
       
    26 
       
    27 #ifndef PDPPROVISION_H_
       
    28 #define PDPPROVISION_H_
       
    29 
       
    30 #include <comms-infras/metadata.h>
       
    31 #include <metadatabase.h>		// TMDBElementId
       
    32 #include <etelqos.h>
       
    33 
       
    34 namespace ESock 
       
    35 	{
       
    36 	class CCommsDatIapView;
       
    37 	}
       
    38 
       
    39 const TInt KScratchContextConfigSize = 1024;
       
    40 	
       
    41 class CGPRSProvision : public CBase, public Meta::SMetaData
       
    42 /**
       
    43 */
       
    44 	{
       
    45 public:
       
    46     enum 
       
    47     {
       
    48     EUid = 0x102822E0,  //Same as PDPSCPR, who's gonna use it.
       
    49     ETypeId = 1,
       
    50     };
       
    51 	
       
    52 	static CGPRSProvision* NewLC(ESock::CCommsDatIapView* aIapView);
       
    53 	TInt UmtsGprsRelease() const;
       
    54 protected:
       
    55 	void InitialiseConfigL(ESock::CCommsDatIapView* aIapView);
       
    56     void RetrieveGprsCompression(TUint& aCompression, ESock::CCommsDatIapView* aIapView) const;
       
    57     void RetrieveGprsAnonymousAccess(RPacketContext::TAnonymousAccess& aAnonymous, ESock::CCommsDatIapView* aIapView) const;
       
    58 	
       
    59     void RetrieveApnNameL(TDes8& aApnName, ESock::CCommsDatIapView* aIapView) const;
       
    60 	void RetrievePdpTypeL(RPacketContext::TProtocolType& aPdpType, ESock::CCommsDatIapView* aIapView) const;
       
    61 	void RetrieveIPAndDnsSettingsL(TDes8& aPdpAddress, TDes8& aDns1, TDes8& aDns2, ESock::CCommsDatIapView* aIapView) const;
       
    62 	void RetrieveUmtsCompressionL(RPacketContext::THeaderCompression& aHeaderCompression, RPacketContext::TDataCompression& aDataCompression, ESock::CCommsDatIapView* aIapView) const;
       
    63 	void RetrieveUmtsPacketFlowIdentifierL(RPacketContext::TPacketFlowIdentifier& aPfi, ESock::CCommsDatIapView* aIapView) const;
       
    64 
       
    65 private:
       
    66     TInt InitialiseScratchContext(TUint32 aConfigRel) const;
       
    67     void RetrieveAuthenticationInfoL(RPacketContext::TProtocolConfigOptionV2& aProtocolConfigOption, ESock::CCommsDatIapView* aIapView);
       
    68     void CreateChallengeAndResponseForChapL(RPacketContext::TProtocolConfigOptionV2& aProtocolConfigOption);
       
    69 
       
    70 public:
       
    71     //RPacketContext::TContextConfigGPRS iGprsConfig;
       
    72 	/** Temporary storage of GPRS, or R4, or R5 context configuration, here to avoid stack overflow */
       
    73 	TBuf8<KScratchContextConfigSize> iScratchContext;
       
    74 	TInt iUmtsGprsRelease;
       
    75 	template<class CONTEXTTYPE>
       
    76 	CONTEXTTYPE& GetScratchContextAs() const
       
    77 	    {
       
    78 	    __ASSERT_COMPILE(KScratchContextConfigSize >= sizeof(CONTEXTTYPE));
       
    79 	    return *const_cast<CONTEXTTYPE*>(reinterpret_cast<const CONTEXTTYPE*>(iScratchContext.Ptr()));
       
    80 	    }	
       
    81 DATA_VTABLE
       
    82 	};
       
    83 	
       
    84 class CTSYProvision : public CBase, public Meta::SMetaData
       
    85 /**
       
    86 */
       
    87 	{
       
    88 public:
       
    89     enum 
       
    90     {
       
    91     EUid = 0x102822E0,  //Same as PDPSCPR, who's gonna use it.
       
    92     ETypeId = 2,
       
    93     };
       
    94     
       
    95     static CTSYProvision* NewLC(ESock::CCommsDatIapView* aIapView);
       
    96 
       
    97 protected:
       
    98 	void InitialiseConfigL(ESock::CCommsDatIapView* aIapView);
       
    99 
       
   100 public:
       
   101     TName iTsyName;
       
   102 	DATA_VTABLE
       
   103 	};
       
   104 	
       
   105 
       
   106 class CDefaultPacketQoSProvision : public CBase, public Meta::SMetaData
       
   107 /**
       
   108 
       
   109 */
       
   110 	{
       
   111 public:
       
   112     enum 
       
   113     {
       
   114     EUid = 0x102822E0,  //Same as PDPSCPR, who's gonna use it.
       
   115     ETypeId = 3,
       
   116     };
       
   117 	static CDefaultPacketQoSProvision* NewL(ESock::CCommsDatIapView* aIapView);
       
   118 
       
   119 protected:
       
   120 	void InitialiseConfigL(ESock::CCommsDatIapView* aIapView);
       
   121 
       
   122 public:
       
   123     RPacketQoS::TQoSR5Requested iParams;
       
   124 	DATA_VTABLE
       
   125 	};
       
   126 
       
   127 class CImsExtProvision : public CBase, public Meta::SMetaData
       
   128 /**
       
   129 
       
   130 */
       
   131 	{
       
   132 public:
       
   133     enum 
       
   134     {
       
   135     EUid = 0x102822E0,  //Same as PDPSCPR, who's gonna use it.
       
   136     ETypeId = 4,
       
   137     };
       
   138 	static CImsExtProvision* NewLC(ESock::CCommsDatIapView* aIapView);
       
   139 
       
   140 protected:
       
   141 	void InitialiseConfigL(ESock::CCommsDatIapView* aIapView);
       
   142 
       
   143 private:
       
   144 	CImsExtProvision() : iImsSignalIndicator(EFalse) {}
       
   145 	
       
   146 public:
       
   147 	TBool iImsSignalIndicator;
       
   148 	DATA_VTABLE
       
   149 	};
       
   150 
       
   151 
       
   152 
       
   153 #endif // PDPPROVISION_H_