devicediagnosticsfw/diagframework/inc/diagexecplanentryimplsuite.h
branchRCL_3
changeset 62 19bba8228ff0
parent 0 b497e44ab2fc
equal deleted inserted replaced
61:b183ec05bd8c 62:19bba8228ff0
       
     1 /*
       
     2 * Copyright (c) 2007 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:  Class declaration for CDiagExecPlanEntryImplSuite
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef DIAGEXECPLANENTRYIMPLSUITE_H
       
    20 #define DIAGEXECPLANENTRYIMPLSUITE_H
       
    21 
       
    22 // SYSTEM INCLUDE FILES
       
    23 #include <DiagSuitePlugin.h>            // MDiagSuitePlugin::TStopReason
       
    24 #include <DiagSuiteObserver.h>          // MDiagSuiteObserver
       
    25 
       
    26 // USER INCLUDE FILES
       
    27 #include "diagexecplanentryimpl.h"      // CDiagExecPlanEntryImpl
       
    28 
       
    29 // FORWARD DECLARATION
       
    30 class MDiagSuitePlugin;
       
    31 
       
    32 /**
       
    33 * Diagnostics Plug-in Execution Plan Entry Implementation for Suite plugin
       
    34 *
       
    35 * This class implements CDiagExecPlanEntryImplSuite. It is meant to be private
       
    36 *   to Diagnostics Framework and not exported.
       
    37 *
       
    38 * @since S60 v5.0
       
    39 *
       
    40 */
       
    41 NONSHARABLE_CLASS( CDiagExecPlanEntryImplSuite ) : public CDiagExecPlanEntryImpl,
       
    42                                                    public MDiagSuiteObserver
       
    43     {
       
    44 public: // Public constructors and destructors
       
    45     /**
       
    46     * Symbian two-phased constructor
       
    47     *   
       
    48     * @param aEngine - Diagnostics Engine
       
    49     * @param aEngineConfig - Engine configuration.
       
    50     * @param aObserver - Execution plan entry observer.
       
    51     * @param aPlugin - Suite plug-in that this plan entry represents.
       
    52     * @param aAsDependency - Whether this item is being executed as dependency or not.
       
    53     * @param aType - Type of execution. @see CDiagExecPlanEntryImpl::TType
       
    54     *
       
    55     * @return a new instance of CDiagExecPlanEntryImplSuite
       
    56     */
       
    57     static CDiagExecPlanEntryImplSuite* NewL( MDiagEngineCommon& aEngine,
       
    58                                               const TDiagEngineConfig& aEngineConfig,
       
    59                                               MDiagExecPlanEntryImplObserver& aObserver,
       
    60                                               MDiagSuitePlugin& aPlugin,
       
    61                                               TBool aAsDependency,
       
    62                                               TType aType );
       
    63 
       
    64     /**
       
    65     * Symbian two-phased constructor
       
    66     *  This will leave a entry in clean up stack.
       
    67     *
       
    68     * @param aEngine - Diagnostics Engine
       
    69     * @param aEngineConfig - Engine configuration.
       
    70     * @param aObserver - Execution plan entry observer.
       
    71     * @param aPlugin - Suite plug-in that this plan entry represents.
       
    72     * @param aAsDependency - Whether this item is being executed as dependency or not.
       
    73     * @param aType - Type of execution. @see CDiagExecPlanEntryImpl::TType
       
    74     *
       
    75     * @return a new instance of CDiagExecPlanEntryImplSuite
       
    76     */
       
    77     static CDiagExecPlanEntryImplSuite* NewLC( MDiagEngineCommon& aEngine,
       
    78                                                const TDiagEngineConfig& aEngineConfig,
       
    79                                                MDiagExecPlanEntryImplObserver& aObserver,
       
    80                                                MDiagSuitePlugin& aPlugin,
       
    81                                                TBool aAsDependency,
       
    82                                                TType aType );
       
    83 
       
    84     /**
       
    85     * C++ destructor
       
    86     */
       
    87     virtual ~CDiagExecPlanEntryImplSuite();
       
    88 
       
    89 public:     // new public api
       
    90     /**
       
    91     * Get suite plugin associated.
       
    92     */
       
    93     MDiagSuitePlugin& SuitePlugin();
       
    94 
       
    95 private:    // from CActive
       
    96     /*
       
    97     * @see CActive::RunL
       
    98     */
       
    99     virtual void RunL();
       
   100 
       
   101     /*
       
   102     * @see CActive::DoCancel
       
   103     */
       
   104     virtual void DoCancel();
       
   105     
       
   106 
       
   107 private:     // from CDiagExecPlanEntryImpl
       
   108     /**
       
   109     * @see CDiagExecPlanEntryImpl::ExecuteL
       
   110     */
       
   111     virtual void ExecuteL();
       
   112 
       
   113     /**
       
   114     * @see CDiagEXecPlanEntryImpl::StopExecutionByWatchdogL
       
   115     */
       
   116     virtual void StopExecutionByWatchdogL();
       
   117 
       
   118     /**
       
   119     * @see CDiagEXecPlanEntryImpl::StopExecutionByClientL
       
   120     */
       
   121     virtual void DoStopExecutionByClientL( MDiagEngineCommon::TCancelMode aCancelMode );
       
   122 
       
   123     /**
       
   124     * @see CDiagEXecPlanEntryImpl::SuspendL
       
   125     */
       
   126     virtual void SuspendL();
       
   127 
       
   128     /**
       
   129     * @see CDiagEXecPlanEntryImpl::ResumeL
       
   130     */
       
   131     virtual void ResumeL();
       
   132 
       
   133 
       
   134 private: // from MDiagSuiteObserver
       
   135     /**
       
   136     * Notify engine of suite plug-in execution completion.
       
   137     * 
       
   138     * @see MDiagSuitePlugin::ContinueExecutionL
       
   139     */
       
   140     virtual void ContinueExecutionL( const MDiagSuitePlugin& aSender );
       
   141 
       
   142 
       
   143 private:    // private methods
       
   144     /**
       
   145     * C++ constructor
       
   146     *   
       
   147     * @param aEngine - Diagnostics Engine
       
   148     * @param aEngineConfig - Engine configuration.
       
   149     * @param aObserver - Execution plan entry observer.
       
   150     * @param aPlugin - Suite plug-in that this plan entry represents.
       
   151     * @param aAsDependency - Whether this item is being executed as dependency or not.
       
   152     * @param aType - Type of execution. @see CDiagExecPlanEntryImpl::TType
       
   153     */
       
   154     CDiagExecPlanEntryImplSuite( MDiagEngineCommon& aEngine,
       
   155                                  const TDiagEngineConfig& aEngineConfig,
       
   156                                  MDiagExecPlanEntryImplObserver& aObserver,
       
   157                                  MDiagSuitePlugin& aPlugin,
       
   158                                  TBool aAsDependency,
       
   159                                  TType aType );
       
   160 
       
   161     /**
       
   162     * Stop suite plug-in.
       
   163     * 
       
   164     * @param aStopReason - Stop reason to pass to suite.
       
   165     */
       
   166     void StopSuitePluginL( MDiagSuitePlugin::TStopReason aStopReason );
       
   167     };
       
   168 
       
   169 #endif // DIAGEXECPLANENTRYIMPLSUITE_H
       
   170 
       
   171 // End of File
       
   172