connectionmonitoring/connectionmonitorplugin/inc/connectionmonitorplugin.h
branchRCL_3
changeset 58 83ca720e2b9a
equal deleted inserted replaced
57:05bc53fe583b 58:83ca720e2b9a
       
     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:  ConnectionMonitorPlugin implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef CONNECTIONMONITORPLUGIN_H
       
    19 #define CONNECTIONMONITORPLUGIN_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 #include <AknServerApp.h>
       
    29 
       
    30 // Classes referenced
       
    31 class CAknNavigationDecorator;
       
    32 class CAknViewAppUi;
       
    33 class CAknNullService;
       
    34 
       
    35 // Constants
       
    36 const TUid KConnectionMonitorPluginUID = { 0x10281BC2 };
       
    37 
       
    38 const TUid KConnectionMonitorAppUid    = { 0x101F84D0 };
       
    39 
       
    40 _LIT( KConnectionMonitorPluginResourceFileName,
       
    41                                     "z:connectionmonitorpluginrsc.rsc" );
       
    42 _LIT( KConnectionMonitorPluginIconDirAndName,
       
    43                                     "z:connectionmonitorplugin.mif ");
       
    44                                                     // Use KDC_BITMAP_DIR
       
    45 
       
    46 // CLASS DECLARATION
       
    47 
       
    48 /**
       
    49 * CConnectionMonitorPlugin.
       
    50 *
       
    51 */
       
    52 class CConnectionMonitorPlugin : 
       
    53                             public CGSPluginInterface,
       
    54                             public MAknServerAppExitObserver // Embedding
       
    55     {
       
    56     public: // Constructors and destructor
       
    57 
       
    58         /**
       
    59         * Symbian OS two-phased constructor
       
    60         * @param aInitParams initialization parameters.
       
    61         * @return new instance of CConnectionMonitorPlugin.
       
    62         */
       
    63         static CConnectionMonitorPlugin* NewL( TAny* aInitParams );
       
    64 
       
    65         /**
       
    66         * Destructor.
       
    67         */
       
    68         ~CConnectionMonitorPlugin();
       
    69 
       
    70     public: // From CAknView
       
    71 
       
    72         /**
       
    73         * From CAknView.
       
    74         * This view's Id.
       
    75         * @return This plugin's UID.
       
    76         */
       
    77         TUid Id() const;
       
    78 
       
    79     public: // From CGSPluginInterface
       
    80 
       
    81         /**
       
    82         * From CGSPluginInterface.
       
    83         * @param aCaption this plugin's caption.
       
    84         */
       
    85         void GetCaptionL( TDes& aCaption ) const;
       
    86 
       
    87         /**
       
    88         * From CGSPluginInterface.
       
    89         * @return this plugin's provider category.
       
    90         */
       
    91         TInt PluginProviderCategory() const;
       
    92 
       
    93         /**
       
    94         * From CGSPluginInterface.
       
    95         * @return this plugin's item type.
       
    96         */
       
    97         TGSListboxItemTypes ItemType();
       
    98 
       
    99         /**
       
   100         * From CGSPluginInterface.
       
   101         * @param aKey key name.
       
   102         * @param aValue key value.
       
   103         */
       
   104         void GetValue( const TGSPluginValueKeys aKey,
       
   105                        TDes& aValue );
       
   106 
       
   107         /**
       
   108         * From CGSPluginInterface.
       
   109         * @param aSelectionType selection type.
       
   110         */
       
   111         void HandleSelection( const TGSSelectionTypes aSelectionType );
       
   112         
       
   113         /**
       
   114         * From CEikonEnv.
       
   115         * @return this plugin's pointer to the created icon.
       
   116         */
       
   117         CGulIcon* CreateIconL( const TUid aIconType );
       
   118 
       
   119     protected: // New
       
   120 
       
   121         /**
       
   122         * C++ default constructor.
       
   123         */
       
   124         CConnectionMonitorPlugin();
       
   125 
       
   126         /**
       
   127         * Symbian OS default constructor.
       
   128         */
       
   129         void ConstructL();
       
   130 
       
   131     protected: // From CAknView
       
   132 
       
   133         /**
       
   134         * From CAknView.
       
   135         * This implementation is empty because this class, being just
       
   136         * a dialog, does not implement the CAknView finctionality.
       
   137         */
       
   138         void DoActivateL( const TVwsViewId& aPrevViewId,
       
   139                           TUid aCustomMessageId,
       
   140                           const TDesC8& aCustomMessage );
       
   141 
       
   142         /**
       
   143         * From CAknView.
       
   144         * This implementation is empty because this class, being just 
       
   145         * a dialog, does not implement the CAknView finctionality.
       
   146         */
       
   147         void DoDeactivate();
       
   148 
       
   149     private: // New
       
   150 
       
   151         /**
       
   152         * Opens localized resource file.
       
   153         */
       
   154         void OpenLocalizedResourceFileL(
       
   155                             const TDesC& aResourceFileName,
       
   156                             RConeResourceLoader& aResourceLoader );
       
   157 
       
   158         /**
       
   159         * Launches ConnectionMonitor application as embedded.
       
   160         */
       
   161         void LaunchConnectionMonitorAppL();
       
   162         
       
   163         /**
       
   164         * Shows an error note in case of error. 
       
   165         * @param aErrorCode The error code.
       
   166         */
       
   167         void ShowErrorNote(TInt aErrorCode);
       
   168 
       
   169         /**
       
   170         * Shows the error note and resolves the error.
       
   171         * @param aErrorCode The error code.
       
   172         */
       
   173         TBool ShowErrorNoteL(TInt aErrorCode);
       
   174     
       
   175         /**
       
   176         * Shows a general error note
       
   177         */
       
   178         void ShowGeneralErrorNoteL();
       
   179         
       
   180     protected: // Data
       
   181 
       
   182         /**
       
   183         * Resource loader for this plugin's resources.
       
   184         */
       
   185         RConeResourceLoader iResources;
       
   186 
       
   187         /**
       
   188         * AVKON NULL Service.
       
   189         * Own.
       
   190         */
       
   191         CAknNullService* iNullService;
       
   192     };
       
   193 
       
   194 #endif // CONNECTIONMONITORPLUGIN_H
       
   195 // End of File