natfw/natfwsocketmediaconnwrapper/inc/natfwmediawrapperobserver.h
changeset 0 1bce908db942
equal deleted inserted replaced
-1:000000000000 0:1bce908db942
       
     1 /*
       
     2 * Copyright (c) 2006-2008 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
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 #ifndef M_MEDIA_WRAPPER_OBSERVER_H
       
    22 #define M_MEDIA_WRAPPER_OBSERVER_H
       
    23 
       
    24 #include <e32base.h>
       
    25 
       
    26 /**
       
    27  *  Observer interface used to reveice notifications about incoming
       
    28  *  connections from sender
       
    29  *
       
    30  *  Defines source for multiplexer, where Media Wrapper is mounted to
       
    31  *
       
    32  *  @lib socketmediaconnwrapper.dll
       
    33  *  @since S60 v3.2
       
    34  */
       
    35 class MNATFWMediaWrapperObserver
       
    36     {
       
    37 
       
    38 public:
       
    39 
       
    40     /**
       
    41      * Indicates how sending to user succeed
       
    42      *
       
    43      * @since S60 v3.2
       
    44      * @param aError system-wide error code
       
    45      * @return void
       
    46      */
       
    47     virtual void SendingCompleted( TInt aError ) = 0;
       
    48     
       
    49     /**
       
    50      * Called after data were sent to wrapper. Delivers it to multiplexer.
       
    51      *
       
    52      * @since S60 v3.2
       
    53      * @param aStreamId an ID for stream the data was received from
       
    54      * @param aStreamPortion stream portion which were sent by client
       
    55      * @return system-wide error code
       
    56      */
       
    57     virtual TInt ReceivedFrom( TUint aStreamId, TDes8& aStreamPortion  ) = 0;
       
    58 
       
    59     /**
       
    60      * Called by socket media wrapper object when local port is already in use.
       
    61      * Get new free port.
       
    62      *
       
    63      * @since   S60 v3.2
       
    64      * @param   aPort               New free port
       
    65      * @return  void
       
    66      */    
       
    67     virtual void GetNewFreePort( TUint& aPort ) = 0;
       
    68     
       
    69     };
       
    70 
       
    71 
       
    72 #endif // M_MEDIA_WRAPPER_OBSERVER_H