hti/HtiCommPlugins/HtiIPCommPlugin/inc/HtiIPCommServerSession.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:  Server side session in HtiIPCommServer.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CHTIIPCOMMSERVERSESSION_H
       
    20 #define CHTIIPCOMMSERVERSESSION_H
       
    21 
       
    22 //  INCLUDES
       
    23 
       
    24 #include <e32std.h>
       
    25 #include <e32base.h>
       
    26 
       
    27 #include "HtiIPCommServer.h"
       
    28 #include "HtiConnectionManager.h"
       
    29 
       
    30 // FORWARD DECLARATIONS
       
    31 class CHtiIPCommServer;
       
    32 
       
    33 
       
    34 // CLASS DECLARATION
       
    35 class CHtiIPCommServerSession : public CSession2
       
    36     {
       
    37 public:
       
    38     /**
       
    39     * Constructor
       
    40     *
       
    41     * @param aServer Pointer to server instance
       
    42     */
       
    43     CHtiIPCommServerSession( CHtiIPCommServer* aServer );
       
    44 
       
    45 private:
       
    46 
       
    47     /**
       
    48     * Destructor
       
    49     */
       
    50     ~CHtiIPCommServerSession();
       
    51 
       
    52     /**
       
    53     * Receives all server command and directs them to
       
    54     * their handlers.
       
    55     *
       
    56     * @param aMessage Message to process
       
    57     */
       
    58     void ServiceL( const RMessage2& aMessage );
       
    59 
       
    60     /**
       
    61     * Receives data from socket
       
    62     *
       
    63     * @param aMessage Message containing a descriptor where data is received
       
    64     */
       
    65     void HandleReceiveRequestL( const RMessage2& aMessage );
       
    66 
       
    67     /**
       
    68     * Sends data to socket
       
    69     *
       
    70     * @param aMessage Message containing a descriptor of the data to send
       
    71     */
       
    72     void HandleSendRequestL( const RMessage2& aMessage );
       
    73 
       
    74     /**
       
    75     * Cancels pending Receive request on server.
       
    76     */
       
    77     void HandleCancelReceiveRequestL( const RMessage2& aMessage );
       
    78 
       
    79     /**
       
    80     * Cancels pending Send request on server.
       
    81     */
       
    82     void HandleCancelSendRequestL( const RMessage2& aMessage );
       
    83 
       
    84 private:
       
    85     /**
       
    86     * Server pointer for calling callbacks functions
       
    87     * and connection manager
       
    88     */
       
    89     CHtiIPCommServer* iServer;
       
    90     };
       
    91 
       
    92 #endif // CHTIIPCOMMSERVERSESSION_H
       
    93 
       
    94 // End of File