hti/HtiServicePlugins/HtiIpProxyServicePlugin/IPProxyEngine/Inc/MSocketObserver.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:  Events for socket
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef MSOCKETOBSERVER_H
       
    21 #define MSOCKETOBSERVER_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32def.h>
       
    25 #include <es_sock.h>
       
    26 
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class MSocket;
       
    30 class CSocket;
       
    31 
       
    32 // CLASS DECLARATION
       
    33 
       
    34 /**
       
    35 *  Events for socket.
       
    36 */
       
    37 NONSHARABLE_CLASS( MSocketObserver )
       
    38     {
       
    39     // Abstract functions
       
    40     public:
       
    41         /**
       
    42         * Data has been received.
       
    43         * @param aSocket MSocket where the data received from.
       
    44         * @param aData Received data.
       
    45         */
       
    46         virtual void DataReceivedL(
       
    47             const MSocket* aSocket, const TDesC8& aData ) = 0;
       
    48 
       
    49         /**
       
    50         * Error occurred in socket.
       
    51         * @param aSocket MSocket object that caused error.
       
    52         * @param aErrorCode Error code.
       
    53         */
       
    54         virtual void ErrorL( const MSocket* aSocket, TInt aErrorCode ) = 0;
       
    55 
       
    56         /**
       
    57         * Socket disconnected.
       
    58         * @param aSocket Socket that disconnected.
       
    59         */
       
    60         virtual void DisconnectedL( const MSocket* aSocket ) = 0;
       
    61 
       
    62         /**
       
    63         * Notifies that the observer has leaved while executing the callback
       
    64         * function.
       
    65         * @param aSocket Socket that caused the leave.
       
    66         * @param aLeaveCode Leave code.
       
    67         */
       
    68         virtual void ObserverLeaved(
       
    69             const MSocket* aSocket, TInt aLeaveCode ) = 0;
       
    70     };
       
    71 
       
    72 #endif      // MSOCKETOBSERVER_H
       
    73 
       
    74 // End of File