PECengine/StorageManager2/ServerSrc/CPEngRequestHandler.h
changeset 0 094583676ce7
equal deleted inserted replaced
-1:000000000000 0:094583676ce7
       
     1 /*
       
     2 * Copyright (c) 2002 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:  Template of the Server request handler implementation
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __CPENGREQUESTHANDLER_H__
       
    21 #define __CPENGREQUESTHANDLER_H__
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 
       
    26 #include "TPEngStorageServerMessages.h"
       
    27 //	Own RMessage class wraper
       
    28 #include "RPEngMessage.h"
       
    29 
       
    30 // CLASS DECLARATION
       
    31 /**
       
    32  *  Template of the Server request handler implementation
       
    33  *  It implements skeleton of one request handler
       
    34  *
       
    35  *  @since 3.0
       
    36  */
       
    37 class CPEngRequestHandler : public CObject
       
    38     {
       
    39     public:  // Constructors and destructor
       
    40 
       
    41         /**
       
    42          * Destructor.
       
    43          */
       
    44         virtual ~CPEngRequestHandler();
       
    45 
       
    46     public: // New functions
       
    47 
       
    48     public: // Function from MPEngRequestHandler
       
    49 
       
    50         /**
       
    51          *	Return Session ID of the session from which request was issued
       
    52          *
       
    53          *	@since 3.0
       
    54          *	@return session ID
       
    55          */
       
    56         TUint32 SessionId() const ;
       
    57 
       
    58         /**
       
    59          *	Return Sub Session ID of the session from which request was issued
       
    60          *
       
    61          *	@since 3.0
       
    62          *	@return session ID
       
    63          */
       
    64         TInt SubSessionId() const ;
       
    65 
       
    66         /**
       
    67          *	Return Request function
       
    68          *
       
    69          *	@since 3.0
       
    70          *	@return request function
       
    71          */
       
    72         TPEngStorageServerMessages RequestFunction() const;
       
    73 
       
    74         /**
       
    75          *	Cancel Request
       
    76          *
       
    77          *	@since 3.0
       
    78          */
       
    79         void CancelRequestD();
       
    80 
       
    81         /**
       
    82          *	Reloads request handler with new RPEngMessage, this is used when
       
    83          *
       
    84          *	@since 3.0
       
    85          *	@param aNewScout new message ofthe asynchronous request
       
    86          */
       
    87         virtual void ReloadScoutWithNewMessageL( const RPEngMessage& aNewScout ) = 0;
       
    88 
       
    89 
       
    90     protected:	// Protected constructor to allow derivation
       
    91 
       
    92         /**
       
    93          * C++ default constructor.
       
    94          */
       
    95         CPEngRequestHandler(	TPEngStorageServerMessages aRequestFunction,
       
    96                              TUint32 aSessionID,
       
    97                              TInt aSubSessionID );
       
    98 
       
    99         /**
       
   100          * By default Symbian 2nd phase constructor is private.
       
   101          */
       
   102         void ConstructL();
       
   103 
       
   104 
       
   105     protected:  // Data protected to allow derivation
       
   106 
       
   107         /// OWN: Request RPEngMessage
       
   108         RPEngMessage						iRequestMessage;
       
   109 
       
   110         /// OWN: Session ID from where request was issued
       
   111         TUint32								iSessionID;
       
   112 
       
   113         /// OWN: Sub Session ID, from where request came
       
   114         TInt								iSubSessionID;
       
   115 
       
   116         /// OWN: Request Function
       
   117         TPEngStorageServerMessages			iRequestFunction;
       
   118 
       
   119     private:    // Data
       
   120     };
       
   121 
       
   122 #endif      // __CPENGREQUESTHANDLER_H__
       
   123 
       
   124 // End of File