mtptransports/mtpptpiptransport/ptpipplugin/inc/cptpipeventhandler.h
changeset 0 d0791faffa3f
equal deleted inserted replaced
-1:000000000000 0:d0791faffa3f
       
     1 // Copyright (c) 2008-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 //
       
    15 
       
    16 /**
       
    17  @internalComponent
       
    18 */
       
    19 
       
    20 #ifndef CEVENTHANDLER_H_
       
    21 #define CEVENTHANDLER_H_
       
    22 
       
    23 #include "e32def.h"
       
    24 #include "cptpipsockhandlerbase.h"
       
    25 
       
    26 /**
       
    27 The PTP/IP protocol specifies two TCP Connections - 
       
    28 
       
    29 1) Command or Data Connection
       
    30 2) Event Connection.
       
    31 
       
    32 This class is responsible for handling the event connection of the PTPIP protocol.
       
    33 This class will control the socket used to send and receive the PTPIP events over 
       
    34 the TCP/IP Connection .
       
    35 */
       
    36 
       
    37 class CPTPIPEventHandler : public CPTPIPSocketHandlerBase
       
    38 	{
       
    39 public:
       
    40 	static CPTPIPEventHandler* NewL(CPTPIPConnection& aConnectionHandler);
       
    41 	~CPTPIPEventHandler();
       
    42 	void SendInitAck(CPTPIPGenericContainer* aEvtAck);
       
    43 
       
    44 	void SendEventL(const MMTPType& aData);
       
    45 	void ReceiveEventL(MMTPType& aEvent);
       
    46 	
       
    47 private:
       
    48 	CPTPIPEventHandler(CPTPIPConnection& aConnectionHandler);
       
    49 	
       
    50 	void SendDataCompleteL(TInt aError, const MMTPType& aSource);
       
    51 	void ReceiveDataCompleteL(TInt aError, MMTPType& aSink);
       
    52 	
       
    53 	TInt ParsePTPIPHeaderL();
       
    54 	TBool HandleInitAck();
       
    55 	
       
    56     /**
       
    57     FLOGGER debug trace member variable.
       
    58     */
       
    59     __FLOG_DECLARATION_MEMBER;    
       
    60 	
       
    61 	};
       
    62 
       
    63 #endif /*CEVENTHANDLER_H_*/