natfw/natfwconnectionmultiplexer/inc/mncmmultiplexerconnectionobserver.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2006-2007 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:    Observer for CMultiplexerConnection
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef M_MNCMMULTIPLEXERCONNECTIONOBSERVER_H
       
    22 #define M_MNCMMULTIPLEXERCONNECTIONOBSERVER_H
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 #include "ncmconnectionmultiplexer.hrh"
       
    27 
       
    28 /**
       
    29  *  Observer for CNcmConnection
       
    30  *
       
    31  *  Allow user of connection to receive error notifications while
       
    32  *  data is not able to pass through successfully.
       
    33  *
       
    34  *  @lib connectionmux.lib
       
    35  *  @since S60 v3.2
       
    36  */
       
    37 class MNcmMultiplexerConnectionObserver
       
    38     {
       
    39 
       
    40 public:
       
    41 
       
    42 
       
    43     /**
       
    44      * Called by connection when transfer error occurs on it
       
    45      *
       
    46      * @since   S60 v3.2
       
    47      * @param   aSessionId          The ID identifying session
       
    48      * @param   aStreamId           The ID identifying stream
       
    49      * @param   aConnectionId       The ID identifying connection
       
    50      * @param   aNotifyType         Type of notify
       
    51      * @param   aError              The error code
       
    52      * @return void
       
    53      */
       
    54     virtual void ConnectionError( TUint aSessionId, TUint aStreamId,
       
    55         TUint aConnectionId,
       
    56         TMultiplexerConnectionNotifyType aNotifyType, TInt aError ) = 0;
       
    57     
       
    58     /**
       
    59      * Called by socket destination object when action completes
       
    60      * (or error is reached)
       
    61      *
       
    62      * @since   S60 v3.2
       
    63      * @param   aStreamId           The ID identifying stream
       
    64      * @param   aConnectionId       The ID identifying connection
       
    65      * @param   aType               Type of notify
       
    66      * @param   aError              Error code
       
    67      * @return  void
       
    68      */
       
    69     virtual void ConnectionNotify( TUint aStreamId, TUint aConnectionId,
       
    70         TMultiplexerConnectionNotifyType aType, TInt aError ) = 0;
       
    71     
       
    72     /**
       
    73      * Called by socket destination object when current local port is already in use.
       
    74      * Get new free port.
       
    75      *
       
    76      * @since   S60 v3.2
       
    77      * @param   aStreamId           The ID identifying stream
       
    78      * @param   aConnectionId       The ID identifying connection     
       
    79      * @param   aPort               New free port
       
    80      * @return  void
       
    81      */    
       
    82     virtual void GetNewFreePort( TUint aStreamId, TUint aConnectionId,
       
    83         TUint& aPort ) = 0;
       
    84 
       
    85     };
       
    86 
       
    87 
       
    88 #endif // M_MNCMMULTIPLEXERCONNECTIONOBSERVER_H