natfw/tsrc/natfwtestconsoles/natfwtestconsole/src/stunudpsettings.cpp
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2007 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 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #include "stunudpsettings.h"
       
    22 
       
    23 #include <unsafprotocolscrkeys.h>
       
    24 
       
    25 
       
    26 //  CONSTANTS
       
    27 
       
    28 //Domain spesific settings
       
    29 _LIT8( KNatProtocol, "nokia.stun" );
       
    30 
       
    31 
       
    32 // -----------------------------------------------------------------------------
       
    33 // CStunUdpSettings::NewL
       
    34 // -----------------------------------------------------------------------------
       
    35 // 
       
    36 CStunUdpSettings* CStunUdpSettings::NewL( const TDesC8& aDomain,
       
    37                                                  TUint aIapId )
       
    38     {
       
    39     CStunUdpSettings* self = CStunUdpSettings::NewLC(aDomain, aIapId );
       
    40     CleanupStack::Pop( self );
       
    41     return self;
       
    42     }
       
    43 
       
    44 
       
    45 // -----------------------------------------------------------------------------
       
    46 // CStunUdpSettings::NewL
       
    47 // -----------------------------------------------------------------------------
       
    48 //
       
    49 CStunUdpSettings* CStunUdpSettings::NewLC( const TDesC8& aDomain,
       
    50                                                   TUint aIapId )
       
    51     {   
       
    52     CStunUdpSettings* self = new( ELeave ) CStunUdpSettings( aIapId );
       
    53     CleanupStack::PushL( self );
       
    54     self->ConstructL( aDomain );
       
    55     return self;
       
    56     }
       
    57     
       
    58     
       
    59 // -----------------------------------------------------------------------------
       
    60 // CStunUdpSettings::CStunUdpSettings
       
    61 // -----------------------------------------------------------------------------
       
    62 //
       
    63 CStunUdpSettings::CStunUdpSettings( TUint aIapId )
       
    64     : CGeneralSettings( aIapId )
       
    65     {
       
    66     }
       
    67     
       
    68     
       
    69 // -----------------------------------------------------------------------------
       
    70 // CStunUdpSettings::~CStunUdpSettings
       
    71 // -----------------------------------------------------------------------------
       
    72 //   
       
    73 CStunUdpSettings::~CStunUdpSettings( )
       
    74     {
       
    75     /*
       
    76     EraseL( KUNSAFProtocolsDomainTableMask, 0xf0000000 );
       
    77  	EraseL( KUNSAFProtocolsIAPTableMask, 0xf0000000 );
       
    78     */
       
    79     }
       
    80     
       
    81     
       
    82 // -----------------------------------------------------------------------------
       
    83 // CStunUdpSettings::ConstructL
       
    84 // -----------------------------------------------------------------------------
       
    85 //    
       
    86 void CStunUdpSettings::ConstructL( const TDesC8& aDomain )
       
    87     {
       
    88     CGeneralSettings::ConstructL( aDomain );
       
    89     }
       
    90     
       
    91     
       
    92 // -----------------------------------------------------------------------------
       
    93 // CStunUdpSettings::CreateSettingsL
       
    94 // -----------------------------------------------------------------------------
       
    95 //   
       
    96 void CStunUdpSettings::CreateSettingsL()
       
    97     {
       
    98     CGeneralSettings::CreateSettingsL();
       
    99     
       
   100     User::LeaveIfError( GetDomainKey( iDomainKey ) );
       
   101     
       
   102     StoreL( KUNSAFProtocolsUsedNATProtocolMask | iDomainKey, 
       
   103         KNatProtocol );
       
   104     }