omaprovisioning/provisioning/AuthTypePlugin/inc/Authtypeplugin.h
changeset 73 ae69c2e8bc34
parent 71 d2517372cc44
child 77 9f85c58c0592
equal deleted inserted replaced
71:d2517372cc44 73:ae69c2e8bc34
     1 /*
       
     2 * Copyright (c) 2008 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:  AuthtypePlugin implementation.
       
    15  *
       
    16 */
       
    17 
       
    18 #ifndef AuthtypePLUGIN_H
       
    19 #define AuthtypePLUGIN_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 #include <AknCapServerClient.h>
       
    30 #include <gsbasecontainer.h>
       
    31 
       
    32 // Classes referenced
       
    33 class CAknNavigationDecorator;
       
    34 class CAknViewAppUi;
       
    35 class CAknNullService;
       
    36 
       
    37 // Constants
       
    38 const TUid KAuthtypePluginUID =
       
    39     {
       
    40     0x2001247D
       
    41     };
       
    42 _LIT( KOperatorLogoResourceFileName, "z:AuthtypePluginRsc.rsc" );
       
    43 _LIT( KAuthtypePluginIconDirAndName, "z:AuthtypePlugin.mif");
       
    44 // Use KDC_BITMAP_DIR
       
    45 
       
    46 const TInt KFirstItemSelected = 0;
       
    47 const TInt KSecondItemSelected = 1;
       
    48 const TInt KThirdItemSelected = 2;
       
    49 
       
    50 const TInt KNetworkPinOnly = 1;
       
    51 const TInt KNetworkorUserPin = 3;
       
    52 const TInt KAllMethodsSupported = 15;
       
    53 
       
    54 // CLASS DECLARATION
       
    55 
       
    56 
       
    57 /**
       
    58  * CAuthtypePlugin.
       
    59  *
       
    60  * This class handles state and application logic of OperatorLogo settings.
       
    61  * The plugin is a type of EGSItemTypeSettingDialog and therefore the GS FW will
       
    62  * call HandleSelection() instead of DoActivate(). No CAknView functionality is
       
    63  * supported even though the base class is CAknView derived via
       
    64  * CGSPluginInterface.
       
    65  *
       
    66  */
       
    67 class CAuthtypePlugin : public CGSPluginInterface,
       
    68     public MAknServerAppExitObserver// Embedding
       
    69     {
       
    70 public:
       
    71     // Constructors and destructor
       
    72 
       
    73     /**
       
    74      * Symbian OS two-phased constructor
       
    75      * @return
       
    76      */
       
    77     static CAuthtypePlugin* NewL(TAny* aInitParams);
       
    78 
       
    79     /**
       
    80      * Destructor.
       
    81      */
       
    82     ~CAuthtypePlugin();
       
    83 
       
    84 public:
       
    85     // From CAknView
       
    86 
       
    87     /**
       
    88      * See base class.
       
    89      */
       
    90     TUid Id() const;
       
    91 
       
    92 public:
       
    93     // 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, TDes& aValue);
       
   114 
       
   115     /**
       
   116      * See base class.
       
   117      */
       
   118     void HandleSelection(const TGSSelectionTypes aSelectionType);
       
   119 
       
   120     /**
       
   121      * See base class.
       
   122      */
       
   123     CGulIcon* CreateIconL(const TUid aIconType);
       
   124 
       
   125     /*
       
   126      * Handles selection item
       
   127      */
       
   128     void HandleItemContentL();
       
   129 
       
   130     /*
       
   131      * Set Cenrep value based on selection of item from list
       
   132      */
       
   133     void SetCenrepItemL(TInt index, TInt auth_value);
       
   134 
       
   135     /* 
       
   136      * popup note shown on selection of 2nd and 3rd item from list 
       
   137      */
       
   138 
       
   139     void ShowPopupNoteL(HBufC *title);
       
   140 
       
   141 protected:
       
   142     // New
       
   143 
       
   144     /**
       
   145      * C++ default constructor.
       
   146      */
       
   147     CAuthtypePlugin();
       
   148 
       
   149     /**
       
   150      * Symbian OS default constructor.
       
   151      */
       
   152     void ConstructL();
       
   153 
       
   154 protected:
       
   155     // From CAknView
       
   156 
       
   157     /**
       
   158      * This implementation is empty because this class, being just a dialog,
       
   159      * does not implement the CAknView finctionality.
       
   160      */
       
   161     void DoActivateL(const TVwsViewId& aPrevViewId, TUid aCustomMessageId,
       
   162             const TDesC8& aCustomMessage);
       
   163 
       
   164     /**
       
   165      * This implementation is empty because this class, being just a dialog,
       
   166      * does not implement the CAknView finctionality.
       
   167      */
       
   168     void DoDeactivate();
       
   169 
       
   170 private:
       
   171     // New
       
   172 
       
   173     /**
       
   174      * Opens localized resource file.
       
   175      */
       
   176     void OpenLocalizedResourceFileL(const TDesC& aResourceFileName,
       
   177             RConeResourceLoader& aResourceLoader);
       
   178 
       
   179     /**
       
   180      * Suppress the menu/app key when reminder dialog is displayed
       
   181      * @param ETrue to Suppress, else EFalse
       
   182      * @return None
       
   183      */
       
   184 
       
   185     void SuppressAppKey(TBool aValue);
       
   186 
       
   187 private:
       
   188     //data
       
   189 
       
   190     //Holds the state of menu/app key supress
       
   191     TBool iIsAppKeySuppressed;
       
   192 
       
   193 protected:
       
   194     // Data
       
   195 
       
   196     // Resource loader.
       
   197     RConeResourceLoader iResources;
       
   198 
       
   199     };
       
   200 
       
   201 #endif // AuthtypePLUGIN_H
       
   202 // End of File