resourcemgmt/hwresourcesmgr/server/inc/HWRMSession.h
changeset 0 4e1aa6a622a0
equal deleted inserted replaced
-1:000000000000 0:4e1aa6a622a0
       
     1 /*
       
     2 * Copyright (c) 2006-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:
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 
       
    21 /**
       
    22  @file
       
    23  @internalTechnology 
       
    24 */
       
    25 
       
    26 #ifndef HWRMSESSION_H
       
    27 #define HWRMSESSION_H
       
    28 
       
    29 //  INCLUDES
       
    30 #include <e32base.h>
       
    31 //#include "HWRMServer.h"
       
    32 
       
    33 // CONSTANTS
       
    34 // None
       
    35 
       
    36 // MACROS
       
    37 // None
       
    38 
       
    39 // DATA TYPES
       
    40 // None
       
    41 
       
    42 // FUNCTION PROTOTYPES
       
    43 // None
       
    44 
       
    45 // FORWARD DECLARATIONS
       
    46 class CHWRMServer;
       
    47 class CHWRMService;
       
    48 
       
    49 // CLASS DECLARATION
       
    50 
       
    51 /**
       
    52 *  Represents a session for a client thread on the server-side.
       
    53 *  A session acts as a channel of communication between the client 
       
    54 *  and the server. 
       
    55 *
       
    56 */
       
    57 class CHWRMSession : public CSession2
       
    58     {
       
    59     public:  // Constructors and destructor
       
    60         
       
    61         /**
       
    62         * Two-phased constructor.
       
    63         */
       
    64         static CHWRMSession* NewL(CHWRMServer& aServer);
       
    65         
       
    66         /**
       
    67         * Destructor.
       
    68         */
       
    69         virtual ~CHWRMSession();
       
    70         
       
    71     public: // New functions
       
    72         
       
    73     public: // Functions from base classes
       
    74  
       
    75     protected:  // New functions
       
    76         
       
    77     protected:  // Functions from base classes
       
    78         
       
    79         /**
       
    80         * From CSession2
       
    81         * @param aMessage The message containing the client request
       
    82         */
       
    83         virtual void ServiceL( const RMessage2& aMessage );
       
    84 
       
    85     private:
       
    86 
       
    87         /**
       
    88         * C++ default constructor.
       
    89         */
       
    90         CHWRMSession(CHWRMServer& aServer);
       
    91 
       
    92         /**
       
    93         * By default Symbian 2nd phase constructor is private.
       
    94         */
       
    95         void ConstructL();
       
    96 
       
    97         /**
       
    98         * Calls CTaskOrganizer's function to execute operation
       
    99         * @param aMessage The message containing the client request
       
   100         */
       
   101         void DispatchMessageL( const RMessage2& aMessage );
       
   102         
       
   103     public:     // Data
       
   104     
       
   105     protected:  // Data
       
   106 
       
   107     private:    // Data
       
   108 
       
   109     	/**
       
   110     	* HWRM server reference. 
       
   111     	* Not owned.
       
   112     	*/
       
   113     	CHWRMServer& iHWRMServer; 
       
   114 
       
   115         /**
       
   116     	* Pointer to the service object.
       
   117     	*/
       
   118     	CHWRMService* iService;
       
   119 
       
   120     	/**
       
   121     	* A flag to indicate if message completion is needed in ServiceL.
       
   122     	* Async and plugin calls set this to false.
       
   123     	*/ 
       
   124     	TBool iCompletionNeeded;
       
   125     	
       
   126 
       
   127     public:     // Friend classes
       
   128 
       
   129     protected:  // Friend classes
       
   130 
       
   131     private:    // Friend classes
       
   132 
       
   133 
       
   134     };
       
   135 
       
   136 #endif      // HWRMSESSION_H 
       
   137             
       
   138 // End of File