vpnengine/ikesocket/inc/receivequeueitem.h
changeset 0 33413c0669b9
equal deleted inserted replaced
-1:000000000000 0:33413c0669b9
       
     1 /*
       
     2 * Copyright (c) 2008 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:  Receive queue item
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef T_RECEIVEQUEUEITEM_H
       
    20 #define T_RECEIVEQUEUEITEM_H
       
    21 
       
    22 #include <in_sock.h>
       
    23 
       
    24 /**
       
    25  *  Item in receive queue
       
    26  * 
       
    27  *  Item contains information related to received UDP data. Items are stored
       
    28  *  in receive queue while they are waiting to be read by the client. 
       
    29  *
       
    30  *  @lib ikesocket.lib
       
    31  */
       
    32 class TReceiveQueueItem
       
    33 	{
       
    34 public:
       
    35 	
       
    36     /**
       
    37      * Constructor.
       
    38      *
       
    39      * @param aUdpData UDP data
       
    40      * @param aSrcAddr Source IP address/port
       
    41      * @param aLocalPort Local port
       
    42      */
       
    43 	TReceiveQueueItem( HBufC8* aUdpData, 
       
    44 					   const TInetAddr& aSrcAddr,
       
    45 					   const TInt aLocalPort );	
       
    46 	
       
    47     /**
       
    48      * Returns UDP data.
       
    49      *
       
    50      * @return Udp data
       
    51      */
       
    52 	HBufC8* UdpData() const;	
       
    53 	
       
    54     /**
       
    55      * Returns source address.
       
    56      *
       
    57      * @return Source address
       
    58      */
       
    59 	const TInetAddr& SrcAddr() const;		
       
    60 
       
    61     /**
       
    62      * Returns local port.
       
    63      *
       
    64      * @return Local port
       
    65      */
       
    66 	TInt LocalPort() const;	
       
    67 
       
    68 private:
       
    69 
       
    70 	/**
       
    71 	 * Udp data
       
    72 	 * Own.
       
    73 	 */	
       
    74 	HBufC8*        iUdpData;
       
    75 	
       
    76 	/**
       
    77 	 * Source address
       
    78 	 * Own.
       
    79 	 */	
       
    80 	TInetAddr      iSrcAddr;
       
    81 	
       
    82 	/**
       
    83 	 * Local port
       
    84 	 * Own.
       
    85 	 */	
       
    86 	TInt           iLocalPort; 		
       
    87 
       
    88 	};
       
    89 
       
    90 
       
    91 #endif // T_RECEIVEQUEUEITEM_H