analyzetool/storageserver/server/inc/atstorageserversession.h
branchRCL_3
changeset 59 8ad140f3dd41
parent 19 da2cedce4920
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:  Declaration of the server side session class CATStorageServerSession
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef ATSTORAGESERVERSESSION_H
       
    20 #define ATSTORAGESERVERSESSION_H
       
    21 
       
    22 
       
    23 //  INCLUDES
       
    24 #include    <e32base.h>
       
    25 #include    <f32file.h>
       
    26 #include    <analyzetool/atcommon.h>
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CATStorageServer;
       
    30 class CATMemoryEntry;
       
    31 
       
    32 // CLASS DECLARATIONS
       
    33 
       
    34 /**
       
    35 *  A class for storing memory addresses and sizes of allocations.
       
    36 *  Needed for giving allocation information for the configuration UI.
       
    37 */
       
    38 class TAllocInfo
       
    39     {
       
    40     public:
       
    41     
       
    42     // Constructor
       
    43     TAllocInfo( TUint32 aMemAddress, TInt aAllocSize );
       
    44     
       
    45     /** Address of a memory allocation. */
       
    46     const TUint32 iMemAddress;
       
    47     
       
    48     /** Size of the associated allocation. */
       
    49     const TInt iAllocSize;
       
    50     };
       
    51 
       
    52 
       
    53 /**
       
    54 *  The session class for Storage Server.
       
    55 *  When the Storage Server client connects to the server, a new object of this
       
    56 *  class is constructed. So, for every client there is an associated object
       
    57 *  of this class. CATStorageServer forwards all client messages to their associated
       
    58 *  session objects.
       
    59 */
       
    60 class CATStorageServerSession : public CSession2
       
    61     {
       
    62     public: // Enumerations
       
    63         
       
    64     public:  // Constructors and destructor
       
    65         
       
    66         /**
       
    67         * Two-phased constructor that can leave.
       
    68         * @return A new instance of this class
       
    69         */
       
    70         static CATStorageServerSession* NewL( CATStorageServer& aStorageServer );
       
    71         
       
    72         /**
       
    73         * Two-phased constructor that can leave and leaves a pointer
       
    74         * on the cleanup stack.
       
    75         * @return A new instance of this class
       
    76         */
       
    77         static CATStorageServerSession* NewLC( CATStorageServer& aStorageServer );
       
    78         
       
    79         /**
       
    80         * Destructor
       
    81         */
       
    82         virtual ~CATStorageServerSession();
       
    83         
       
    84     public: // Functions from base classes 
       
    85         
       
    86         /**
       
    87         * Receives messages sent by a client.
       
    88         * @param aMessage A message from a client
       
    89         */
       
    90         virtual void ServiceL( const RMessage2& aMessage );
       
    91         
       
    92     protected: // new functions
       
    93         
       
    94         /**
       
    95         * Initializes this session for logging. This includes opening a logging file
       
    96         * with a requested name. The method is to be called as the first method after
       
    97         * connecting to the server. The method logs information on process starting into
       
    98         * the just opened logging file.
       
    99         * If a logging session is already ongoing, the method makes the client raise an
       
   100         * STSEClient: 3 panic, and returns KErrCancel.
       
   101         * @param aMessage A message that includes parameters sent by the client.
       
   102         * @return KErrNone, if successful; KErrCancel, if a logging session is already
       
   103         * ongoing. Otherwise one of the other system wide error codes.
       
   104         */
       
   105         TInt LogProcessStartedL( const RMessage2& aMessage );
       
   106         
       
   107         /**
       
   108         * Initializes this session for logging. The method is to be called as the first
       
   109         * method after connecting to the server. The method logs information on process
       
   110         * starting into debug channel.
       
   111         * If a logging session is already ongoing, the method makes the client raise an
       
   112         * STSEClient: 3 panic, and returns KErrCancel.
       
   113         * @param aMessage A message that includes parameters sent by the client.
       
   114         * @return KErrNone, if successful; KErrCancel, if a logging session is already
       
   115         * ongoing. Otherwise one of the other system wide error codes.
       
   116         */
       
   117         TInt LogProcessStartTraceL( const RMessage2& aMessage );
       
   118          
       
   119         /**
       
   120         * Logs information on a DLL load into the opened file.
       
   121         * If a logging session is not ongoing, the method makes the client raise an
       
   122         * STSEClient: 3 panic, and returns KErrCancel.
       
   123         * @param aMessage A message that includes parameters sent by the client.
       
   124         * @return KErrNone, if successful; KErrCancel, if a logging session is not
       
   125         *   currently ongoing; Otherwise one of the other system wide error codes.
       
   126         */
       
   127         TInt LogDllLoadedL( const RMessage2& aMessage );
       
   128         
       
   129         /**
       
   130         * Logs information on a DLL load into debug channel.
       
   131         * If a logging session is not ongoing, the method makes the client raise an
       
   132         * STSEClient: 3 panic, and returns KErrCancel.
       
   133         * @param aMessage A message that includes parameters sent by the client.
       
   134         * @return KErrNone, if successful; KErrCancel, if a logging session is not
       
   135         *   currently ongoing; Otherwise one of the other system wide error codes.
       
   136         */
       
   137         TInt LogDllLoadTraceL( const RMessage2& aMessage );
       
   138         
       
   139         /**
       
   140         * Logs information on a DLL unload into the opened file.
       
   141         * If a logging session is not ongoing, the method makes the client raise an
       
   142         * STSEClient: 3 panic, and returns KErrCancel.
       
   143         * @param aMessage A message that includes parameters sent by the client.
       
   144         * @return KErrNone, if successful; KErrCancel, if a logging session is not
       
   145         *   currently ongoing; Otherwise one of the other system wide error codes.
       
   146         */
       
   147         TInt LogDllUnloadedL( const RMessage2& aMessage );
       
   148         
       
   149         /**
       
   150         * Logs information on a DLL unload into debug channel.
       
   151         * If a logging session is not ongoing, the method makes the client raise an
       
   152         * STSEClient: 3 panic, and returns KErrCancel.
       
   153         * @param aMessage A message that includes parameters sent by the client.
       
   154         * @return KErrNone, if successful; KErrCancel, if a logging session is not
       
   155         *   currently ongoing; Otherwise one of the other system wide error codes.
       
   156         */
       
   157         TInt LogDllUnloadTraceL( const RMessage2& aMessage );
       
   158         
       
   159         /**
       
   160         * Stores a memory allocation (memory address, current call stack, allocation
       
   161         * time and allocation size) in an internal array.
       
   162         * If a logging session is not ongoing, the method makes the client raise an
       
   163         * STSEClient: 3 panic, and returns KErrCancel.
       
   164         * @param aMessage A message that includes parameters sent by the client.
       
   165         * @return KErrNone, if successful; KErrCancel, if a logging session is not
       
   166         *   currently ongoing; KErrAlreadyExists, if an attempt is being made to allocate
       
   167         *   again an already allocated memory area; Otherwise one of the other system
       
   168         *   wide error codes.
       
   169         */
       
   170         TInt LogMemoryAllocatedL( const RMessage2& aMessage );
       
   171         
       
   172         /**
       
   173         * Logs information on a memory allocation into debug channel.
       
   174         * If a logging session is not ongoing, the method makes the client raise an
       
   175         * STSEClient: 3 panic, and returns KErrCancel.
       
   176         * @param aMessage A message that includes parameters sent by the client.
       
   177         * @return KErrNone, if successful; KErrCancel, if a logging session is not
       
   178         *   currently ongoing; KErrAlreadyExists, if an attempt is being made to allocate
       
   179         *   again an already allocated memory area; Otherwise one of the other system
       
   180         *   wide error codes.
       
   181         */
       
   182         TInt LogMemoryAllocTraceL( const RMessage2& aMessage );
       
   183                 
       
   184         /**
       
   185         * Check a memory allocation (memory address) from an internal array.
       
   186         * If a logging session is not ongoing, the method makes the client raise an
       
   187         * STSEClient: 3 panic, and returns KErrCancel.
       
   188         * @param aMessage A message that includes parameters sent by the client.
       
   189         * @param aRemoveAlloc Boolean to enable removing the found address from allocations.
       
   190         * @return KErrNone, if memory address found in array; 
       
   191         *   KErrNotFound, if the requested memory address was not found.
       
   192         */
       
   193         TInt IsMemoryAdded( const RMessage2& aMessage, const TBool aRemoveAlloc = EFalse );
       
   194         
       
   195         /**
       
   196         * Removes a memory allocation (memory address, current call stack, allocation
       
   197         * time and allocation size) from an internal array.
       
   198         * If a logging session is not ongoing, the method makes the client raise an
       
   199         * STSEClient: 3 panic, and returns KErrCancel.
       
   200         * @param aMessage A message that includes parameters sent by the client.
       
   201         * @return KErrNone, if successful; KErrCancel, if a logging session is not
       
   202         *   currently ongoing; KErrNotFound, if the requested memory address was not
       
   203         *   found; Otherwise one of the other system wide error codes.
       
   204         */
       
   205         TInt LogMemoryFreedL( const RMessage2& aMessage );
       
   206         
       
   207         /**
       
   208         * Logs information on freeing of a memory allocatin into debug channel.
       
   209         * If a logging session is not ongoing, the method makes the client raise an
       
   210         * STSEClient: 3 panic, and returns KErrCancel.
       
   211         * @param aMessage A message that includes parameters sent by the client.
       
   212         * @return KErrNone, if successful; KErrCancel, if a logging session is not
       
   213         *   currently ongoing; KErrNotFound, if the requested memory address was not
       
   214         *   found; Otherwise one of the other system wide error codes.
       
   215         */
       
   216         TInt LogMemoryFreedTraceL( const RMessage2& aMessage );
       
   217         
       
   218         /**
       
   219         * Logs all non-released memory allocations into the opened file as memory leaks.
       
   220         * Then the method logs a number of possibly occured handle leaks into the file.
       
   221         * Next, the method logs information on process ending into the logging file.
       
   222         * Finally, this method closes the logging file opened for the connected process,
       
   223         * and ends the current logging session. However, this method does not end the 
       
   224         * actual client-server session.
       
   225         * If a logging session is not ongoing, the method makes the client raise an
       
   226         * STSEClient: 3 panic, and returns KErrCancel.
       
   227         * @param aMessage A message that includes parameters sent by the client.
       
   228         * @return KErrNone, if successful; KErrCancel, if a logging session is not
       
   229         *   currently ongoing; KErrNotSupported if this method is called with a wrong
       
   230         *   process id from the client. Otherwise one of the other system wide error
       
   231         *   codes.
       
   232         */
       
   233         TInt LogProcessEndedL( const RMessage2& aMessage );
       
   234         
       
   235         /**
       
   236         * Logs a number of possibly occured handle leaks into debug channel. Then, the method
       
   237         * logs information on process ending into debug channel. The method also
       
   238         * ends the current logging session. However, this method does not end the actual
       
   239         * client-server session.
       
   240         * If a logging session is not ongoing, the method makes the client raise an
       
   241         * STSEClient: 3 panic, and returns KErrCancel.
       
   242         * @param aMessage A message that includes parameters sent by the client.
       
   243         * @return KErrNone, if successful; KErrCancel, if a logging session is not
       
   244         *   currently ongoing; KErrNotSupported if this method is called with a wrong
       
   245         *   process id from the client. Otherwise one of the other system wide error
       
   246         *   codes.
       
   247         */
       
   248         TInt LogProcessEndTraceL( const RMessage2& aMessage );
       
   249         
       
   250         /**
       
   251         * Checks if a given memory address can be found.
       
   252         * If a logging session is not ongoing, the method makes the client raise an
       
   253         * STSEClient: 3 panic, and returns KErrCancel.
       
   254         * @param aMessage A message that includes parameters sent by the client.
       
   255         * @return When the system is logging into a file: the index of a found 
       
   256         *   memory address, or KErrNotFound, if a matching memory address cannot
       
   257         *   be found. KErrNone, when the system is not logging into a file.
       
   258         *   KErrCancel, if a logging session is not currently ongoing.
       
   259         */
       
   260         TInt CheckMemoryAddressL( const RMessage2& aMessage );
       
   261         
       
   262         /**
       
   263         * Checks if a given memory address can be found.
       
   264         * If a logging session is not ongoing, the method makes the client raise an
       
   265         * STSEClient: 3 panic, and returns KErrCancel.
       
   266         * @param aMessage A message that includes parameters sent by the client.
       
   267         * @return When the system is logging into a file: the index of a found 
       
   268         *   memory address, or KErrNotFound, if a matching memory address cannot
       
   269         *   be found. KErrNone, when the system is not logging into a file.
       
   270         *   KErrCancel, if a logging session is not currently ongoing.
       
   271         */
       
   272         TInt CheckMemoryAddressTrace( const RMessage2& aMessage );
       
   273         
       
   274         /**
       
   275         * Gets all the processes currently logging with AnalyzeTool
       
   276         * @param aMessage A message that includes parameters sent by the client.
       
   277         *   On return a buffer including all the currently logging processes is written
       
   278         *   into this message.
       
   279         * @return KErrNone, if successful; otherwise one of the other system wide error
       
   280         *   codes.
       
   281         */
       
   282         TInt GetProcessesL( const RMessage2& aMessage );
       
   283         
       
   284         /**
       
   285         * Gets all the DLLs loaded by the process determined by the parameters.
       
   286         * @param aMessage A message that includes parameters sent by the client.
       
   287         *   A buffer including all the DLLs loaded by the requested process is
       
   288         *   written into this message.
       
   289         * @return KErrNone, if successful; KErrNotFound, if the requested process was
       
   290         *   not found; otherwise one of the other system wide error codes.
       
   291         */
       
   292         TInt GetDllsL( const RMessage2& aMessage );
       
   293         
       
   294         /**
       
   295         * Gets the logging mode of the process determined by the parameters.
       
   296         * @param aMessage A message that includes parameters sent by the client.
       
   297         *   On return, the logging mode is written into this message.
       
   298         * @return KErrNone, if successful; KErrNotFound, if the requested process was
       
   299         *   not found; otherwise one of the other system wide error codes.
       
   300         */
       
   301         TInt GetLoggingModeL( const RMessage2& aMessage );
       
   302         
       
   303         /**
       
   304         * Starts a sub test for the given process.
       
   305         * @param aMessage A message that includes parameters sent by the client.
       
   306         * @return KErrNone, if successful; KErrNotFound, if the requested process is not
       
   307         *   found; KErrNotSupported, if the requested process does not have a logging
       
   308         *   session ongoing or its logging mode is not EATLogToTrace; Otherwise one of the
       
   309         *   other system wide error codes.
       
   310         */
       
   311         TInt StartSubtestL( const RMessage2& aMessage );
       
   312         
       
   313         /**
       
   314         * Stops a sub test for the given process.
       
   315         * @param aMessage A message that includes parameters sent by the client.
       
   316         * @return KErrNone, if successful; KErrNotFound, if the requested process is not
       
   317         *   found; KErrNotSupported, if the requested process does not have a logging
       
   318         *   session ongoing or its logging mode is not EATLogToTrace; Otherwise one of the
       
   319         *   other system wide error codes.
       
   320         */
       
   321         TInt StopSubtestL( const RMessage2& aMessage );
       
   322         
       
   323         /**
       
   324         * Starts a sub test for the calling process. Does not need a PID from the client.
       
   325         * @param aMessage A message that includes parameters sent by the client.
       
   326         * @return KErrNone, if successful; KErrNotSupported, if the calling process
       
   327         *   does not have a logging session ongoing or its logging mode is not
       
   328         *   EATLogToTrace; Otherwise one of the other system wide error codes.
       
   329         */
       
   330         TInt StartSubtest2L( const RMessage2& aMessage );
       
   331         
       
   332         /**
       
   333         * Stops a sub test for the calling process. Does not need a PID from the client.
       
   334         * @param aMessage A message that includes parameters sent by the client.
       
   335         * @return KErrNone, if successful; KErrNotSupported, if the calling process
       
   336         *   does not have a logging session ongoing or its logging mode is not
       
   337         *   EATLogToTrace; Otherwise one of the other system wide error codes.
       
   338         */
       
   339         TInt StopSubtest2( const RMessage2& aMessage );
       
   340         
       
   341         /**
       
   342         * Gets the number and total size of the current memory chunks allocated by the
       
   343         * requested process.
       
   344         * @param aMessage A message that includes parameters sent by the client. The
       
   345         *   requested information is written into this message.
       
   346         * @return KErrNone, if successful; KErrNotFound, if the requested process was
       
   347         *   not found; otherwise one of the other system wide error codes.
       
   348         */
       
   349         TInt GetCurrentAllocsL( const RMessage2& aMessage );
       
   350         
       
   351         /**
       
   352         * Gets the maximum number of memory chunks and the maximum amount of memory 
       
   353         * allocated by the requested process during the test run.
       
   354         * @param aMessage A message that includes parameters sent by the client. The
       
   355         *   requested information is written into this message.
       
   356         * @return KErrNone, if successful; KErrNotFound, if the requested process was
       
   357         *   not found; otherwise one of the other system wide error codes.
       
   358         */
       
   359         TInt GetMaxAllocsL( const RMessage2& aMessage );
       
   360         
       
   361         /**
       
   362         * Cancels logging for the requested process. After logging of a given process
       
   363         * has been cancelled, the session associated with that process will not be
       
   364         * usable anymore. If a process wants to start logging again, it needs to close
       
   365         * the handle and open it again in order to create a new session. Until then, any
       
   366         * of the server's methods that can be called by the client will return
       
   367         * KErrCancel.
       
   368         * @param aMessage A message that includes parameters sent by the client.
       
   369         * @return KErrNone, if successful; KErrNotFound, if the requested process was
       
   370         *   not found; otherwise one of the other system wide error codes.
       
   371         */
       
   372         TInt CancelLoggingL( const RMessage2& aMessage );
       
   373         
       
   374         /**
       
   375         * Gets the logging file of the process determined by the parameters.
       
   376         * @param aMessage A message that includes parameters sent by the client.
       
   377         *   On return, the logging file is written into this message.
       
   378         * @return KErrNone, if successful; KErrNotFound, if the requested process was
       
   379         *   not found; otherwise one of the other system wide error codes.
       
   380         */
       
   381         TInt GetLoggingFileL( const RMessage2& aMessage );
       
   382         
       
   383         /**
       
   384         * Gets the mode of the process determined by the parameters.
       
   385         * @param aMessage A message that includes parameters sent by the client.
       
   386         *   On return, the logging file is written into this message.
       
   387         * @return KErrNone, if successful; KErrNotFound, if the requested process was
       
   388         *   not found; otherwise one of the other system wide error codes.
       
   389         */
       
   390         TInt GetUdebL( const RMessage2& aMessage );
       
   391         
       
   392         /**
       
   393         * Sets the mode of the process determined by the parameters.
       
   394         * @param aMessage A message that includes parameters sent by the client.
       
   395         */
       
   396         void SetUdeb( const RMessage2& aMessage );
       
   397         
       
   398     private:  // New functions for internal use  
       
   399     
       
   400         /**
       
   401         * Releases the resources reserved by this object, and before closing the logging
       
   402         * file and file server session, the method logs information on the occured error
       
   403         * into the logging file.
       
   404         * @param aError The error code to be logged.
       
   405         */
       
   406         void HandleError( TInt aError );
       
   407         
       
   408         /**
       
   409         * Releases the resources reserved by this object, and logs information on the
       
   410         * occured error into debug channel.
       
   411         * @param aError The error code to be logged.
       
   412         */
       
   413         void HandleErrorTrace( TInt aError );
       
   414         
       
   415         /**
       
   416         * Opens a file server session and a file with the name specified.
       
   417         * @param aFileName The name of the file into which to log.
       
   418         * @param aProcessName Current process name.
       
   419         * @return KErrNone, if successful; otherwise one of the other system wide
       
   420         *   error codes.
       
   421         */
       
   422         TInt OpenFsAndFile( const TDesC& aFileName, const TDesC8& aProcessName );
       
   423         
       
   424         /**
       
   425         * Method is used to parse file name extension.
       
   426         * @param aFileName The name of the file into which to log.
       
   427         * @param aExtension Parsed file extension. 
       
   428         */
       
   429         void ParseExtension( TDes& aFileName, TDes& aExtension );
       
   430         
       
   431         /**
       
   432         * Called internally when need generate new file name.
       
   433         * @param aFileName The name of the file into which to log.
       
   434         * @param aProcessName Current process name.
       
   435         */
       
   436         void GenerateNewFileName( TDes& aFileName, const TDesC8& aProcessName );
       
   437         
       
   438         /**
       
   439         * Method is used to check that file exists and is valid.
       
   440         * @param aFileName The name of the file into which to log.
       
   441         */
       
   442         void CheckIfFileAlreadyExist( const TDes& aFileName );
       
   443         
       
   444         /**
       
   445         * Method is used to check file version.
       
   446         * @param aFileName The name of the file into which to log.
       
   447         */
       
   448         void CheckFileVersion( const TDes& aFileName );
       
   449         
       
   450         /**
       
   451         * Closes the handles to the file server session and to the file (if currently open).
       
   452         */
       
   453         void CloseFsAndFile();
       
   454         
       
   455         /**
       
   456         * Writes the memory leaks stored in the iLeakArray member array into the
       
   457         * logging file opened for the current logging session. If the method is
       
   458         * called in a wrong program state (logging session is not ongoing, or the
       
   459         * logging mode is not EATLogToFile), STSEClient: 4, and STSEServer: 4
       
   460         * panics are raised.
       
   461         * @param aMessage The current message from the client.
       
   462         * @return KErrNone, if successful; otherwise one of the other system wide
       
   463         *   error codes.
       
   464         */
       
   465         TInt PrintLeaksL( const RMessage2& aMessage );
       
   466         
       
   467         /**
       
   468         * Sets the server's mode of operation. The operation mode is determined with
       
   469         * an enumeration value, which is received from the client. If the method is
       
   470         * called in a wrong program state (logging session is ongoing), STSEClient: 4,
       
   471         * and STSEServer: 4 panics are raised.
       
   472         * @param aMessage The current message from the client.
       
   473         */
       
   474         void SetLogOption( const RMessage2& aMessage );
       
   475         
       
   476         /**
       
   477         * Logs the given descriptor through debug channel.
       
   478         * @param aLogString The descriptor to be logged.
       
   479         * @return KErrNone, if successful; KErrNotSupported, if a logging session is not
       
   480         *   ongoing, or the logging mode is not EATLogToTrace;
       
   481         */
       
   482         TInt LogThroughTrace( const TDesC& aLogString ) const;
       
   483         
       
   484         /**
       
   485         * Gives a reference to the allocation info array of this class.
       
   486         * @return A reference to iAllocInfoArray array
       
   487         */
       
   488         RArray<TAllocInfo>& AllocInfoArray();
       
   489                
       
   490         /**
       
   491         * Creates a panic in the associated client's code.
       
   492         * @param aPanic The panic code
       
   493         * @param aMessage The message associated with this panic.
       
   494         */
       
   495         void PanicClient( TInt aPanic, const RMessage2& aMessage );
       
   496         
       
   497         /**
       
   498         * Logs the abnormal end to the debug channel (If logging mode is EATLogToTrace) 
       
   499         * and to the file(If logging mode is EATLogToFile).
       
   500         */
       
   501         void LogAbnormalEnd();
       
   502         
       
   503         /**
       
   504         * Get the current universal time.
       
   505         * @return Time
       
   506         */
       
   507         TInt64 GetTime();
       
   508         
       
   509     private: // Constructors 
       
   510         
       
   511         /**
       
   512         * C++ default constructor.
       
   513         */
       
   514         CATStorageServerSession( CATStorageServer& aStorageServer );
       
   515         
       
   516         /**
       
   517         *  Symbian 2nd phase constructor.
       
   518         */
       
   519         void ConstructL();   
       
   520         
       
   521     private: // Data
       
   522         
       
   523         /** A reference to the CATStorageServer object that has created this session */    
       
   524         CATStorageServer& iStorageServer;
       
   525                
       
   526         /** A handle to a file server */
       
   527         RFs iFileServer;
       
   528         
       
   529         /** A handle to a file */
       
   530         RFile iFile;
       
   531         
       
   532         /** A member variable for storing results of server function calls. */ 
       
   533         TInt iError;
       
   534         
       
   535         /** An object for getting time stamps */ 
       
   536         TTime iTime;
       
   537         
       
   538         /** 
       
   539         * An array for storing CATMemoryEntry pointers. Used when logging
       
   540         * to an S60 file.
       
   541         */
       
   542         RPointerArray<CATMemoryEntry> iLeakArray;
       
   543         
       
   544         /** 
       
   545         * An array for storing TAllocInfo objects. Used for keeping records on memory
       
   546         * allocations and their sizes.
       
   547         */
       
   548         RArray<TAllocInfo> iAllocInfoArray;
       
   549         
       
   550         /** The ID of the process associated with this session. */
       
   551         TUint iProcessId;
       
   552         
       
   553         /**
       
   554         * A boolean telling whether this session has been initialized for logging
       
   555         * ( whether the client's LogProcessStarted() method has been called ) or not.
       
   556         */
       
   557         TBool iLoggingOngoing;
       
   558         
       
   559         /**
       
   560         * A variable telling the number of microseconds from January 1st, 0 AD
       
   561         * nominal Gregorian to January 1st, 1970 AD nominal Gregorian. 
       
   562         */
       
   563         TInt64 iMicroSecondsAt1970;
       
   564         
       
   565         /**
       
   566         * An enumeration that tells the current operation mode of the Storage Server.
       
   567         */
       
   568         TATLogOption iLogOption;
       
   569         
       
   570         /** The total size of all the current allocations of this process */
       
   571         TUint32 iCurAllocSize;
       
   572         
       
   573         /** The maximum number of allocations of this process */
       
   574         TUint32 iMaxAllocs;
       
   575         
       
   576         /** The maximum total size of allocations of this process */
       
   577         TUint32 iMaxAllocSize;
       
   578         
       
   579         /** The logging file of this process */
       
   580         TBuf8<KMaxFileName> iLogFile;
       
   581 
       
   582         /** The mode of the session. Default is 1 = UDEB */
       
   583         TUint32 iIsUdeb;
       
   584     };
       
   585 
       
   586 #endif      // ATSTORAGESERVERSESSION_H
       
   587 
       
   588 // End of File