inc/mnatfwsocketmediaconnwrapper.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:    Interface for attaching socket-based medias into 
       
    15                  NAT framework.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 
       
    22 #ifndef M_SOCKETMEDIACONNWRAPPER_H
       
    23 #define M_SOCKETMEDIACONNWRAPPER_H
       
    24 
       
    25 #include <e32def.h>
       
    26 #include "natfwconnectivityapidefs.h"
       
    27 
       
    28 class TSockAddr;
       
    29 
       
    30 /**
       
    31  *  Interface for attaching socket-based medias into NATFW. Provides
       
    32  *  services to control datapath between mediaengine and NATFW.
       
    33  *  
       
    34  *  @lib socketmediaconnwrapper.dll
       
    35  *  @since S60 v3.2
       
    36  */
       
    37 class MNATFWSocketMediaConnWrapper
       
    38     {
       
    39 
       
    40 public:
       
    41 
       
    42     /**
       
    43      * Returns local proxy address through which client can communicate
       
    44      * with its peer. All data sent to this address will be forwarded
       
    45      * to the peer if sending is fully activated through wrapper and
       
    46      * NAT Connectivity APIs. Returned address is also used to forward
       
    47      * incoming data from the peer.
       
    48      * 
       
    49      * @since   S60 v3.2
       
    50      * @param   aAddr       Address for sending to peer
       
    51      */
       
    52     virtual void OutgoingAddr( TSockAddr& aAddr ) = 0;
       
    53     
       
    54     /**
       
    55      * Sets address where NATFW will forward incoming data from the peer
       
    56      * when receiving is activated.
       
    57      *
       
    58      * @since   S60 v3.2
       
    59      * @param   aAddr       Address for receiving from peer
       
    60      */
       
    61     virtual void SetIncomingAddrL( const TSockAddr& aAddr ) = 0;
       
    62     
       
    63     /**
       
    64      * Returns identifier of NAT-stream that wrapper is associated with.
       
    65      *
       
    66      * @since   S60 v3.2
       
    67      * @return  Stream identifier
       
    68      */
       
    69     virtual TUint StreamId() = 0;
       
    70     
       
    71     /**
       
    72      * Enables/disables datapath between mediaengine and NATFW regarding
       
    73      * media receiving.
       
    74      * 
       
    75      * @since S60 v3.2
       
    76      * @param   aState          The receiving state
       
    77      */
       
    78     virtual void SetReceivingStateL( TNATFWStreamingState aState ) = 0;
       
    79     
       
    80     /**
       
    81      * Enables/disables datapath between mediaengine and NATFW regarding
       
    82      * media sending.
       
    83      * 
       
    84      * @since S60 v3.2
       
    85      * @param   aState          The sending state
       
    86      */
       
    87     virtual void SetSendingStateL( TNATFWStreamingState aState ) = 0;
       
    88     };
       
    89 
       
    90 #endif // M_SOCKETMEDIACONNWRAPPER_H