gssettingsuis/Gs/GSDiagnosticsPlugin/inc/GSDiagnosticsPlugin.h
branchRCL_3
changeset 54 7e0eff37aedb
parent 0 8c5d936e5675
equal deleted inserted replaced
53:8ee96d21d9bf 54:7e0eff37aedb
       
     1 /*
       
     2 * Copyright (c) 2005 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:  GSDiagnosticsPlugin implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef GSDIAGNOSTICSPLUGIN_H
       
    19 #define GSDIAGNOSTICSPLUGIN_H
       
    20 
       
    21 // User includes
       
    22 
       
    23 // System includes
       
    24 #include <GSPluginInterface.h>
       
    25 #include <aknview.h>
       
    26 #include <ConeResLoader.h>
       
    27 #include <eikclb.h>
       
    28 
       
    29 // Classes referenced
       
    30 class CImplementationInformation;
       
    31 
       
    32 
       
    33 // Constants
       
    34 const TUid KGSDiagnosticsPluginUID = { 0x102750D4 };
       
    35 _LIT( KOperatorLogoResourceFileName, "z:GSDiagnosticsPluginRsc.rsc" );
       
    36 
       
    37 // CLASS DECLARATION
       
    38 
       
    39 /**
       
    40 * This is a utility plugin used to find errors in GS plugins.
       
    41 * - Crashes on construction/deletion
       
    42 * - Memory leaks on construction/deletion
       
    43 *
       
    44 */
       
    45 class CGSDiagnosticsPlugin : public CGSPluginInterface
       
    46     {
       
    47     public: // Constructors and destructor
       
    48 
       
    49         /**
       
    50         * Symbian OS two-phased constructor
       
    51         * @return
       
    52         */
       
    53         static CGSDiagnosticsPlugin* NewL( TAny* aInitParams );
       
    54 
       
    55         /**
       
    56         * Destructor.
       
    57         */
       
    58         ~CGSDiagnosticsPlugin();
       
    59 
       
    60     public: // From CAknView
       
    61 
       
    62         /**
       
    63         * See base class.
       
    64         */
       
    65         TUid Id() const;
       
    66 
       
    67     public: // From CGSPluginInterface
       
    68 
       
    69         /**
       
    70         * See base class.
       
    71         */
       
    72         void GetCaptionL( TDes& aCaption ) const;
       
    73 
       
    74         /**
       
    75         * See base class.
       
    76         */
       
    77         TInt PluginProviderCategory() const;
       
    78 
       
    79         /**
       
    80         * See base class.
       
    81         */
       
    82         TGSListboxItemTypes ItemType();
       
    83 
       
    84         /**
       
    85         * See base class.
       
    86         */
       
    87         void GetValue( const TGSPluginValueKeys aKey,
       
    88                        TDes& aValue );
       
    89 
       
    90         /**
       
    91         * See base class.
       
    92         */
       
    93         void HandleSelection( const TGSSelectionTypes aSelectionType );
       
    94 
       
    95         /**
       
    96         * See base class.
       
    97         */
       
    98         TBool Visible() const;
       
    99 
       
   100     protected: // New
       
   101 
       
   102         /**
       
   103         * C++ default constructor.
       
   104         */
       
   105         CGSDiagnosticsPlugin();
       
   106 
       
   107         /**
       
   108         * Symbian OS default constructor.
       
   109         */
       
   110         void ConstructL();
       
   111 
       
   112     protected: // From CAknView
       
   113 
       
   114         /**
       
   115         * This implementation is empty because this class, being just a dialog,
       
   116         * does not implement the CAknView finctionality.
       
   117         */
       
   118         void DoActivateL( const TVwsViewId& aPrevViewId,
       
   119                           TUid aCustomMessageId,
       
   120                           const TDesC8& aCustomMessage );
       
   121 
       
   122         /**
       
   123         * This implementation is empty because this class, being just a dialog,
       
   124         * does not implement the CAknView finctionality.
       
   125         */
       
   126         void DoDeactivate();
       
   127 
       
   128     private: // New
       
   129 
       
   130         /**
       
   131         * Opens localized resource file.
       
   132         */
       
   133         void OpenLocalizedResourceFileL(
       
   134             const TDesC& aResourceFileName,
       
   135             RConeResourceLoader& aResourceLoader );
       
   136 
       
   137         /**
       
   138         * Prints debug info.
       
   139         * @param aInfo info to be printed.
       
   140         */
       
   141         void PrintInfoDebug( CImplementationInformation* aInfo );
       
   142 
       
   143         /**
       
   144         * Checks plugin implementations. Uses __UHEAP_MARK and __UHEAP_MARKEND
       
   145         * so will panic if plugin leaks memory.
       
   146         */
       
   147         void CheckInfoL( TUid aInterfaceUid );
       
   148 
       
   149     protected: // Data
       
   150 
       
   151         // Resource loader.
       
   152         RConeResourceLoader iResources;
       
   153 
       
   154         // Print implementation info.
       
   155         TBool iPrintInfo;
       
   156 
       
   157         // Try loading and deleting each plugin.
       
   158         TBool iTestLoad;
       
   159 
       
   160         // Check heap change in case iTEstLoad in true.
       
   161         TBool iCheckHeap;
       
   162 
       
   163     };
       
   164 
       
   165 #endif // GSDIAGNOSTICSPLUGIN_H
       
   166 // End of File