internetradio2.0/uiinc/irplsview.h
changeset 3 ee64f059b8e1
parent 2 2e1adbfc62af
child 4 3f2d53f144fe
child 5 0930554dc389
equal deleted inserted replaced
2:2e1adbfc62af 3:ee64f059b8e1
     1 /*
       
     2 * Copyright (c) 2006-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 "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:  view for pls list 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef CIRPLSVIEW_H
       
    20 #define CIRPLSVIEW_H
       
    21 
       
    22 #include <akntoolbarobserver.h>
       
    23 #include <aknbutton.h>
       
    24 #include "irbaseview.h"
       
    25 #include "IRActiveNetworkObserver.h"
       
    26 
       
    27 
       
    28 class CIRUi;
       
    29 class CIRPlsContainer;
       
    30 class CIRIsdsPreset;
       
    31 class MIRActiveNetworkObserver;
       
    32 
       
    33 //========================================class declaration CIRPlsView============================================
       
    34 
       
    35 /**
       
    36  * This class Creates CIRPlsView.
       
    37  * Handles the all the options defined for the view.
       
    38  * 
       
    39  * @code
       
    40  * Create instance of .pls view.
       
    41  * CIRPlsView* self = new (ELeave) CIRPlsView;
       
    42  * 
       
    43  * Create the instance of container.
       
    44  * iContainer = CIRPlsView::NewL(AppUi()->
       
    45         	ApplicationRect());
       
    46  *
       
    47  * @endcode
       
    48  *
       
    49  */
       
    50 class CIRPlsView : public CIRBaseView,
       
    51 				   public MAknToolbarObserver,
       
    52 				   public MIRActiveNetworkObserver
       
    53 	{
       
    54 public:
       
    55 
       
    56 	/**
       
    57 	* NewL.
       
    58 	* Two-phased constructor.
       
    59 	* Create a CIRPlsView object, which will draw itself to aRect.
       
    60 	* @param aRect The rectangle this view will be drawn to.
       
    61 	* @return a pointer to the created instance of CIRPlsView.
       
    62 	*/
       
    63 	static CIRPlsView* NewL(const TRect& aRect);
       
    64 
       
    65 	/**
       
    66 	* NewLC.
       
    67 	* Two-phased constructor.
       
    68 	* Create a CIRPlsView object, which will draw itself
       
    69 	* to aRect.
       
    70 	* @param aRect Rectangle this view will be drawn to.
       
    71 	* @return A pointer to the created instance of CIRPlsView.
       
    72 	*/
       
    73 	static CIRPlsView* NewLC(const TRect& aRect);
       
    74 
       
    75 	/**
       
    76 	* ~CIRPlsView
       
    77 	* Destructor.
       
    78 	*/
       
    79 	 ~CIRPlsView();
       
    80 	 
       
    81 	 /**
       
    82 	* Id()
       
    83 	* defines the Id of the view.
       
    84 	* returns the UId of the view.
       
    85 	*/	
       
    86 	TUid Id() const;
       
    87 
       
    88 
       
    89 	/**
       
    90 	* HandleCommandL()
       
    91 	* Handles the user input commands.
       
    92 	* @param aCommand The command generated by user keypress..
       
    93 	*/ 
       
    94 	   
       
    95 	void HandleCommandL(TInt aCommand);
       
    96 
       
    97 	/**
       
    98 	* DynInitMenuPaneL()
       
    99 	* Dynamically loads the menu pane.
       
   100 	* @param aResourceId,the resource Id of the view.
       
   101 	* @param aMenuPane,Pointer to the menu pane.
       
   102 	*/
       
   103 	void DynInitMenuPaneL(TInt aResourceId,CEikMenuPane* aMenuPane);
       
   104 	//for listen and add to favorites
       
   105 	
       
   106 
       
   107 private:
       
   108 
       
   109 	/**
       
   110 	* ConstructL
       
   111 	* 2nd phase constructor.
       
   112 	* Perform the second phase construction of a
       
   113 	* @param aRect The rectangle this view will be drawn to.
       
   114 	*/	
       
   115 	void ConstructL(const TRect& aRect);
       
   116 
       
   117 	/**
       
   118 	* CIRPlsView.
       
   119 	* C++ default constructor.
       
   120 	*/
       
   121 	CIRPlsView();  
       
   122 		    
       
   123 	/**
       
   124 	* DoActivateL()
       
   125 	* Activates the view.
       
   126 	*/       
       
   127 	void DoActivateL(const TVwsViewId& aPrevViewId,TUid aCustomMessageId,
       
   128 	    			 const TDesC8& aCustomMessage);
       
   129 	/**
       
   130 	* DoDeactivate()
       
   131 	* DeActivates the view.
       
   132 	*/     			 
       
   133     void DoDeactivate();
       
   134     
       
   135     //added for touch toolbar
       
   136 	// From MAknToolbarObserver
       
   137 	void DynInitToolbarL(	TInt aResourceId,	CAknToolbar* aToolbar );
       
   138 	
       
   139 	/**
       
   140 	* OfferToolbarEventL()
       
   141 	* Handles all the events for the touch tool bar.
       
   142 	*/  
       
   143 	
       
   144 	void OfferToolbarEventL(	TInt aCommand );
       
   145 	
       
   146 	/**
       
   147 	* HandleStatusPaneSizeChange()
       
   148 	* Handles the Change in the status Pane
       
   149 	*/  
       
   150 	
       
   151     void HandleStatusPaneSizeChange();
       
   152     
       
   153     /**
       
   154 	* HandleForegroundEventL()
       
   155 	* Handles the foreground event.
       
   156 	*/  
       
   157 
       
   158     void HandleForegroundEventL( TBool aForeground );
       
   159     
       
   160     /**
       
   161 	* ConstructToolbarL()
       
   162 	* Construct the touch toolbar.
       
   163 	*/  
       
   164 
       
   165 	void ConstructToolbarL();
       
   166 	
       
   167 public:
       
   168 			//from MIRActiveNetworkObserver
       
   169 	/**
       
   170 	 * Notifies all observers whose network request is active
       
   171 	 * to reissue the request  
       
   172 	 * NotifyActiveNetworkObserversL()
       
   173 	 */	
       
   174 	 void NotifyActiveNetworkObserversL(TIRNetworkEvent aEvent);
       
   175 
       
   176 
       
   177 	 /**
       
   178 	 * Notifies all observers whose network request is active
       
   179 	 * to reset the pending request status  
       
   180 	 * ResetPendingRequests()
       
   181 	 */	
       
   182 	 void ResetPendingRequests(TBool aValue);
       
   183 
       
   184   	
       
   185   	/**
       
   186 	* SecondConstruct()
       
   187 	* To again initialise when Second pls file is opened.
       
   188 	*/ 
       
   189     void SecondConstruct();
       
   190 
       
   191 		
       
   192 private:
       
   193 	
       
   194 	/*
       
   195 	 * iRequestPending
       
   196 	 * Checks whether an active request is pending
       
   197 	 */
       
   198 	TBool iRequestPending;
       
   199 	
       
   200 
       
   201 	
       
   202 	//instance of CIRPlsViewContainer
       
   203 	CIRPlsContainer* iContainer;
       
   204 	
       
   205 
       
   206 	};
       
   207    
       
   208 #endif // IR_PLSVIEW_H
       
   209