mediasettings/feedsettingsviews/inc/feedsettingsviewaddservicelistbox.h
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2002-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 the License "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:    Class for Add Service list in Settings UI.*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 
       
    20 #ifndef VCXNSSETTINGSVIEWADDSERVICELISTBOX_H
       
    21 #define VCXNSSETTINGSVIEWADDSERVICELISTBOX_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <aknsettingitemlist.h>
       
    25 
       
    26 // FORWARD DECLARATIONS
       
    27 class CVcxNsSettingsViewContainer;
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32  * The settings list for "add/edit service list". Used by class 
       
    33  * CVcSettingsViewAddOrEditService. Part of Settings UI.
       
    34  *
       
    35  *  @lib vcsettingsview.lib
       
    36  *  @since S60 3.2
       
    37  */
       
    38 NONSHARABLE_CLASS( CVcxNsSettingsViewAddServiceListbox ) : public CAknSettingItemList
       
    39     {
       
    40 public:
       
    41 
       
    42     /**
       
    43      * Constructor.
       
    44      *
       
    45      * @param aParent      Parent container.
       
    46      * @param aServiceName Reference to data member where service name is stored.
       
    47      * @param aAddress     Reference to data member where service address is stored.
       
    48      * @param aPluginType  Reference to data member where service type is stored.
       
    49      */
       
    50     CVcxNsSettingsViewAddServiceListbox(CVcxNsSettingsViewContainer* aParent,
       
    51             TDes& aServiceName,
       
    52             TDes& aAddress,
       
    53             TInt& aPluginType );
       
    54 
       
    55     /**
       
    56      * Updates the internal references to data.
       
    57      * Set input data to variables before calling this method.
       
    58      *
       
    59      * @param aAdding      ETrue if adding a service, EFalse if editing.
       
    60      * @param aServiceName Reference to data member where service name is stored.
       
    61      * @param aAddress     Reference to data member where service address is stored.
       
    62      * @param aServiceType Service type.
       
    63      * @param aPluginType  Reference to data member where plugin type is stored.
       
    64      */
       
    65     void LoadAddServiceInformationL(TBool aAdding,
       
    66             TDes& aServiceName,
       
    67             TDes& aAddress,
       
    68             CIptvService::TServiceType aServiceType, 
       
    69             TInt& aPluginType );
       
    70 
       
    71     /*
       
    72      * Copies data from UI (this list) to referenced data variables.
       
    73      */
       
    74     void SaveAddServiceInformationL();
       
    75 
       
    76     /**
       
    77      * Is list shown for adding new item or for editing old.
       
    78      *
       
    79      * @return ETrue if adding a service, EFalse if editing.
       
    80      */
       
    81     TBool IsAdding();
       
    82 
       
    83     /**
       
    84      * Creates SettingItem. Overridden from CAknSettingItemList
       
    85      *
       
    86      * @param identifier Index numbre of the setting item to create.
       
    87      * @return pointer to new CAknSettingItem object.
       
    88      */
       
    89     CAknSettingItem* CreateSettingItemL(TInt identifier);
       
    90 
       
    91     /**
       
    92      * Opens editor for current setting item.
       
    93      */
       
    94     void EditCurrentItemL();
       
    95 
       
    96 public:
       
    97     /**
       
    98      * From CCoeControl. 
       
    99      */
       
   100     TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent,TEventCode aType );
       
   101 
       
   102     /**
       
   103      * Event handling section, from MEikListBoxObserver.
       
   104      */
       
   105     void HandleListBoxEventL( CEikListBox* aListBox, TListBoxEvent aListBoxEvent );
       
   106 
       
   107 private:
       
   108 
       
   109     /**
       
   110      * From CCoeControl. Called by framework when the size is changed.
       
   111      */
       
   112     void SizeChanged();
       
   113 
       
   114 private: // Data
       
   115 
       
   116     /**
       
   117      * Parent control container
       
   118      */
       
   119     CVcxNsSettingsViewContainer* iParent;
       
   120 
       
   121     /**
       
   122      * ServiceName setting item
       
   123      */
       
   124     CAknTextSettingItem* iServiceNameItem;
       
   125     
       
   126     /**
       
   127      * Address setting item
       
   128      */
       
   129     CAknTextSettingItem* iAddressItem;
       
   130 
       
   131     /**
       
   132      * Service type
       
   133      */
       
   134     CIptvService::TServiceType iServiceType;
       
   135     
       
   136     /**
       
   137      * Plugin type item
       
   138      */
       
   139     CAknEnumeratedTextPopupSettingItem* iPluginTypeItem;
       
   140 
       
   141     /**
       
   142      * Is adding ongoing
       
   143      */
       
   144     TBool iAdding;
       
   145     
       
   146     /**
       
   147      * Service Name
       
   148      */
       
   149     TDes& iServiceName;
       
   150     
       
   151     /**
       
   152      * Address
       
   153      */
       
   154     TDes& iAddress;
       
   155 
       
   156     /**
       
   157      * Service plugin type
       
   158      */
       
   159     TInt& iServicePluginType;
       
   160     };
       
   161 
       
   162 #endif // VCXNSSETTINGSVIEWADDSERVICELISTBOX_H