tcpiputils/dhcp/include/DhcpIP6MsgRcvr.h
changeset 0 af10295192d8
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     1 // Copyright (c) 2004-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 // DHCPv6 Message receiver header file. Receiver keeps reading from socket untill the whole 
       
    15 // msg has been read
       
    16 // 
       
    17 //
       
    18 
       
    19 /**
       
    20  @file
       
    21 */
       
    22 
       
    23 #ifndef DHCPIP6MSGRCVR_H
       
    24 #define DHCPIP6MSGRCVR_H
       
    25 
       
    26 #include "DhcpIP6Msg.h"
       
    27 #include "DHCPIP6StateMachine.h"
       
    28 #include <comms-infras/asynchevent.h>
       
    29 
       
    30 class CDHCPIP6StateMachine;
       
    31 class CDhcpIP6MessageReader : public CAsynchEvent
       
    32 /**
       
    33   * Implements DHCPv6 message reader. It reads a datagram untill it has been fully read
       
    34   * out of ESOCK meaning that the whole message has been read
       
    35   *
       
    36   * @internalTechnology
       
    37   */
       
    38 {
       
    39 public:
       
    40    CDhcpIP6MessageReader(CDHCPIP6StateMachine& aDHCPIP6StateMachine) :
       
    41       CAsynchEvent(&aDHCPIP6StateMachine),
       
    42       iIncomingMsgDataPtr(NULL, 0)
       
    43       {
       
    44       }
       
    45 
       
    46    virtual CAsynchEvent* ProcessL(TRequestStatus& aStatus);
       
    47 
       
    48 	CDHCPIP6StateMachine& DHCPIPv6()
       
    49 		{
       
    50 		return static_cast<CDHCPIP6StateMachine&>(*iStateMachine);
       
    51 		}
       
    52 
       
    53 protected:
       
    54 	TPtr8 iIncomingMsgDataPtr;
       
    55 	TSockXfrLength iUnreadLength;
       
    56 	TInetAddr iRcvAddr;
       
    57 };
       
    58 
       
    59 #endif