hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Inc/MSocketRouterObserver.h
branchRCL_3
changeset 59 8ad140f3dd41
parent 0 a03f92240627
equal deleted inserted replaced
49:7fdc9a71d314 59:8ad140f3dd41
       
     1 /*
       
     2 * Copyright (c) 2009 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 socket router
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef MSOCKETROUTEROBSERVER_H
       
    21 #define MSOCKETROUTEROBSERVER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32def.h>
       
    25 
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class MSocket;
       
    29 class CSocket;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 *  Observer for socket router.
       
    35 */
       
    36 NONSHARABLE_CLASS( MSocketRouterObserver )
       
    37     {
       
    38     public: // Abstract functions
       
    39 
       
    40         /**
       
    41         * Error occurred in socket.
       
    42         * @param aSocket MSocket object that caused error.
       
    43         * @param aErrorCode Error code.
       
    44         */
       
    45         virtual void SocketRouterErrorL(
       
    46             const MSocket* aSocket, TInt aErrorCode ) = 0;
       
    47 
       
    48         /**
       
    49         * Observer leaved in RunL.
       
    50         * @param aSocket CSocket object that caused leave.
       
    51         * @param aLeaveCode Leave code.
       
    52         */
       
    53         virtual void ObserverLeaved(
       
    54             const MSocket* aSocket, TInt aLeaveCode ) = 0;
       
    55 
       
    56         /**
       
    57         * Peer disconnected.
       
    58         * @param aSocket Socket that disconnected.
       
    59         */
       
    60         virtual void PeerDisconnectedL( const MSocket* aSocket ) = 0;
       
    61 
       
    62         /**
       
    63         * Host disconnected.
       
    64         * @param aSocket Socket that disconnected.
       
    65         */
       
    66         virtual void HostDisconnectedL( const MSocket* aSocket ) = 0;
       
    67 
       
    68         /**
       
    69         * Open a TCP connection to phone side port
       
    70         * @param aPort Port number where to connect
       
    71         */
       
    72         virtual void OpenLocalTCPConnectionL( TUint aPort ) = 0;
       
    73 
       
    74         /**
       
    75         * Open a listening TCP port on the phone side
       
    76         * @param aPort Port number where to start listening
       
    77         */
       
    78         virtual void OpenListeningTCPConnectionL( TUint aPort ) = 0;
       
    79 
       
    80         /**
       
    81         * Close a TCP connection to phone side port
       
    82         * @param aPort Port number to close
       
    83         */
       
    84         virtual void CloseTCPConnection( TUint aPort ) = 0;
       
    85 
       
    86         /**
       
    87         * Close all TCP connections from listening & connecting ports
       
    88         */
       
    89         virtual void CloseAllTCPConnections() = 0;
       
    90     };
       
    91 
       
    92 #endif      // MSOCKETROUTEROBSERVER_H
       
    93 
       
    94 // End of File