vpnengine/ikev2lib/inc/ikev2identity.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:  Identity data structure for IKEv2
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef IKEV2IDENTITY_H_
       
    19 #define IKEV2IDENTITY_H_
       
    20 
       
    21 #include <e32base.h>
       
    22 
       
    23 NONSHARABLE_CLASS(CIkeV2Identity) : public CBase
       
    24     {
       
    25 public:
       
    26     static CIkeV2Identity* NewL(TUint8 aIdType, const TDesC8& aIdentity);
       
    27     ~CIkeV2Identity();
       
    28     
       
    29     TUint8 IdType() const;
       
    30     TPtrC8 Identity() const;
       
    31     
       
    32     /**
       
    33      * Returns id payload data, excluding the 
       
    34      * IKE payload fixed header:
       
    35      * 
       
    36      * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       
    37      * !   ID Type     !                 RESERVED                      |
       
    38      * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       
    39      * !                                                               !
       
    40      * ~                   Identification Data                         ~
       
    41      * !                                                               !
       
    42      * +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
       
    43      * 
       
    44      */
       
    45     TPtrC8 PayloadData() const;
       
    46     
       
    47 private:    
       
    48     void ConstructL(TUint8 aIdType, const TDesC8& aIdentity);
       
    49         
       
    50     HBufC8* iIdPayloadData;
       
    51     };
       
    52 
       
    53 #endif /* IKEV2IDENTITY_H_ */