messagingappbase/msgavkon/muiu_internal/settingsarray/inc/MuiuSettingsArray.h
changeset 0 72b543305e3a
child 9 1d7827e39b52
equal deleted inserted replaced
-1:000000000000 0:72b543305e3a
       
     1 /*
       
     2 * Copyright (c) 2002 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:  
       
    15 *     Text, number, pasword, sc number and listbox settings
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 
       
    21 #ifndef MUIUSETTINGSARRAY_H
       
    22 #define MUIUSETTINGSARRAY_H
       
    23 
       
    24 //  INCLUDES
       
    25 #include <MsgArrays.h> // CUidNameArray
       
    26 #include <ConeResLoader.h>
       
    27 #include <muiusettingsarray.hrh>
       
    28 
       
    29 // CONSTANTS
       
    30 const TInt KMuiuMaxSettingsTextLength = 100;
       
    31 
       
    32 // DATA TYPES
       
    33 typedef TBuf <KMuiuMaxSettingsTextLength> TMuiuSettingsText;
       
    34 
       
    35 // FORWARD DECLARATIONS
       
    36 class CEikTextListBox;
       
    37 class CUidNameArray;
       
    38 class MMceAccountManager;
       
    39 class CMuiuMtmSettingsArray;
       
    40 class CAknSettingPage;
       
    41 
       
    42 // CLASS DECLARATION
       
    43 struct TMuiuSettingsItem
       
    44     {
       
    45     TMuiuSettingsText   iLabelText;
       
    46     TMuiuSettingsType   iType;
       
    47     TBool               iCompulsory;			//Default value EFalse
       
    48     TMuiuSettingsText   iUserText;
       
    49     TInt                iUserTextMaxLength;
       
    50     TInt                iCurrentNumber;
       
    51     CDesCArrayFlat*     iMuiuSettingsItemArray;
       
    52     TBool               iLangSpecificNumConv;		//Default value ETrue
       
    53     };
       
    54 
       
    55 
       
    56 
       
    57 /**
       
    58 * Text, number, pasword, sc number and listbox settings.
       
    59 */
       
    60 class CMuiuSettingsArray :
       
    61     public CArrayFixFlat<TMuiuSettingsItem>,
       
    62     public MDesCArray
       
    63     {
       
    64     public:
       
    65        /*
       
    66         * Two phase Symbian OS constructor
       
    67         * @param aResourceId: resource id. Resource structure defined by MUIU_SETTINGS_ARRAY.
       
    68         */
       
    69         IMPORT_C static CMuiuSettingsArray* NewL( TInt aResourceId );
       
    70 
       
    71        /*
       
    72         * destructor
       
    73         */
       
    74         IMPORT_C virtual ~CMuiuSettingsArray();
       
    75 
       
    76        /*
       
    77         * Lauches avkon setting page for item aIndex (list setting page or text setting page)
       
    78         * @param aIndex: item to be edited
       
    79         * @param aEnterPressed: ETrue if enter pressed. Used only in list setting page if two
       
    80         *        items then toggle between two items.
       
    81         * @return ETrue if edited, EFalse if no changes.
       
    82         */
       
    83         IMPORT_C TBool EditItemL( TInt aIndex, TBool aEnterPressed = EFalse );
       
    84 
       
    85     public:
       
    86        /*
       
    87         * from MDesCArray
       
    88         */
       
    89         IMPORT_C virtual TInt MdcaCount() const;
       
    90 
       
    91        /*
       
    92         * from MDesCArray
       
    93         */
       
    94         IMPORT_C virtual TPtrC MdcaPoint(TInt aIndex) const;
       
    95 
       
    96     private:
       
    97 
       
    98        /*
       
    99         * Opens list box setting page
       
   100         */
       
   101         TBool HandleEditListBoxSettingsL( TInt aIndex, TBool aEnterPressed = EFalse );
       
   102 
       
   103        /*
       
   104         * Opens text setting page
       
   105         */
       
   106         TBool HandleEditTextSettingsL( TInt aIndex );
       
   107 
       
   108        /*
       
   109         * Opens text setting page
       
   110         */
       
   111         TBool HandleEditNumberL( TInt aIndex );
       
   112 
       
   113        /*
       
   114         * Opens text setting page
       
   115         */
       
   116         TBool HandleEditPasswordL( TInt aIndex );
       
   117 
       
   118         /*
       
   119         * Opens Sc number edit setting page
       
   120         */
       
   121         TBool HandleEditScNumberL( TInt aIndex );
       
   122 
       
   123     protected:
       
   124        /*
       
   125         * C++ default constructor
       
   126         */
       
   127         IMPORT_C CMuiuSettingsArray();
       
   128 
       
   129        /*
       
   130         * Symbian OS constructor
       
   131         */
       
   132         IMPORT_C void ConstructL( TInt aResourceId );
       
   133 
       
   134     protected:
       
   135         HBufC*                  iTempText; // use this if you override MdcaPoint
       
   136     private:
       
   137         HBufC*                  iCompulsoryText;
       
   138         CAknSettingPage*        iSettingPage;
       
   139         TUint16                 iPasswordFill;
       
   140         RConeResourceLoader     iResources;
       
   141     };
       
   142 
       
   143 
       
   144 #endif // MUIUSETTINGSARRAY_H
       
   145 
       
   146 // End of file