mediasettings/feedsettingsviews/inc/feedsettingsviewaddoreditservice.h
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2006-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/edit service list" in Settings UI.*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 
       
    20 #ifndef VCXNSSETTINGSVIEWADDOREDITSERVICE_H
       
    21 #define VCXNSSETTINGSVIEWADDOREDITSERVICE_H
       
    22 
       
    23 // INCLUDES
       
    24 #include "feedsettingsviewcontainer.h"
       
    25 
       
    26 // CLASS DECLARATION
       
    27 /**
       
    28  * Class for "Add/edit service list" in Settings UI.
       
    29  *
       
    30  *  @lib vcsettingsview.lib
       
    31  *  @since S60 3.2
       
    32  */
       
    33 NONSHARABLE_CLASS( CVcxNsSettingsViewAddOrEditService ) : public CBase
       
    34     {
       
    35 public: // Constructors and desctructor.
       
    36 
       
    37     /**
       
    38      * Dynamic construction.
       
    39      *
       
    40      * @param aParent      Pointer to parent container.
       
    41      * @param aServiceSettings Reference to Service Settings in UI Engine.
       
    42      * @return New class object.
       
    43      */
       
    44     static CVcxNsSettingsViewAddOrEditService* NewL(
       
    45             CVcxNsSettingsViewContainer* aParent,
       
    46             CVcxNsServiceSettings& aServiceSettings );
       
    47 
       
    48     /**
       
    49      * Destructor.
       
    50      */
       
    51     virtual ~CVcxNsSettingsViewAddOrEditService();
       
    52 
       
    53 public:
       
    54 
       
    55     /**
       
    56      * Activates "add/edit service list".
       
    57      */
       
    58     void ActivateL();
       
    59 
       
    60     /**
       
    61      * Deactivates "add/edit service list".
       
    62      */
       
    63     void Deactivate();
       
    64 
       
    65     /**
       
    66      * Loads data to "add/edit service list".
       
    67      *
       
    68      * @param aAdding      ETrue if adding a service, EFalse if editing.
       
    69      * @param aServiceType Type of service as CIptvService::TServiceType enumeration.
       
    70      */
       
    71     void LoadL( TBool aAdding, CIptvService::TServiceType aServiceType );
       
    72 
       
    73     /**
       
    74      * Saves data in "add/edit service list".
       
    75      */
       
    76     void SaveL();
       
    77 
       
    78     /**
       
    79      * Returns pointer to "add/edit service" listbox. No ownership transfer.
       
    80      *
       
    81      * @return Pointer to listbox.
       
    82      */
       
    83     CVcxNsSettingsViewAddServiceListbox* ListBox();
       
    84 
       
    85 private:
       
    86 
       
    87     /** 
       
    88      * Constructor.
       
    89      *
       
    90      * @param aParent      Pointer to parent container.
       
    91      * @param aServiceSettings Reference to Service Settings in UI Engine.
       
    92      */
       
    93     CVcxNsSettingsViewAddOrEditService(
       
    94             CVcxNsSettingsViewContainer* aParent,
       
    95             CVcxNsServiceSettings& aServiceSettings );
       
    96 
       
    97     /**
       
    98      * EPOC constructor.
       
    99      */
       
   100     void ConstructL();
       
   101 
       
   102 private: // Data
       
   103 
       
   104     /**
       
   105      * Parent control container
       
   106      */
       
   107     CVcxNsSettingsViewContainer* iParent;
       
   108     
       
   109     /**
       
   110      * UI engine's application settings provider
       
   111      */   
       
   112     CVcxNsServiceSettings& iServiceSettings;
       
   113     
       
   114     /**
       
   115      * List box control
       
   116      */    
       
   117     CVcxNsSettingsViewAddServiceListbox* iListbox;
       
   118 
       
   119     /**
       
   120      * Service type
       
   121      */
       
   122     CIptvService::TServiceType iServiceType;
       
   123     
       
   124     /**
       
   125      * Service name
       
   126      */
       
   127     TBuf<KIptvSmServicesDbNameMaxLength> iAddServiceName;
       
   128     
       
   129     /**
       
   130      * Service address
       
   131      */
       
   132     TBuf<KIptvSmServicesDbAddressMaxLength> iAddServiceAddress;
       
   133     
       
   134     /**
       
   135      * Service's old address
       
   136      */
       
   137     TBuf<KIptvSmServicesDbAddressMaxLength> iPreviousAddress;
       
   138 
       
   139     /**
       
   140      * Service plugin type
       
   141      */
       
   142     TInt iAddServicePluginType;
       
   143 
       
   144     };
       
   145 
       
   146 #endif // VCXNSSETTINGSVIEWADDOREDITSERVICE_H