sipplugins/sippsipsettingsui/inc/sipsettlistsipprofsetaplistitem.h
changeset 0 307788aac0a8
equal deleted inserted replaced
-1:000000000000 0:307788aac0a8
       
     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:  The modified list item for the access points
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef SIP_SETT_LIST_SIP_PROF_SET_AP_LIST_ITEM_H
       
    20 #define SIP_SETT_LIST_SIP_PROF_SET_AP_LIST_ITEM_H
       
    21 
       
    22 //  INCLUDES
       
    23 
       
    24 #include <aknsettingitemlist.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 
       
    28 class CSIPSettListSIPProfSetModel;
       
    29 class CAknTitlePane;
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 *  CSIPSettListSIPProfSetAPListItem listitem class
       
    35 *  @since 3.0
       
    36 *  listitem class for SIP Profile settings Access Points
       
    37 */
       
    38 class CSIPSettListSIPProfSetAPListItem : 
       
    39 	public CAknEnumeratedTextPopupSettingItem
       
    40     {
       
    41 
       
    42     public:  // Constructors and destructor
       
    43         
       
    44         /**
       
    45         * Constructor. No two-phased construction due
       
    46         * the nature of this object
       
    47         * @param aResourceId Resource ID for the list item
       
    48         * @param aValue The currently selected item
       
    49         * @param aModel Model for fetching the AP list        
       
    50         */                
       
    51         CSIPSettListSIPProfSetAPListItem( TInt aResourceId, TInt& aIndex,
       
    52 										CSIPSettListSIPProfSetModel* aModel );
       
    53         
       
    54         /**
       
    55         * Destructor.
       
    56         */
       
    57         virtual ~CSIPSettListSIPProfSetAPListItem();
       
    58 
       
    59     protected:  // New functions
       
    60         
       
    61         /**
       
    62         * Checks that selected AP exists on the list
       
    63          @param aArray Array containing all the APs
       
    64         * @return Boolean value indicating if the selected AP is found
       
    65         */
       
    66         TBool ValueMatches( CArrayPtr<CAknEnumeratedText>* aArray );
       
    67 
       
    68         /**
       
    69         * Initializes the enumeration list
       
    70         * @param aTextArray enumeration value/txt values are stored here
       
    71         * @param aNullTextArray created, but not used (made for framework)
       
    72         */
       
    73         void InitializeListL( CArrayPtr<CAknEnumeratedText>*& aTextArray,
       
    74                               CArrayPtr<HBufC>*& aNullTextArray );
       
    75 
       
    76     protected:  // Functions from base classes
       
    77         
       
    78         /**
       
    79         * From CAknSettingItem, dynamically initializes the list
       
    80         * after base construction
       
    81         */
       
    82         void CompleteConstructionL();
       
    83 
       
    84         /**
       
    85         * To set the list, if the AP is not selected 
       
    86         */
       
    87         void EditItemL( TBool aCalledFromMenu );
       
    88 
       
    89         /*
       
    90 		* From MAknSettingPageObserver
       
    91 		* @see MAknSettingPageObserver
       
    92 		*/
       
    93         void HandleSettingPageEventL( 
       
    94             CAknSettingPage* aSettingPage, 
       
    95             TAknSettingPageEvent aEventType );
       
    96         
       
    97     private:
       
    98 
       
    99         /**
       
   100         * For deleting array in case of leave
       
   101         */
       
   102         static void ResetAndDestroy( TAny* aPointerArray );   
       
   103 
       
   104     private:    // Data
       
   105 
       
   106         // Model
       
   107         CSIPSettListSIPProfSetModel* iModel;        
       
   108 
       
   109         // Currently selected AP Index
       
   110         TInt& iEnumValue;
       
   111         
       
   112         // Backup value for AP index
       
   113         TInt iBackupValue;
       
   114     };
       
   115 
       
   116 #endif      // SIP_SETT_LIST_SIP_PROF_SET_AP_LIST_ITEM_H
       
   117             
       
   118 // End of File