phoneuis/vmbx/gsvmbxplugin/inc/gsvmbxplugin.h
changeset 0 5f000ab63145
equal deleted inserted replaced
-1:000000000000 0:5f000ab63145
       
     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:  gsvmbxplugin implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 #ifndef GSVMBXPLUGIN_H
       
    19 #define GSVMBXPLUGIN_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 KGSVmbxPluginUID = { 0x2000B4D6 };
       
    37 const TUid KGsVmbxAppUid    = { 0x100058F5 };
       
    38 
       
    39 _LIT( KGSVmbxApp, "z:\\sys\\bin\\vm.exe" );
       
    40 _LIT( KVmbxPluginResourceFileName, "z:gsvmbxpluginrsc.rsc" );
       
    41 _LIT( KGSVmbxPluginIconDirAndName, "z:gsvmbxplugin.mif"); // Use KDC_BITMAP_DIR
       
    42 
       
    43 // CLASS DECLARATION
       
    44 
       
    45 //For embedding VMBX in CS
       
    46 class TAppInfo
       
    47     {
       
    48     public:
       
    49         TAppInfo( TUid aUid, const TDesC& aFile )
       
    50             : iUid( aUid ), iFile( aFile )
       
    51             {}
       
    52         TUid iUid;
       
    53         TFileName iFile;
       
    54     };
       
    55 
       
    56 
       
    57 /**
       
    58 * CGSVmbxPlugin.
       
    59 *
       
    60 * This class handles launching of the Voice Mailbox application from the 
       
    61 * General Settings. The plugin is a type of EGSItemTypeSettingDialog and 
       
    62 * therefore the GS FW will call HandleSelection() instead of DoActivate().
       
    63 * No CAknView functionality is supported even though the base class is 
       
    64 * CAknView derived via CGSPluginInterface.
       
    65 *
       
    66 */
       
    67 class CGSVmbxPlugin : public CGSPluginInterface,
       
    68                         public MAknServerAppExitObserver // Embedding
       
    69     {
       
    70     public: // Constructors and destructor
       
    71 
       
    72         /**
       
    73         * Symbian OS two-phased constructor
       
    74         * @return
       
    75         */
       
    76         static CGSVmbxPlugin* NewL( TAny* aInitParams );
       
    77 
       
    78         /**
       
    79         * Destructor.
       
    80         */
       
    81         ~CGSVmbxPlugin();
       
    82 
       
    83     public: // From CAknView
       
    84 
       
    85         /**
       
    86         * See base class.
       
    87         */
       
    88         TUid Id() const;
       
    89 
       
    90     public: // From CGSPluginInterface
       
    91 
       
    92         /**
       
    93         * See base class.
       
    94         */
       
    95         void GetCaptionL( TDes& aCaption ) const;
       
    96 
       
    97         /**
       
    98         * See base class.
       
    99         */
       
   100         TInt PluginProviderCategory() const;
       
   101 
       
   102         /**
       
   103         * See base class.
       
   104         */
       
   105         TGSListboxItemTypes ItemType();
       
   106 
       
   107         /**
       
   108         * See base class.
       
   109         */
       
   110         void GetValue( const TGSPluginValueKeys aKey,
       
   111                        TDes& aValue );
       
   112 
       
   113         /**
       
   114         * See base class.
       
   115         */
       
   116         void HandleSelection( const TGSSelectionTypes aSelectionType );
       
   117         
       
   118         /**
       
   119         * See base class.
       
   120         */
       
   121         CGulIcon* CreateIconL( const TUid aIconType );
       
   122 
       
   123     protected: // New
       
   124 
       
   125         /**
       
   126         * C++ default constructor.
       
   127         */
       
   128         CGSVmbxPlugin();
       
   129 
       
   130         /**
       
   131         * Symbian OS default constructor.
       
   132         */
       
   133         void ConstructL();
       
   134 
       
   135     protected: // From CAknView
       
   136 
       
   137         /**
       
   138         * This implementation is empty because this class, being just a dialog,
       
   139         * does not implement the CAknView functionality.
       
   140         */
       
   141         void DoActivateL( const TVwsViewId& aPrevViewId,
       
   142                           TUid aCustomMessageId,
       
   143                           const TDesC8& aCustomMessage );
       
   144 
       
   145         /**
       
   146         * This implementation is empty because this class, being just a dialog,
       
   147         * does not implement the CAknView functionality.
       
   148         */
       
   149         void DoDeactivate();
       
   150 
       
   151     private: // New
       
   152 
       
   153         /**
       
   154         * Opens localized resource file.
       
   155         */
       
   156         void OpenLocalizedResourceFileL(
       
   157             const TDesC& aResourceFileName,
       
   158             RConeResourceLoader& aResourceLoader );
       
   159         
       
   160         /**
       
   161         * Launches Voice Mailbox application.
       
   162         */
       
   163         void LaunchVoiceMailBoxAppL();
       
   164         
       
   165         /**
       
   166         * Launches application as embedded.
       
   167         */
       
   168         void EmbedAppL( const TAppInfo& aApp );
       
   169         
       
   170     protected: // Data
       
   171 
       
   172         // Resource loader.
       
   173         RConeResourceLoader iResources;
       
   174         
       
   175         // AVKON NULL service. Own.
       
   176         CAknNullService* iNullService;        
       
   177     };
       
   178 
       
   179 #endif // GSVMBXPLUGIN_H
       
   180 // End of File