bluetoothengine/btnotif/btnotifsrv/inc/btnotifsession.h
branchRCL_3
changeset 56 9386f31cc85b
parent 55 613943a21004
child 61 269724087bed
equal deleted inserted replaced
55:613943a21004 56:9386f31cc85b
     1 /*
       
     2 * Copyright (c) 2010 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: Session class for handling commands from clients.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef BTNOTIFSESSION_H
       
    19 #define BTNOTIFSESSION_H
       
    20 
       
    21 #include "btnotifserver.h"
       
    22 
       
    23 /**
       
    24  *  CBTNotifSession maintains a session with a client.
       
    25  *
       
    26  *  @since Symbian^4
       
    27  */
       
    28 NONSHARABLE_CLASS( CBTNotifSession ) : public CSession2
       
    29     {
       
    30 
       
    31 public:
       
    32 
       
    33     /**
       
    34      * Two-phased constructor.
       
    35      */
       
    36     static CBTNotifSession* NewL();
       
    37 
       
    38     /**
       
    39     * Destructor.
       
    40     */
       
    41     virtual ~CBTNotifSession();
       
    42 
       
    43 // from base class CSession2
       
    44 
       
    45     /**
       
    46      * From CSession2.
       
    47      * Receives a message from a client.
       
    48      *
       
    49      * @since Symbian^4
       
    50      * @param aMessage The message containing the details of the client request.
       
    51      */
       
    52     virtual void ServiceL( const RMessage2& aMessage );
       
    53 
       
    54     /**
       
    55      * From CSession2.
       
    56      * Completes construction of the session.
       
    57      *
       
    58      * @since Symbian^4
       
    59      */
       
    60     virtual void CreateL();
       
    61 
       
    62 private:
       
    63 
       
    64     CBTNotifSession();
       
    65 
       
    66     void ConstructL();
       
    67 
       
    68     /**
       
    69      * Returns a handle to our server.
       
    70      *
       
    71      * @since Symbian^4
       
    72      * @param Pointer to our server.
       
    73      */
       
    74     inline CBTNotifServer* Server() const
       
    75         { return (CBTNotifServer*) CSession2::Server(); }
       
    76 
       
    77 private: // data
       
    78 
       
    79     BTUNITTESTHOOK
       
    80 
       
    81     };
       
    82 
       
    83 #endif // BTNOTIFSESSION_H