deviceencryption/DevEncGsPlugin/inc/devencgsplugin.h
changeset 0 6a9f87576119
equal deleted inserted replaced
-1:000000000000 0:6a9f87576119
       
     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:  DeviceEncryptionGsPlugin implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef DEVENCGSPLUGIN_H
       
    19 #define DEVENCGSPLUGIN_H
       
    20 
       
    21 // User includes
       
    22 #include <../../common/DevEncUids.hrh>
       
    23 
       
    24 // System includes
       
    25 #include <gsplugininterface.h>
       
    26 #include <ConeResLoader.h>
       
    27 #include <AknServerApp.h>
       
    28 #ifdef SYMBIAN_ENABLE_SPLIT_HEADERS
       
    29 #include <eikdgfty.h>
       
    30 #include <eiklibry.h>
       
    31 #endif //SYMBIAN_ENABLE_SPLIT_HEADERS
       
    32 
       
    33 // Classes referenced
       
    34 class CAknNullService;
       
    35 class CRepository;
       
    36 
       
    37 // Constants
       
    38 const TUid KDeviceEncryptionGsPluginUID       = { KDevEncGsPluginUid  };  // dll uid
       
    39 const TUid KDeviceEncryptionGsPluginImplUID   = { KDevEncGsPluginImplUid };  // dll impl uid
       
    40 const TUid KDeviceEncryptionAppUid          = { KDevEncUiUid };  // UI uid
       
    41 
       
    42 _LIT( KDeviceEncryptionApp,    "z:\\sys\\bin\\DevEncUi.exe" );
       
    43 _LIT( KDeviceEncryptionGsPluginResourceFileName, "z:devencGsPluginRsc.rsc" );
       
    44 _LIT( KDeviceEncryptionGsPluginIconDirAndName, "z:devencgsplugin.mbm"); // Use KDC_BITMAP_DIR
       
    45 
       
    46 // CLASS DECLARATION
       
    47 
       
    48 //For embedding CC in CS
       
    49 class TAppInfo
       
    50     {
       
    51     public:
       
    52         TAppInfo( TUid aUid, const TDesC& aFile )
       
    53             : iUid( aUid ), iFile( aFile )
       
    54             {}
       
    55         TUid iUid;
       
    56         TFileName iFile;
       
    57     };
       
    58 
       
    59 
       
    60 /**
       
    61 * CDeviceEncryptionGsPlugin.
       
    62 *
       
    63 * This class handles state and application logic of CDeviceEncryptionGsPlugin.
       
    64 * The plugin is a type of EGSItemTypeSettingDialog and therefore the GS FW will
       
    65 * call HandleSelection() instead of DoActivate(). No CAknView functionality is
       
    66 * supported even though the base class is CAknView derived via
       
    67 * CGSPluginInterface.
       
    68 *
       
    69 */
       
    70 class CDeviceEncryptionGsPlugin : public CGSPluginInterface,
       
    71                           public MAknServerAppExitObserver // Embedding
       
    72     {
       
    73     public: // Constructors and destructor
       
    74 
       
    75         /**
       
    76         * Symbian OS two-phased constructor
       
    77         * @return
       
    78         */
       
    79         static CDeviceEncryptionGsPlugin* NewL( TAny* aInitParams );
       
    80 
       
    81         /**
       
    82         * Destructor.
       
    83         */
       
    84         ~CDeviceEncryptionGsPlugin();
       
    85 
       
    86     public: // From CAknView
       
    87 
       
    88         /**
       
    89         * See base class.
       
    90         */
       
    91         TUid Id() const;
       
    92 
       
    93     public: // From CGSPluginInterface
       
    94 
       
    95         /**
       
    96         * See base class.
       
    97         */
       
    98         void GetCaptionL( TDes& aCaption ) const;
       
    99 
       
   100         /**
       
   101         * See base class.
       
   102         */
       
   103         TInt PluginProviderCategory() const;
       
   104 
       
   105         /**
       
   106         * See base class.
       
   107         */
       
   108         TGSListboxItemTypes ItemType();
       
   109 
       
   110         /**
       
   111         * See base class.
       
   112         */
       
   113         void GetValue( const TGSPluginValueKeys aKey,
       
   114                        TDes& aValue );
       
   115 
       
   116         /**
       
   117         * See base class.
       
   118         */
       
   119         void HandleSelection( const TGSSelectionTypes aSelectionType );
       
   120         
       
   121         /**
       
   122         * See base class.
       
   123         */
       
   124         CGulIcon* CreateIconL( const TUid aIconType );
       
   125 
       
   126     protected: // New
       
   127 
       
   128         /**
       
   129         * C++ default constructor.
       
   130         */
       
   131         CDeviceEncryptionGsPlugin();
       
   132 
       
   133         /**
       
   134         * Symbian OS default constructor.
       
   135         */
       
   136         void ConstructL();
       
   137 
       
   138     protected: // From CAknView
       
   139 
       
   140         /**
       
   141         * This implementation is empty because this class, being just a dialog,
       
   142         * does not implement the CAknView finctionality.
       
   143         */
       
   144         void DoActivateL( const TVwsViewId& aPrevViewId,
       
   145                           TUid aCustomMessageId,
       
   146                           const TDesC8& aCustomMessage );
       
   147 
       
   148         /**
       
   149         * This implementation is empty because this class, being just a dialog,
       
   150         * does not implement the CAknView finctionality.
       
   151         */
       
   152         void DoDeactivate();
       
   153 
       
   154     private:
       
   155 
       
   156         /**
       
   157         * Opens localized resource file.
       
   158         */
       
   159         void OpenLocalizedResourceFileL(
       
   160             const TDesC& aResourceFileName,
       
   161             RConeResourceLoader& aResourceLoader );
       
   162 
       
   163         /**
       
   164         * Launches provisioning application.
       
   165         */
       
   166         void LaunchDEAppL();
       
   167         
       
   168         /**
       
   169         * Launches application as embedded.
       
   170         */
       
   171         void EmbedAppL( const TAppInfo& aApp );
       
   172         
       
   173     protected:
       
   174 
       
   175         //Resource loader.
       
   176         RConeResourceLoader iResources;
       
   177         
       
   178         CAknNullService* iNullService;
       
   179         
       
   180         CApaDocument* iEmbedded;
       
   181     };
       
   182 
       
   183 #endif // DEVENCGSPLUGIN_H
       
   184 // End of File