usbservices_plat/ptp_transport_api/inc/ptpcallbacks.h
changeset 35 9d8b04ca6939
parent 0 1e05558e2206
equal deleted inserted replaced
34:7858bc6ead78 35:9d8b04ca6939
       
     1 /*
       
     2 * Copyright (c) 2006 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:  PTP transport callback interface.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef PTPCALLBACK_H
       
    20 #define PTPCALLBACK_H
       
    21 
       
    22 #include <e32std.h>
       
    23 #include <ptptransport.h>
       
    24 
       
    25 class MNPtpCallback
       
    26 /** 
       
    27  * An interface for notification of receive completions.
       
    28  * Transport plugins use these methods to inform PTP when an event is received
       
    29  * or a data block has arrived through the transport interface.
       
    30  * @lib ptpstack.lib
       
    31  * @since S60 3.2
       
    32  */
       
    33 	{
       
    34 public:
       
    35 
       
    36 	/**
       
    37 	* Callback for informing PTP that an event has been received.
       
    38     * @since S60 3.2
       
    39     * @param aEventData, Container containing event info.
       
    40     * @return KErrNone, if successful, otherwise one of the other system-wide
       
    41     *         error codes.
       
    42 	*/
       
    43 	virtual TInt EventReceived( TNPtpContainer& aEventData  ) = 0;
       
    44 
       
    45     /**
       
    46 	* Callback for informing PTP that a data block has been received.
       
    47 	* @since S60 3.2
       
    48 	* @param aContainer, Container containing operation info.
       
    49 	*                    Response is returned in this parameter also.
       
    50 	* @param aDataFile, Name of the file where incoming data resides.
       
    51 	*                   Also if method returns data, the name of the data file
       
    52 	*                   is written here. When operation or response deosn't
       
    53 	*                   constain any data, this parameter should be empty.
       
    54 	* @return KErrNone, if successful, otherwise one of the other system-wide
       
    55     *         error codes. KPtpErrDataMissing is returned if aData is empty
       
    56     *         though operation requires data. Transport layer then re-sends the
       
    57     *         operation with the data packed.
       
    58 	*/
       
    59 	virtual TInt DataReceived( TNPtpContainer& aContainer, TFileName& aFileName  ) = 0;
       
    60 	
       
    61 	virtual void ResponseReturned(TNPtpContainer& aContainer) = 0;
       
    62 	};
       
    63 	
       
    64 	
       
    65 #endif // PTPCALLBACK_H