PECengine/StorageManager2/ServerSrc/CPEngStorageSubSession.h
branchRCL_3
changeset 17 a941bc465d9f
parent 0 094583676ce7
equal deleted inserted replaced
16:6ca72c0fe49a 17:a941bc465d9f
       
     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:  Sub-session class of the Storage Server
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 
       
    20 #ifndef __CPENGSTORAGESUBSESSION_H__
       
    21 #define __CPENGSTORAGESUBSESSION_H__
       
    22 
       
    23 //  INCLUDES
       
    24 #include <e32base.h>
       
    25 #include <badesca.h>
       
    26 
       
    27 #include "TPEngStorageServerMessages.h"
       
    28 
       
    29 // FORWARD DECLARATIONS
       
    30 class MPEngStorageServer;
       
    31 class RPEngMessage;
       
    32 class CPEngStorageFolder;
       
    33 class CPEngDataEntry;
       
    34 
       
    35 /**
       
    36  *  Subsession of the Storage Server
       
    37  *  @since 3.0
       
    38  */
       
    39 class CPEngStorageSubSession : public CObject
       
    40     {
       
    41     public:  // Constructors and destructor
       
    42 
       
    43         /**
       
    44         * Two-phased constructor.
       
    45         */
       
    46         static CPEngStorageSubSession* NewL( MPEngStorageServer& aServer,
       
    47                                              const RPEngMessage& aMessage,
       
    48                                              TInt32 aSessionId );
       
    49 
       
    50         /**
       
    51         * Two-phased constructor.
       
    52         */
       
    53         static CPEngStorageSubSession* NewLC( MPEngStorageServer& aServer,
       
    54                                               const RPEngMessage& aMessage,
       
    55                                               TInt32 aSessionId );
       
    56 
       
    57         /**
       
    58         * Destructor.
       
    59         */
       
    60         virtual ~CPEngStorageSubSession();
       
    61 
       
    62     public: // Function for handling of the clients requests
       
    63 
       
    64         /**
       
    65           * Dispatch message from the Sub Session
       
    66           *
       
    67           *	@since 3.0
       
    68           *	@param aMessage is received message.
       
    69           *	@return ETrue if message should be completed
       
    70           */
       
    71         TBool DispatchMessageL( const RPEngMessage& aMessage,
       
    72                                 TInt aRequest );
       
    73 
       
    74         /**
       
    75           * Set Sub-session handle ID for the Session
       
    76           *
       
    77           *	@since 3.0
       
    78           *	@param aHandle Sub-session handle
       
    79           */
       
    80         void SetSubSesionHandle( TInt aHandle );
       
    81 
       
    82     private:  // Functions from base classes
       
    83 
       
    84         /*
       
    85          *	Client is panicked using this method.
       
    86          *
       
    87          *	@since 3.0
       
    88          *	@param	aMessage clients message
       
    89          *	@param	aPanic panic reason
       
    90          */
       
    91         void PanicClient( const RPEngMessage& aMessage, const TInt aPanic ) const;
       
    92 
       
    93 
       
    94         /**
       
    95          *	Resume Notification of the SIDs
       
    96          *
       
    97          *	@since 3.0
       
    98          *	@param aCount count do decrease Notification lock counter
       
    99          */
       
   100         void ResumeSIDsNotification( TInt aCount );
       
   101 
       
   102     private:
       
   103 
       
   104         /**
       
   105         * C++ constructor.
       
   106         */
       
   107         CPEngStorageSubSession( TInt32 aSessionId );
       
   108 
       
   109         /**
       
   110         * Symbian 2nd phase constructor
       
   111         */
       
   112         void ConstructL( MPEngStorageServer& aServer, const RPEngMessage& aMessage );
       
   113 
       
   114     private:    // Data
       
   115 
       
   116         ///	OWN: Buffer of changed SIDs which notification was postponed
       
   117         RPointerArray<CPEngDataEntry>		iBufferedNotif;
       
   118 
       
   119         /// OWN: Counter of the buffering activation
       
   120         TInt								iBufferingActiveCounter;
       
   121 
       
   122         /// REF: Storage Cage
       
   123         CPEngStorageFolder*					iStorageFolder;
       
   124 
       
   125         /// OWN: Sub Session Handle
       
   126         TInt								iHandle;
       
   127 
       
   128         /// OWN: Session Id
       
   129         const TInt32                        iSessionId;
       
   130 
       
   131     };
       
   132 
       
   133 #endif      // __CPENGSTORAGESUBSESSION_H__
       
   134 
       
   135 // End of File