mtptransports/mtpptpiptransport/ptpipplugin/inc/cptpipcommandhandler.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 CCOMMANDHANDLER_H_
       
    21 #define CCOMMANDHANDLER_H_
       
    22 
       
    23 #include "cptpipsockhandlerbase.h"
       
    24 #include "cptpipconnection.h"
       
    25 
       
    26 /**
       
    27 The PTP/IP protocol specifies two TCP Connections - 
       
    28 
       
    29 1) Command or Data Connection ( this class encapsulates this)
       
    30 2) Event Connection.
       
    31 
       
    32 This class is responsible for handling the command connection of the PTPIP protocol.
       
    33 This class will control the socket used to send and receive the PTPIP command data
       
    34 over the TCP/IP Connection .
       
    35 
       
    36 */
       
    37 class CPTPIPCommandHandler : public CPTPIPSocketHandlerBase
       
    38 	{
       
    39 public :
       
    40 	static CPTPIPCommandHandler* NewL(CPTPIPConnection& aConnection);
       
    41 	~CPTPIPCommandHandler();
       
    42 	
       
    43 	void ReceiveCommandDataL(MMTPType& aItoRData);
       
    44 	void ReceiveCommandRequestL(MMTPType& aRequest);
       
    45 	void SendCommandDataL(const MMTPType& aRtoIData, TUint32 aTransactionId);
       
    46 	void SendCommandL(const MMTPType& aResponse);
       
    47 	
       
    48 	TInt ParsePTPIPHeaderL();
       
    49 	TBool HandleInitAck();
       
    50 private :
       
    51 	CPTPIPCommandHandler(CPTPIPConnection& aConnection);
       
    52 
       
    53 	void SendDataCompleteL(TInt aError, const MMTPType& aSource);
       
    54 	void ReceiveDataCompleteL(TInt aError, MMTPType& aSink);
       
    55 
       
    56     /**
       
    57     FLOGGER debug trace member variable.
       
    58     */
       
    59     __FLOG_DECLARATION_MEMBER;    
       
    60 	
       
    61 	};
       
    62 
       
    63 #endif /*CCOMMANDHANDLER_H_*/