vpnengine/ikev2lib/inc/ikev2ipsecsarekeydata.h
changeset 0 33413c0669b9
equal deleted inserted replaced
-1:000000000000 0:33413c0669b9
       
     1 /*
       
     2 * Copyright (c) 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:  Rekey data
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef IKEV2IPSECSAREKEYDATA_H_
       
    19 #define IKEV2IPSECSAREKEYDATA_H_
       
    20 
       
    21 #include <e32base.h>
       
    22 #include "ipsecsalifetime.h"
       
    23 #include "ikev2trafficselector.h"
       
    24 
       
    25 class TIkeV2TrafficSelector;
       
    26 
       
    27 NONSHARABLE_CLASS(CIpsecSARekeyData) : public CBase
       
    28     {
       
    29 public:
       
    30         static CIpsecSARekeyData* NewL(const TInt aReplayWindow, 
       
    31                                        const TIpsecSALifetime* aHard, 
       
    32                                        const TIpsecSALifetime* aSoft,
       
    33                                        const CArrayFix<TIkeV2TrafficSelector>& aTS_i, 
       
    34                                        const CArrayFix<TIkeV2TrafficSelector>& aTS_r, 
       
    35                                        const TDesC8& aLocalId, const TDesC8& aRemoteId);
       
    36         ~CIpsecSARekeyData();
       
    37         
       
    38         TInt ReplayWindow() const;
       
    39         TIpsecSALifetime HardLifetime() const;
       
    40         TIpsecSALifetime SoftLifetime() const;
       
    41         
       
    42         const TPtrC8 LocalId() const;
       
    43         const TPtrC8 RemoteId() const;
       
    44         
       
    45         /**
       
    46          *  Copies the initiator side traffic selectors.
       
    47          *  Ownership is transferrer
       
    48          */
       
    49         CArrayFix<TIkeV2TrafficSelector>* TsIL() const;
       
    50         
       
    51         /**
       
    52          *  Copies the responder side traffic selectors.
       
    53          *  Ownership is transferrer
       
    54          */
       
    55         CArrayFix<TIkeV2TrafficSelector>* TsRL() const;       
       
    56 private:
       
    57         CIpsecSARekeyData(const TInt aReplayWindow, 
       
    58                           const TIpsecSALifetime* aHard, 
       
    59                           const TIpsecSALifetime* aSoft);
       
    60         
       
    61         void ConstructL(const CArrayFix<TIkeV2TrafficSelector>& aTS_i, 
       
    62                         const CArrayFix<TIkeV2TrafficSelector>& aTS_r, 
       
    63                         const TDesC8& aLocalId, const TDesC8& aRemoteId);
       
    64             
       
    65         
       
    66         
       
    67         CArrayFix<TIkeV2TrafficSelector>* CopyTsL(const CArrayFix<TIkeV2TrafficSelector>& aTS) const;
       
    68         
       
    69         //
       
    70         // Saved from Acquire object for possible IPSec SA rekeying
       
    71         //
       
    72         TInt iReplayWindow;
       
    73         TIpsecSALifetime iHard;
       
    74         TIpsecSALifetime iSoft;
       
    75         
       
    76         
       
    77         CArrayFix<TIkeV2TrafficSelector>*   iTS_i;
       
    78         CArrayFix<TIkeV2TrafficSelector>*   iTS_r; 
       
    79         HBufC8*   iLocalId; 
       
    80         HBufC8*   iRemoteId;
       
    81     };
       
    82 
       
    83 
       
    84 #endif /* IKEV2IPSECSAREKEYDATA_H_ */