devicediagnostics/diagplugins/diagbrowserplugin/inc/diagbrowserplugin.h
changeset 0 3ce708148e4d
equal deleted inserted replaced
-1:000000000000 0:3ce708148e4d
       
     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:  This is the declaration of the Browser Test Plugin class.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef DIAGBROWSERPLUGIN_H
       
    20 #define DIAGBROWSERPLUGIN_H
       
    21 
       
    22 // System Include Files
       
    23 #include <DiagTestPluginBase.h>             // CDiagTestPluginBase
       
    24 
       
    25 // Local Include Files
       
    26 #include "diagbrowserpluginmodelobserver.h" // MDiagBrowserPluginModelObserver
       
    27 
       
    28 // Forward Declarations
       
    29 class CDiagBrowserPluginModel;
       
    30 
       
    31 /**
       
    32  *  Diagnostics Browser Test Plugin
       
    33  *  This class defines the browser test plugin.  This plugin is used to
       
    34  *  validate end-to-end browser (HTTP) functionality.
       
    35  *
       
    36  *  @lib diagpluginbase.lib
       
    37  *  @lib diagframework.lib
       
    38  *  @lib commonengine.lib
       
    39  */
       
    40 class CDiagBrowserPlugin : public CDiagTestPluginBase,
       
    41                            public MDiagBrowserPluginModelObserver
       
    42     {
       
    43 
       
    44 public: // New functions
       
    45 
       
    46     /**
       
    47     * Two-phased constructor.
       
    48     *
       
    49     * @return An instance of CDiagBrowserPlugin.
       
    50     */
       
    51     static MDiagPlugin* NewL( TAny* aInitParams );
       
    52 
       
    53     /**
       
    54     * Destructor.
       
    55     */
       
    56     ~CDiagBrowserPlugin();
       
    57     
       
    58     
       
    59     // ADO & Platformization Changes
       
    60     TBool ShowMessageQueryL( TInt aResourceId, TInt &aButtonId  );
       
    61 
       
    62 
       
    63 
       
    64 private: // New functions
       
    65 
       
    66     /**
       
    67     * The default constructor.
       
    68     */
       
    69     CDiagBrowserPlugin( CDiagPluginConstructionParam* aInitParams );
       
    70 
       
    71     /**
       
    72     * Two-phased constructor.
       
    73     */
       
    74     void ConstructL();
       
    75 
       
    76 
       
    77 private: // From base class CDiagTestPluginBase
       
    78 
       
    79     /**
       
    80     * @see CDiagTestPluginBase::Visible()
       
    81     */
       
    82     virtual TBool IsVisible() const;
       
    83 
       
    84     /**
       
    85     * @see CDiagTestPluginBase::RunMode()
       
    86     */
       
    87     virtual TRunMode RunMode() const;
       
    88 
       
    89     /**
       
    90     * @see CDiagTestPluginBase::TotalSteps()
       
    91     */
       
    92     virtual TUint TotalSteps() const;
       
    93 
       
    94     /**
       
    95     * @see CDiagTestPluginBase::GetPluginNameL
       
    96     */
       
    97     virtual HBufC* GetPluginNameL( TNameLayoutType aLayoutType ) const;
       
    98 
       
    99     /**
       
   100     * @see CDiagTestPluginBase::Uid
       
   101     */
       
   102     virtual TUid Uid() const;
       
   103 
       
   104     /**
       
   105     * @see CDiagTestPluginBase::DoRunTestL
       
   106     */
       
   107     virtual void DoRunTestL();
       
   108 
       
   109     /**
       
   110     * @see CDiagTestPluginBase::DoStopAndCleanupL
       
   111     */
       
   112     virtual void DoStopAndCleanupL();
       
   113 
       
   114 
       
   115 private: // From base class CActive
       
   116 
       
   117     /**
       
   118     * Handles active object completion events.
       
   119     */
       
   120     virtual void RunL();
       
   121 
       
   122     /**
       
   123     * Handle active object cancel event.
       
   124     */
       
   125     virtual void DoCancel();
       
   126 
       
   127 
       
   128 private: // From base class MDiagBrowserPluginModelObserver
       
   129 
       
   130     /**
       
   131     * This function notifies that test execution has completed.
       
   132     *
       
   133     * @param aResult The test result.
       
   134     */
       
   135     virtual void TestEndL( CDiagResultsDatabaseItem::TResult aResult );
       
   136 
       
   137     /**
       
   138     * This function notifies of test progress.
       
   139     *
       
   140     * @param aCurrentStep The current execution step.
       
   141     */
       
   142     void TestProgressL( TUint aCurrentStep );
       
   143 
       
   144 
       
   145 private: // Data
       
   146 
       
   147     /** The plugin's model class, which contains the testing logic.  Own. */
       
   148     CDiagBrowserPluginModel* iModel;
       
   149 
       
   150     };
       
   151 
       
   152 #endif // DIAGBROWSERPLUGIN_H
       
   153