javamanager/javasettings/appmngrplugin/inc/appmngr2midletsettingsview.h
branchRCL_3
changeset 14 04becd199f91
equal deleted inserted replaced
13:f5050f1da672 14:04becd199f91
       
     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:  Declares view for application.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef APPMNGR2MIDLETSETTINGSVIEW_H
       
    20 #define APPMNGR2MIDLETSETTINGSVIEW_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <aknview.h>                    // CAknView
       
    24 #include <eiklbo.h>                     // MEikListBoxObserver
       
    25 #include <vector>
       
    26 #include <string>
       
    27 #include "appmngr2midletsettingsutil.h"
       
    28 
       
    29 // CONSTANTS
       
    30 // MIDlet suite settings view ID
       
    31 const TUid KMidletSuiteSettingsViewId = { 0x20016BF8 };
       
    32 
       
    33 // FORWARD DECLARATIONS
       
    34 class CAppMngr2MidletSettingsContainer;
       
    35 class CAppMngr2MidletSettingsHandler;
       
    36 class CAppMngr2SuiteSnapItem;
       
    37 class CPKIXValidationResult;
       
    38 class CAppMngr2MidletResourceHandler;
       
    39 
       
    40 // CLASS DECLARATION
       
    41 
       
    42 /**
       
    43  * MIDlet suite settings view class.
       
    44  *
       
    45  * @lib appmngr2midletplugin.dll
       
    46  * @since S60 v9.1
       
    47  */
       
    48 class CAppMngr2MidletSettingsView : public CAknView, public MEikListBoxObserver
       
    49 {
       
    50 public: // Constructors and destructor
       
    51 
       
    52     /**
       
    53     * Two-phased constructor.
       
    54     */
       
    55     static CAppMngr2MidletSettingsView* NewL(
       
    56         const TDesC& aMidletSuiteName,
       
    57         TUid aMidletSuiteUid,
       
    58         CAppMngr2MidletResourceHandler& aResourceHandler);
       
    59 
       
    60     /**
       
    61      * Destructor.
       
    62      */
       
    63     virtual ~CAppMngr2MidletSettingsView();
       
    64 
       
    65 public: // Functions from base classes
       
    66 
       
    67     /**
       
    68      * From ?base_class ?member_description
       
    69      */
       
    70     TUid Id() const;
       
    71 
       
    72     /**
       
    73      * From ?base_class ?member_description
       
    74      */
       
    75     void HandleCommandL(TInt aCommand);
       
    76 
       
    77     /**
       
    78      * From ?base_class ?member_description
       
    79      */
       
    80     void HandleClientRectChange();
       
    81 
       
    82 
       
    83 protected: //from MEikListBoxObserver
       
    84 
       
    85     /**
       
    86      * Handles the commands given with keys
       
    87      * @param aListbox is the listbox concerned.
       
    88      * @param aEventType is the corrent event that took place.
       
    89      */
       
    90     void HandleListBoxEventL(CEikListBox* aListBox, TListBoxEvent aEventType);
       
    91 
       
    92 
       
    93 protected: //from MAknSettingPageObserver
       
    94 
       
    95 private:
       
    96     /**
       
    97      * Constructor
       
    98      */
       
    99     CAppMngr2MidletSettingsView(CAppMngr2MidletResourceHandler& aResourceHandler);
       
   100 
       
   101     /**
       
   102      * Default constructor.
       
   103      */
       
   104     void ConstructL(const TDesC& aMidletSuiteName,TUid aMidletSuiteUid);
       
   105 
       
   106     /**
       
   107      * Initializas the container
       
   108      */
       
   109     void InitL(const TDesC& aMidletSuiteName,TUid aMidletSuiteUid);
       
   110 
       
   111     /**
       
   112      * From AknView, ?member_description
       
   113      */
       
   114     void DoActivateL(const TVwsViewId& aPrevViewId,
       
   115                      TUid aCustomMessageId,
       
   116                      const TDesC8& aCustomMessage);
       
   117 
       
   118     /**
       
   119      * From AknView, ?member_description
       
   120      */
       
   121     void DoDeactivate();
       
   122 
       
   123     /**
       
   124      * Handles settings by showing proper settings page/view
       
   125      * (access point page, on screen keypad page or security settings page)
       
   126      */
       
   127     void HandleSettingsL();
       
   128 
       
   129     /**
       
   130      * Shows the view for settings the internet access point
       
   131      */
       
   132     void ShowAccessPointPageL();
       
   133 
       
   134     /**
       
   135      * Shows the view for settings either the on screen
       
   136      * keypad value or for handling security settings, depending of the pageId
       
   137      */
       
   138     void ShowPageL(int aPageId);
       
   139 
       
   140     /**
       
   141      * Initializes all the security settings
       
   142      */
       
   143     void InitSettings(const std::vector<MidletSuiteSecuritySettings>& aAllSettings);
       
   144 
       
   145     /**
       
   146      * Updates the flag indicating if certain settings are set to Blanket
       
   147      */
       
   148     void UpdateBlanketSettings(const MidletSuiteSecuritySettings& aSettings, bool aBlanket);
       
   149 
       
   150     /**
       
   151      * Checks if certain settings obey the mutually exclusive rules
       
   152      */
       
   153     bool CheckBlanketSettingsL(const MidletSuiteSecuritySettings& aSettings);
       
   154 
       
   155     /**
       
   156      * Handles the mutually exclusive rules by showing notes to tge user
       
   157      */
       
   158     void HandleMutuallyExclusiveSettingsL(const MidletSuiteSecuritySettings& aSettings);
       
   159 
       
   160     /**
       
   161      * Show warning security dialog
       
   162      * Runs the dialog and returns a boolean indicating if the dialog was accepted
       
   163      *
       
   164      * @return a boolean indicating if the dialog was accepted
       
   165      */
       
   166     bool ShowWarningSecDlgL(bool networkUsage);
       
   167 
       
   168     /**
       
   169      * Show warning exclude dialog
       
   170      * Runs the dialog and returns a boolean indicating if the dialog was accepted
       
   171      *
       
   172      * @return a boolean indicating if the dialog was accepted
       
   173      */
       
   174     bool ShowWarningExclDlgL();
       
   175 
       
   176 private: // Data
       
   177 
       
   178     /**
       
   179      * MIDlet suite settings container
       
   180      * Owned
       
   181      */
       
   182     CAppMngr2MidletSettingsContainer* iContainer;
       
   183 
       
   184     /**
       
   185      * MIDlet suite settings handler
       
   186      * Owned
       
   187      */
       
   188     CAppMngr2MidletSettingsHandler* iSettingsHandler;
       
   189 
       
   190     /**
       
   191      * Previous view ID
       
   192      */
       
   193     TVwsViewId iPrevViewId;
       
   194 
       
   195     /**
       
   196      * OnScreen Keypad settings vissibility
       
   197      */
       
   198     TBool iOnscreenKeypadSettingsVisible;
       
   199 
       
   200     /**
       
   201      * Security settings vissibility
       
   202      */
       
   203     TBool iSecuritySettingsVisible;
       
   204 
       
   205     /*
       
   206      * Vector containing the settings which are subject to
       
   207      * mutually exclusive rules
       
   208      */
       
   209     std::vector<MidletSuiteSecuritySettings> iMutuallyExclusiveSettings;
       
   210 
       
   211     /*
       
   212      * Vector containing flags indicating which settings (from the ones which
       
   213      * are subject to mutually exclusive rules) are set to Blanket
       
   214      */
       
   215     bool* iBlanketSettings;
       
   216 
       
   217     /**
       
   218      * Resource file offset
       
   219      */
       
   220     TInt iResourceFileOffset;
       
   221     CAppMngr2MidletResourceHandler& iResourceHandler;
       
   222 };
       
   223 
       
   224 #endif // APPMNGR2MIDLETSETTINGSVIEW_H
       
   225 
       
   226 // End of File