mtpfws/mtpfw/dataproviders/dataproviderapi/interface/mmtpsession.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  @publishedPartner
       
    19  @released
       
    20 */
       
    21 
       
    22 #ifndef MMTPSESSION_H
       
    23 #define MMTPSESSION_H
       
    24 
       
    25 #include <e32cmn.h>
       
    26 #include <e32def.h>
       
    27 #include <mtp/mtpdataproviderapitypes.h>
       
    28 
       
    29 class TMTPTypeRequest;
       
    30 
       
    31 /** 
       
    32 Defines the MTP data provider framework MTP session interface.
       
    33 @publishedPartner
       
    34 @released
       
    35 */
       
    36 class MMTPSession
       
    37     {
       
    38 public:
       
    39 
       
    40     /**
       
    41     Provides a handle to the MTP request dataset of the session's active MTP 
       
    42     transaction. This method should only be invoked if the current MTP 
       
    43     transaction phase is other than EIdle (@see TransactionPhase).
       
    44     @return The active MTP transaction request dataset.
       
    45     @leave KErrNotReady, if the MTP transaction phase is EIdle.
       
    46     @see TransactionPhase.
       
    47     */
       
    48     virtual const TMTPTypeRequest& ActiveRequestL() const = 0;
       
    49     
       
    50     /**
       
    51     Provides the session identifier assigned by the MTP connection on which
       
    52     the session resides. This identifier is unique only to the connection,
       
    53     and may also be in use on any other active connection.
       
    54     @return The MTP connection's session identifier.
       
    55     */
       
    56     virtual TUint32 SessionMTPId() const = 0;
       
    57 
       
    58     /**
       
    59     Provides the unique session identifier assigned by the MTP data provider
       
    60     framework. This identifier is unique across all active connections.
       
    61     @return The unique session identifier.
       
    62     */
       
    63     virtual TUint SessionUniqueId() const = 0;
       
    64     };
       
    65 #endif // MMTPSESSION_H