memspy/memspy_plat/memspy_api/include/memspy/engine/MemSpyEngine.h
changeset 0 a03f92240627
child 20 ca8a1b6995f6
equal deleted inserted replaced
-1:000000000000 0:a03f92240627
       
     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:
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef MEMSPYENGINE_H
       
    19 #define MEMSPYENGINE_H
       
    20 
       
    21 // System includes
       
    22 #include <e32base.h>
       
    23 #include <memspy/engine/memspyengineoutputsinktype.h>
       
    24 #include <memspy/engine/memspyenginelogger.h>
       
    25 #include <memspy/engine/memspyenginehelperwindowserver.h>
       
    26 
       
    27 // Classes referenced
       
    28 class RFs;
       
    29 class RMemSpyDriverClient;
       
    30 class MMemSpyEngineObserver;
       
    31 class CMemSpyProcess;
       
    32 class CMemSpyThread;
       
    33 class CMemSpyEngineImp;
       
    34 class CMemSpyEngineOutputSink;
       
    35 class CMemSpyEngineServer;
       
    36 class CMemSpyEngineMidwife;
       
    37 class CMemSpyEngineUndertaker;
       
    38 class CMemSpyEngineChunkWatcher;
       
    39 class CMemSpyEngineChunkWatcher;
       
    40 class CMemSpyEngineObjectContainer;
       
    41 class CMemSpyEngineHelperHeap;
       
    42 class CMemSpyEngineHelperStack;
       
    43 class CMemSpyEngineHelperCodeSegment;
       
    44 class CMemSpyEngineHelperChunk;
       
    45 class CMemSpyEngineHelperThread;
       
    46 class CMemSpyEngineHelperProcess;
       
    47 class CMemSpyEngineHelperServer;
       
    48 class CMemSpyEngineHelperActiveObject;
       
    49 class CMemSpyEngineHelperKernelContainers;
       
    50 class CMemSpyEngineHelperFileSystem;
       
    51 class CMemSpyEngineHelperECom;
       
    52 class CMemSpyEngineHelperFbServ;
       
    53 class CMemSpyEngineHelperSysMemTracker;
       
    54 class CMemSpyEngineHelperROM;
       
    55 class CMemSpyEngineHelperRAM;
       
    56 class CMemSpyEngineHelperCondVar;
       
    57 
       
    58 
       
    59 NONSHARABLE_CLASS( CMemSpyEngine ) : public CBase
       
    60     {
       
    61 public:
       
    62     IMPORT_C static CMemSpyEngine* NewL( RFs& aFsSession );
       
    63     IMPORT_C ~CMemSpyEngine();
       
    64 
       
    65 private:
       
    66     CMemSpyEngine();
       
    67     void ConstructL( RFs& aFsSession );
       
    68 
       
    69 public: // API
       
    70     IMPORT_C RFs& FsSession();
       
    71     IMPORT_C CMemSpyEngineObjectContainer& Container();
       
    72     IMPORT_C const CMemSpyEngineObjectContainer& Container() const;
       
    73     IMPORT_C void SetObserver( MMemSpyEngineObserver* aObserver );
       
    74 
       
    75 public:
       
    76     void NotifyContainerChangeL();
       
    77     void NotifyClientServerOperationRequestL( TInt aType );
       
    78 
       
    79 public: // Sink related
       
    80     IMPORT_C CMemSpyEngineOutputSink& Sink();
       
    81     IMPORT_C TMemSpySinkType SinkType();
       
    82     IMPORT_C void InstallSinkL( TMemSpySinkType aType );
       
    83 
       
    84 public: // Misc
       
    85     IMPORT_C void ListOpenFilesL();
       
    86     IMPORT_C void GetVersion( TVersion& aVersion );
       
    87     IMPORT_C TBool IsHelperWindowServerSupported();
       
    88 
       
    89 public: 
       
    90     IMPORT_C CMemSpyEngineHelperHeap& HelperHeap();
       
    91     IMPORT_C CMemSpyEngineHelperStack& HelperStack();
       
    92     IMPORT_C CMemSpyEngineHelperCodeSegment& HelperCodeSegment();
       
    93     IMPORT_C CMemSpyEngineHelperChunk& HelperChunk();
       
    94     IMPORT_C CMemSpyEngineHelperThread& HelperThread();
       
    95     IMPORT_C CMemSpyEngineHelperProcess& HelperProcess();
       
    96     IMPORT_C CMemSpyEngineHelperServer& HelperServer();
       
    97     IMPORT_C CMemSpyEngineHelperActiveObject& HelperActiveObject();
       
    98     IMPORT_C CMemSpyEngineHelperKernelContainers& HelperKernelContainers();
       
    99     IMPORT_C CMemSpyEngineHelperFileSystem& HelperFileSystem();
       
   100     IMPORT_C CMemSpyEngineHelperECom& HelperECom();
       
   101     IMPORT_C CMemSpyEngineHelperSysMemTracker& HelperSysMemTracker();
       
   102     IMPORT_C CMemSpyEngineHelperFbServ& HelperFbServ();
       
   103     IMPORT_C CMemSpyEngineHelperROM& HelperROM();
       
   104     IMPORT_C CMemSpyEngineHelperRAM& HelperRAM();
       
   105     IMPORT_C MMemSpyEngineHelperWindowServer& HelperWindowServer();
       
   106     IMPORT_C CMemSpyEngineHelperCondVar& HelperCondVar();
       
   107 
       
   108 public: // Driver
       
   109     RMemSpyDriverClient& Driver();
       
   110 
       
   111 public: // Event handlers
       
   112     CMemSpyEngineMidwife& Midwife();
       
   113     CMemSpyEngineUndertaker& Undertaker();
       
   114     CMemSpyEngineChunkWatcher& ChunkWatcher();
       
   115 
       
   116 public: // Process related
       
   117     TInt ProcessSuspendAndGetErrorLC( TProcessId aId );
       
   118     void ProcessSuspendLC( TProcessId aId );
       
   119     void ProcessResume();
       
   120     TProcessId SuspendedProcessId() const;
       
   121 
       
   122 private: // Data members
       
   123     CMemSpyEngineImp* iImp;
       
   124     };
       
   125 
       
   126 
       
   127 
       
   128 
       
   129 #endif