natplugins/natpcliprovisioningnatfwadapter/src/natfwiapspecificitem.cpp
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2006 - 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:  NAT-FW Traversal access point specific settings
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 // INCLUDE FILES
       
    20 #include    <e32base.h>
       
    21 #include    "natfwiapspecificitem.h"
       
    22 #include    "wpnatfwdebug.h"
       
    23 
       
    24 // ============================ MEMBER FUNCTIONS =============================
       
    25 
       
    26 // ---------------------------------------------------------------------------
       
    27 // CNATFWIAPSpecificItem::NewL
       
    28 //
       
    29 // ---------------------------------------------------------------------------
       
    30 //
       
    31 CNATFWIAPSpecificItem* CNATFWIAPSpecificItem::NewL()
       
    32     {
       
    33     CNATFWIAPSpecificItem* self = NewLC();
       
    34     CleanupStack::Pop( self );
       
    35     return self;
       
    36     }
       
    37 
       
    38 // ---------------------------------------------------------------------------
       
    39 // CNATFWIAPSpecificItem::NewLC
       
    40 // 
       
    41 // ---------------------------------------------------------------------------
       
    42 //
       
    43 CNATFWIAPSpecificItem* CNATFWIAPSpecificItem::NewLC()
       
    44     {
       
    45     CNATFWIAPSpecificItem* self = new (ELeave) CNATFWIAPSpecificItem();
       
    46     CleanupStack::PushL( self );
       
    47     self->ConstructL();
       
    48     return self;
       
    49     }
       
    50 
       
    51 //-----------------------------------------------------------------------------
       
    52 // CNATFWIAPSpecificItem::ConstructL()
       
    53 //
       
    54 //-----------------------------------------------------------------------------
       
    55 //
       
    56 void CNATFWIAPSpecificItem::ConstructL()
       
    57     {
       
    58     iNapDefName = HBufC8::NewL( 0 );
       
    59     }
       
    60     
       
    61 // Destructor
       
    62 //-----------------------------------------------------------------------------
       
    63 // CNATFWIAPSpecificItem::~CNATFWIAPSpecificItem()
       
    64 //
       
    65 //-----------------------------------------------------------------------------
       
    66 //
       
    67 CNATFWIAPSpecificItem::~CNATFWIAPSpecificItem()
       
    68     {
       
    69     delete iNapDefName;
       
    70     }
       
    71 
       
    72 // ---------------------------------------------------------------------------
       
    73 // CNATFWIAPSpecificItem::NapDefName
       
    74 //
       
    75 // ---------------------------------------------------------------------------
       
    76 //
       
    77 const TDesC8& CNATFWIAPSpecificItem::NapDefName() const
       
    78     {
       
    79     return *iNapDefName;
       
    80     }
       
    81 
       
    82 // ---------------------------------------------------------------------------
       
    83 // CNATFWIAPSpecificItem::NapDef
       
    84 //
       
    85 // ---------------------------------------------------------------------------
       
    86 //
       
    87 CWPCharacteristic* CNATFWIAPSpecificItem::NapDef()
       
    88     {
       
    89     return iNapDef;
       
    90     }
       
    91 
       
    92 // ---------------------------------------------------------------------------
       
    93 // CNATFWIAPSpecificItem::SetNapDefNameL
       
    94 //
       
    95 // ---------------------------------------------------------------------------
       
    96 //
       
    97 void CNATFWIAPSpecificItem::SetNapDefNameL( const TDesC8& aToNapId )
       
    98     {
       
    99     delete iNapDefName;
       
   100     iNapDefName = NULL;
       
   101     iNapDefName = aToNapId.AllocL();
       
   102     }
       
   103 
       
   104 // ---------------------------------------------------------------------------
       
   105 // CNATFWIAPSpecificItem::SetNapDefNameL
       
   106 //
       
   107 // ---------------------------------------------------------------------------
       
   108 //
       
   109 void CNATFWIAPSpecificItem::SetNapDef( CWPCharacteristic* aNapDef )
       
   110     {
       
   111     iNapDef = aNapDef;
       
   112     }
       
   113 
       
   114 // ---------------------------------------------------------------------------
       
   115 // CNATFWIAPSpecificItem::SetIAPKey
       
   116 //
       
   117 // ---------------------------------------------------------------------------
       
   118 //
       
   119 void CNATFWIAPSpecificItem::SetIAPKey( TUint32 aIAPKey )
       
   120     {
       
   121     iIAPKey = aIAPKey;
       
   122     }
       
   123 
       
   124 // ---------------------------------------------------------------------------
       
   125 // CNATFWIAPSpecificItem::SetIAPId
       
   126 //
       
   127 // ---------------------------------------------------------------------------
       
   128 //
       
   129 void CNATFWIAPSpecificItem::SetIAPId( TUint32 aIAPId )
       
   130     {
       
   131     iIAPId = aIAPId;
       
   132     }
       
   133 
       
   134 // ---------------------------------------------------------------------------
       
   135 // CNATFWIAPSpecificItem::SetIntervalUDP
       
   136 //
       
   137 // ---------------------------------------------------------------------------
       
   138 //
       
   139 void CNATFWIAPSpecificItem::SetIntervalUDP( TInt aIntervalUDP )
       
   140     {
       
   141     iIntervalUDP = aIntervalUDP;
       
   142     }
       
   143 
       
   144 // ---------------------------------------------------------------------------
       
   145 // CNATFWIAPSpecificItem::SetIntervalTCP
       
   146 //
       
   147 // ---------------------------------------------------------------------------
       
   148 //
       
   149 void CNATFWIAPSpecificItem::SetIntervalTCP( TInt aIntervalTCP )
       
   150     {
       
   151     iIntervalTCP = aIntervalTCP;
       
   152     }
       
   153 
       
   154 // ---------------------------------------------------------------------------
       
   155 // CNATFWIAPSpecificItem::SetSTUNRetransmitTimer
       
   156 //
       
   157 // ---------------------------------------------------------------------------
       
   158 //
       
   159 void CNATFWIAPSpecificItem::SetSTUNRetransmitTimer( TInt aSTUNRetransmitTimer )
       
   160     {
       
   161     iSTUNRetransmitTimer = aSTUNRetransmitTimer;
       
   162     }
       
   163 
       
   164 // ---------------------------------------------------------------------------
       
   165 // CNATFWIAPSpecificItem::GetIAPKey
       
   166 //
       
   167 // ---------------------------------------------------------------------------
       
   168 //
       
   169 TUint32 CNATFWIAPSpecificItem::GetIAPKey() const
       
   170     {
       
   171     return iIAPKey;
       
   172     }
       
   173 
       
   174 // ---------------------------------------------------------------------------
       
   175 // CNATFWIAPSpecificItem::GetIAPId
       
   176 //
       
   177 // ---------------------------------------------------------------------------
       
   178 //
       
   179 TUint32 CNATFWIAPSpecificItem::GetIAPId() const
       
   180     {
       
   181     return iIAPId;
       
   182     }
       
   183 
       
   184 // ---------------------------------------------------------------------------
       
   185 // CNATFWIAPSpecificItem::GetIntervalUDP
       
   186 //
       
   187 // ---------------------------------------------------------------------------
       
   188 //
       
   189 TInt CNATFWIAPSpecificItem::GetIntervalUDP() const
       
   190     {
       
   191     return iIntervalUDP;
       
   192     }
       
   193 
       
   194 // ---------------------------------------------------------------------------
       
   195 // CNATFWIAPSpecificItem::GetIntervalTCP
       
   196 //
       
   197 // ---------------------------------------------------------------------------
       
   198 //
       
   199 TInt CNATFWIAPSpecificItem::GetIntervalTCP() const
       
   200     {
       
   201     return iIntervalTCP;
       
   202     }
       
   203 
       
   204 // ---------------------------------------------------------------------------
       
   205 // CNATFWIAPSpecificItem::GetSTUNRetransmitTimer
       
   206 //
       
   207 // ---------------------------------------------------------------------------
       
   208 //
       
   209 TInt CNATFWIAPSpecificItem::GetSTUNRetransmitTimer() const
       
   210     {
       
   211     return iSTUNRetransmitTimer;
       
   212     }
       
   213 
       
   214 //  End of File