networksecurity/ipsec/ipsec6/inc/epdb.h
changeset 0 af10295192d8
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // epdb.h - IPSEC Endpoint Database
       
    15 // @internalComponent	for IPSEC
       
    16 //
       
    17 
       
    18 
       
    19 
       
    20 /**
       
    21  @internalComponent
       
    22 */
       
    23 #ifndef __EPDB_H__
       
    24 #define __EPDB_H__
       
    25 
       
    26 #include <e32std.h>
       
    27 #include "circular.h"
       
    28 
       
    29 class TInetAddr;
       
    30 class TIp6Addr;
       
    31 class TIpAddress;
       
    32 class CEndPoint;
       
    33 
       
    34 // REndPoints
       
    35 // **********
       
    36 class REndPoints : RCircularList
       
    37 	/**
       
    38 	* Contains the Endpoint (internet addresses) database.
       
    39 	*/
       
    40 	{
       
    41 	friend class RIpAddress;
       
    42 public:
       
    43 	 // The following is only available in DEBUG build
       
    44 	 void LogPrint(const TDesC &aFormat) const;
       
    45 	};
       
    46 
       
    47 
       
    48 class RIpAddress
       
    49 	/**
       
    50 	* The handle for the End Point address.
       
    51 	*
       
    52 	* The name of the end point can only contain ASCII character (or to be
       
    53 	* exact, codes in range 0..255)
       
    54 	*/
       
    55 	{
       
    56 public:
       
    57 	inline RIpAddress() : iAddr(NULL) {}
       
    58 	RIpAddress(const RIpAddress &aAddr);
       
    59 	RIpAddress &operator=(const RIpAddress &aAddr);
       
    60 	~RIpAddress();
       
    61 
       
    62 	TInt Open(REndPoints &aMgr, const TDesC &aName);
       
    63 	TInt Open(REndPoints &aMgr, const TDesC &aName, const TIpAddress &aAddr, TInt aOptional = 0);
       
    64 	TInt Open(REndPoints &aMgr, const TIpAddress &aAddr);
       
    65 	TInt Open(REndPoints &aMgr, const TInetAddr &aAddr);
       
    66 	TInt Set(const TIp6Addr &aAddr, TUint32 aScopeId);
       
    67 	TInt Set(const TInetAddr &aAddr);
       
    68 	void Close();
       
    69 	const TIpAddress& operator()() const;
       
    70 	TBool IsNamed() const;
       
    71 	const TDesC8 &Name() const;
       
    72 private:
       
    73 	CEndPoint *iAddr;
       
    74 	};
       
    75 
       
    76 #endif