mtpfws/mtpfw/inc/mmtptransactionproxy.h
changeset 0 d0791faffa3f
equal deleted inserted replaced
-1:000000000000 0:d0791faffa3f
       
     1 // Copyright (c) 2006-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  @file
       
    18  @internalComponent
       
    19 */
       
    20 
       
    21 #ifndef MMTPTRANSACTIONPROXY_H
       
    22 #define MMTPTRANSACTIONPROXY_H
       
    23 
       
    24 #include <e32cmn.h>
       
    25 #include <e32def.h>
       
    26 
       
    27 class MMTPConnection;
       
    28 class MMTPObjectMgr;
       
    29 class MMTPPuidMgr;
       
    30 class MMTPReferenceMgr;
       
    31 class MMTPType;
       
    32 class TMTPTypeEvent;
       
    33 class TMTPTypeResponse;
       
    34 class TMTPTypeRequest;
       
    35 class RFs;
       
    36 
       
    37 /** 
       
    38 Defines the MTP framework transaction proxy handler application interface.
       
    39 This is an internal interface that allows a data provider to complete the 
       
    40 processing of a delegated (proxy) request.
       
    41 @internalComponent
       
    42  
       
    43 */
       
    44 class MMTPTransactionProxy
       
    45     {
       
    46 public:
       
    47     
       
    48     /**
       
    49     Initiates a data object receive sequence in the MTP transaction proxy 
       
    50     handler. This is an asynchronous method. This method should only be invoked
       
    51     when processing the ERequestPhase of an MTP transaction. 
       
    52     @param aData The MTP data object sink buffer.
       
    53     @param aRequest The MTP request dataset of the active MTP transaction.
       
    54     @param aConnection The handle of the MTP connection on which the transaction
       
    55     is being processed. 
       
    56     @param aStatus The status used to return asynchronous completion 
       
    57     information regarding the request.
       
    58     @leave KErrNotReady, if invoked when the current MTP transaction phase is 
       
    59     not ERequestPhase.
       
    60     */
       
    61     virtual void ProxyReceiveDataL(MMTPType& aData, const TMTPTypeRequest& aRequest, MMTPConnection& aConnection, TRequestStatus& aStatus) = 0;
       
    62     
       
    63     /**
       
    64     Initiates a data object send sequence in the MTP transaction proxy 
       
    65     handler. This is an asynchronous method. This method should only be invoked
       
    66     when processing the ERequestPhase of an MTP transaction. 
       
    67     @param aData The MTP data object source buffer.
       
    68     @param aRequest The MTP request dataset of the active MTP transaction.
       
    69     @param aConnection The handle of the MTP connection on which the transaction
       
    70     is being processed.
       
    71     @param aStatus The status used to return asynchronous completion 
       
    72     information regarding the request.
       
    73     @leave KErrNotReady, if invoked when the current MTP transaction phase is 
       
    74     not ERequestPhase.
       
    75     */
       
    76     virtual void ProxySendDataL(const MMTPType& aData, const TMTPTypeRequest& aRequest, MMTPConnection& aConnection, TRequestStatus& aStatus) = 0;
       
    77     
       
    78     /**
       
    79     Initiates a data object an MTP response dataset send sequence in the MTP 
       
    80     transaction proxy handler. This is an asynchronous method. This method 
       
    81     should only be invoked when processing either the ERequestPhase or 
       
    82     EResponsePhase of an MTP transaction.
       
    83     @param aData The MTP aResponse dataset source buffer.
       
    84     @param aConnection The handle of the MTP connection on which the transaction
       
    85     is being processed.
       
    86     @param aStatus The status used to return asynchronous completion 
       
    87     information regarding the request.
       
    88     @leave KErrNotReady, if invoked when the current MTP transaction phase is 
       
    89     not ERequestPhase or EResponsePhase.
       
    90     */
       
    91     virtual void ProxySendResponseL(const TMTPTypeResponse& aResponse, const TMTPTypeRequest& aRequest, MMTPConnection& aConnection, TRequestStatus& aStatus) = 0;
       
    92     
       
    93     /**
       
    94     Signals to the MTP transaction proxy handler that all processing related 
       
    95     to the current transaction has been completed. This method should only be 
       
    96     invoked when processing the ECompletingPhase of the MTP transaction 
       
    97     @param aRequest The MTP request dataset that initiated the transaction.
       
    98     @param aConnection The handle of the MTP connection on which the transaction
       
    99     is being processed.
       
   100     @param aStatus The status used to return asynchronous completion 
       
   101     information regarding the request.
       
   102     @leave KErrNotReady If invoked when the current MTP transaction phase is 
       
   103     invalid.
       
   104     */
       
   105     virtual void ProxyTransactionCompleteL(const TMTPTypeRequest& aRequest, MMTPConnection& aConnection) = 0;
       
   106     };
       
   107     
       
   108 #endif // MMTPTRANSACTIONPROXY_H