videofeeds/vcnsscheduleview/inc/CVcxNsScheduleSettingsViewContainer.h
changeset 0 96612d01cf9f
equal deleted inserted replaced
-1:000000000000 0:96612d01cf9f
       
     1 /*
       
     2 * Copyright (c) 2007 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:    Video on Demand schedule settings view container class.*
       
    15 */
       
    16 
       
    17 
       
    18 
       
    19 
       
    20 #ifndef CVCXNSSCHEDULESETTINGSVIEWCONTAINER_H
       
    21 #define CVCXNSSCHEDULESETTINGSVIEWCONTAINER_H
       
    22 
       
    23 // INCLUDES
       
    24 #include <coecntrl.h>
       
    25 #include "CIptvUtil.h"
       
    26 
       
    27 // FORWARD DECLARATIONS
       
    28 class CVcxNsServiceSettings;
       
    29 class CVcxNsScheduleSettingsSettingItem;
       
    30 class CVcxNsScheduleSettingsList;
       
    31 class CVcxNsScheduleSettingsView;
       
    32 class CVcxNsAppUi;
       
    33 
       
    34 // CLASS DECLARATION
       
    35 /**
       
    36 *  VoD schedule settings view container class. 
       
    37 *
       
    38 */
       
    39 class CVcxNsScheduleSettingsViewContainer : public CCoeControl
       
    40     {
       
    41     
       
    42 public: // constructors and destructor
       
    43 
       
    44     /**
       
    45     * Default C++ constructor
       
    46     *
       
    47     * @param aSettings Reference to service settings
       
    48     * @param aServiceId Id of the service for which this container
       
    49     *                    belongs to
       
    50     */
       
    51     CVcxNsScheduleSettingsViewContainer( CVcxNsServiceSettings& aSettings,
       
    52                                            TIptvServiceId aServiceId );
       
    53 
       
    54     /**
       
    55     * EPOC default constructor.
       
    56     *
       
    57     * @param aRect Frame rectangle for container        
       
    58     */
       
    59     void ConstructL( const TRect& aRect );
       
    60     
       
    61     /**
       
    62     * Destructor.
       
    63     */ 
       
    64     virtual ~CVcxNsScheduleSettingsViewContainer();
       
    65 
       
    66 public: // From CCoeControl
       
    67     
       
    68     /**
       
    69     * Key event handler. 
       
    70     * 
       
    71     */
       
    72     TKeyResponse OfferKeyEventL( const TKeyEvent& aKeyEvent, 
       
    73                                  TEventCode aType );
       
    74 
       
    75 public: // New methods
       
    76 
       
    77     /** 
       
    78     * Handle the selected event.
       
    79     *
       
    80     * @param aCommand The command id invoked
       
    81     */     
       
    82     void HandleChangeSelectedSettingItemL( TInt aCommand );
       
    83 
       
    84     /** 
       
    85     * Saves settings
       
    86     * 
       
    87     */     
       
    88     void SaveSettingsL();
       
    89 
       
    90     /** 
       
    91     * Check if scheduling is active i.e. download condition is
       
    92     * not set to manual and at least one download time is selected. 
       
    93     *
       
    94     * @return ETrue if scheduling is active, otherwise EFalse.
       
    95     */   
       
    96     TBool IsSchedulingActive();
       
    97     
       
    98 private: // From CCoeControl
       
    99 
       
   100     /**
       
   101     * Called by framework when help is launched. Returns currently
       
   102     * active view's help content.
       
   103     *
       
   104     * @param aContext On return, help context.
       
   105     */
       
   106     void GetHelpContext( TCoeHelpContext& aContext ) const;
       
   107 
       
   108     /**
       
   109     * Called when container size changes.
       
   110     */
       
   111     void SizeChanged();  
       
   112         
       
   113     /**
       
   114     * Returns count of controls in container.
       
   115     */
       
   116     TInt CountComponentControls() const;
       
   117 
       
   118     /**
       
   119     * Returns a specific control in container.
       
   120     */
       
   121     CCoeControl* ComponentControl( TInt aIndex ) const;
       
   122 
       
   123     /**
       
   124     * Handle global resource change.
       
   125     */
       
   126     void HandleResourceChange( TInt aType );
       
   127 
       
   128     /**
       
   129     * Draws container.
       
   130     */
       
   131     void Draw( const TRect& aRect ) const;
       
   132 
       
   133 private: // Data
       
   134     
       
   135     /**
       
   136     * Setting item 
       
   137     * Own.
       
   138     */   
       
   139     CVcxNsScheduleSettingsSettingItem* iSettingItem;
       
   140     
       
   141     /**
       
   142     * Settings 
       
   143     * Not own.
       
   144     */ 
       
   145     CVcxNsServiceSettings& iSettings;
       
   146     
       
   147     /**        
       
   148     * Service id 
       
   149     */
       
   150     TIptvServiceId iServiceId;
       
   151     
       
   152     };
       
   153 
       
   154 #endif /*CVCXNSSCHEDULESETTINGSVIEWCONTAINER_H_*/