internetradio2.0/uisrc/irnowplayingviewcontainer.cpp
changeset 3 ee64f059b8e1
parent 2 2e1adbfc62af
child 4 3f2d53f144fe
child 5 0930554dc389
equal deleted inserted replaced
2:2e1adbfc62af 3:ee64f059b8e1
     1 /*
       
     2 * Copyright (c) 2009 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:
       
    15 *
       
    16 */
       
    17 #include <aknutils.h>
       
    18 #include <alf/alfanchorlayout.h>
       
    19 #include <alf/alfcontrolgroup.h>
       
    20 #include <alf/alfdecklayout.h>
       
    21 #include <alf/alfenv.h>
       
    22 #include <alf/alfevent.h>
       
    23 #include <alf/alfimagevisual.h>
       
    24 #include <alf/alftextvisual.h>
       
    25 #include <alf/alfvisual.h>
       
    26 #include <alf/alftimedvalue.h>
       
    27 #include <alf/alfdisplay.h>
       
    28 #include <data_caging_path_literals.hrh>
       
    29 #include <touchfeedback.h>
       
    30 
       
    31 
       
    32 #include <internetradio.rsg>
       
    33 #include <alf/alfimagevisual.h>
       
    34 #include <aknview.h>
       
    35 #include <aknview.h>
       
    36 #include <aknvolumepopup.h>
       
    37 #include <stringloader.h>
       
    38 #include <e32des8.h>
       
    39 #include "internetradio.mbg"
       
    40 #include "irui.h"
       
    41 #include "ir.hrh"
       
    42 #include "ircommon.h"
       
    43 #include "irdebug.h"
       
    44 #include "irnowplayingviewcontainer.h"
       
    45 #include "irnowplayingview.h"
       
    46 #include "irnowplayingwrapper.h"
       
    47 #include "irfavoritesdb.h"
       
    48 #include "irstationlogocontrol.h"
       
    49 #include "irstationinformationdisplay.h"
       
    50 #include "irradioidle.h"
       
    51 
       
    52 #ifdef MUL_USE_COMMON_COMPONENTS
       
    53 using namespace GestureHelper;
       
    54 /** The base value for the control group id needed when constructing gesture control. */
       
    55 const TInt KIRFreeControlGroupIdBase = 10;
       
    56 #endif
       
    57 const TInt KControl1 =0;
       
    58 
       
    59 
       
    60 
       
    61 // ---------------------------------------------------------------------------
       
    62 // CIRNowPlayingViewContainer::CIRNowPlayingViewContainer()
       
    63 // Default constructor
       
    64 // ---------------------------------------------------------------------------
       
    65 //
       
    66 CIRNowPlayingViewContainer::CIRNowPlayingViewContainer(CAlfEnv& aEnv ):iAlfEnv (aEnv)
       
    67     {
       
    68     IRLOG_DEBUG( "CIRNowPlayingViewContainer::CIRNowPlayingViewContainer" );
       
    69     }
       
    70 
       
    71 // ---------------------------------------------------------------------------
       
    72 // CIRNowPlayingViewContainer* CIRNowPlayingViewContainer::NewL( CAlfEnv& aEnv )
       
    73 // Two-phased constructor.
       
    74 // ---------------------------------------------------------------------------
       
    75 //
       
    76 CIRNowPlayingViewContainer* CIRNowPlayingViewContainer::NewL( CAlfEnv& aEnv,
       
    77 				CIRNowPlayingView* aInstance)
       
    78 {
       
    79 	IRLOG_DEBUG( "CIRNowPlayingViewContainer::NewL" );
       
    80 	CIRNowPlayingViewContainer* self = CIRNowPlayingViewContainer::NewLC(aEnv,aInstance);
       
    81 	CleanupStack::Pop(self);
       
    82 	IRLOG_DEBUG( "CIRNowPlayingViewContainer::NewL - Exiting." );
       
    83 	return self;
       
    84 
       
    85 }
       
    86 
       
    87 // ---------------------------------------------------------------------------
       
    88 // CIRNowPlayingViewContainer* CIRNowPlayingViewContainer::NewL( CAlfEnv& aEnv )
       
    89 // Two-phased constructor.
       
    90 // ---------------------------------------------------------------------------
       
    91 //
       
    92 CIRNowPlayingViewContainer* CIRNowPlayingViewContainer::NewLC( CAlfEnv& aEnv,
       
    93 			CIRNowPlayingView* aInstance)
       
    94     {
       
    95     IRLOG_DEBUG( "CIRNowPlayingViewContainer::NewLC - Entering" );
       
    96     CIRNowPlayingViewContainer* self = new( ELeave ) CIRNowPlayingViewContainer(aEnv);
       
    97     CleanupStack::PushL( self );
       
    98     self->ConstructL(aInstance);
       
    99     IRLOG_DEBUG( "CIRNowPlayingViewContainer::NewLC - Exiting" );
       
   100     return self;
       
   101     }
       
   102 
       
   103 
       
   104 
       
   105 // ---------------------------------------------------------------------------
       
   106 // void CIRNowPlayingViewContainer::ConstructL( CAlfEnv& aEnv )
       
   107 // Second phase constructor
       
   108 // ---------------------------------------------------------------------------
       
   109 //
       
   110 void CIRNowPlayingViewContainer::ConstructL( CIRNowPlayingView* aInstance )
       
   111 	{
       
   112 	IRLOG_DEBUG( "CIRNowPlayingViewContainer::ConstructL - Entering" );
       
   113 	iNowPlayingView=aInstance;
       
   114 	#ifdef MUL_USE_COMMON_COMPONENTS
       
   115 	    // Control group id that client must not use.
       
   116 	 	const TInt freeControlGroupId  = KIRFreeControlGroupIdBase + KIRMaximumViewId.iUid;
       
   117 	    CGestureControl::ConstructL( *this, iAlfEnv, iAlfEnv.PrimaryDisplay(), freeControlGroupId );
       
   118 	#else
       
   119 	    CAlfControl::ConstructL( iAlfEnv );
       
   120 	#endif
       
   121 	// Create Main View
       
   122 	iLayout = CAlfAnchorLayout::AddNewL( *this );
       
   123 	LayoutControl();
       
   124 	iByteCounter=CAlfTextVisual::AddNewL( *this, iLayout);
       
   125 	iBitrate = CAlfTextVisual::AddNewL( *this, iLayout);
       
   126 	CAlfDeckLayout* deck = CAlfDeckLayout::AddNewL( *this, iLayout );
       
   127 	iLogoControl = CIRStationLogoControl::NewL( Env(), KIRNowPlayingViewID.iUid, deck );
       
   128 	iRadioIdle = CIRRadioIdle::NewL( iAlfEnv, KIRNowPlayingViewID.iUid, deck );
       
   129 		// Update radio idle skin color
       
   130     MAknsSkinInstance* skin = AknsUtils::SkinInstance();
       
   131     if ( skin )
       
   132     	{
       
   133     	TRgb textColor; // text color when not highlighted
       
   134     	AknsUtils::GetCachedColor( skin, textColor, KAknsIIDQsnTextColors, 
       
   135     								EAknsCIQsnTextColorsCG6 );
       
   136     	TRgb highlightColor; // text color when highlighted
       
   137     	AknsUtils::GetCachedColor( skin, highlightColor, KAknsIIDQsnTextColors,
       
   138     								 EAknsCIQsnTextColorsCG10 );
       
   139     	iRadioIdle->SetPrimaryColor( textColor );
       
   140     	iRadioIdle->SetSecondaryColor( highlightColor );
       
   141     	}
       
   142 	iStationInformationDisplay = CIRStationInformationDisplay::NewL( iAlfEnv, 
       
   143 					KIRNowPlayingViewID.iUid,iLayout);
       
   144 	if (iNowPlayingView->iUi->IsLandscapeOrientation() )
       
   145         {
       
   146         // Set display orientation.
       
   147         iStationInformationDisplay->SetDisplayOrientation( ETrue );
       
   148         }
       
   149 	iAlfEnv.ControlGroup( KIRNowPlayingViewID.iUid ).AppendL( this ); // Transfers ownership. No leaving code must be run after this call.
       
   150     iFeedback = MTouchFeedback::Instance();
       
   151 	IRLOG_DEBUG( "CIRNowPlayingViewContainer::ConstructL - Exiting" );
       
   152 	}
       
   153 
       
   154 
       
   155 
       
   156 // ---------------------------------------------------------------------------
       
   157 // CIRNowPlayingViewContainer::~CIRNowPlayingViewContainer()
       
   158 // Destructor.
       
   159 // ---------------------------------------------------------------------------
       
   160 //
       
   161 CIRNowPlayingViewContainer::~CIRNowPlayingViewContainer()
       
   162     {
       
   163     IRLOG_DEBUG( "CIRNowPlayingViewContainer::~CIRNowPlayingViewContainer - Entering" );
       
   164     iLogoControl = NULL;
       
   165 	iLayout = NULL;
       
   166 	iStationInformationDisplay = NULL;
       
   167 	iBitrate = NULL;
       
   168 	iByteCounter = NULL;
       
   169 	iNowPlayingView = NULL;
       
   170 	IRLOG_DEBUG( "CIRNowPlayingViewContainer::~CIRNowPlayingViewContainer - Exiting" );
       
   171     }
       
   172 
       
   173 // ---------------------------------------------------------------------------
       
   174 // Returns a reference to the station logo control.
       
   175 // ---------------------------------------------------------------------------
       
   176 //
       
   177 CIRStationLogoControl& CIRNowPlayingViewContainer::StationLogoControl()
       
   178     {
       
   179     IRLOG_DEBUG( "CIRNowPlayingViewContainer::StationLogoControl" );
       
   180     return *iLogoControl;
       
   181     }
       
   182 
       
   183 // ---------------------------------------------------------------------------
       
   184 // Returns a reference to the radio idle control.
       
   185 // ---------------------------------------------------------------------------
       
   186 //
       
   187 CIRRadioIdle& CIRNowPlayingViewContainer::RadioIdle()
       
   188     {
       
   189     return *iRadioIdle;
       
   190     }
       
   191 #ifdef MUL_USE_COMMON_COMPONENTS
       
   192 // ---------------------------------------------------------------------------
       
   193 // From class MGestureObserver.
       
   194 // Called when user makes gestures.
       
   195 // ---------------------------------------------------------------------------
       
   196 //
       
   197 void CIRNowPlayingViewContainer::HandleGestureL( const MGestureEvent& aEvent )
       
   198     {
       
   199     IRLOG_DEBUG(" *** S60VisualRadio -- CVRNowPlayingContainer::HandleGestureL ");
       
   200     TGestureCode eventCode( aEvent.Code( MGestureEvent::EAxisBoth ) );
       
   201     switch ( eventCode )
       
   202         {
       
   203         case GestureHelper::EGestureStart:
       
   204             {
       
   205             if ( iFeedback )
       
   206                 {
       
   207                 // Give feedback when gesture starts.
       
   208                 iFeedback->InstantFeedback( ETouchFeedbackBasic );
       
   209                 }
       
   210             break;
       
   211             }
       
   212         case GestureHelper::EGestureTap:
       
   213             {
       
   214             iNowPlayingView->HandleCommandL(EIRCmdVolumeControl);
       
   215             break;
       
   216             }
       
   217         case GestureHelper::EGestureSwipeLeft:
       
   218             {
       
   219             iNowPlayingView->HandleCommandL( EIRCmdStepPrevPreset );
       
   220             break;
       
   221             }
       
   222         case GestureHelper::EGestureSwipeRight:
       
   223             {
       
   224             iNowPlayingView->HandleCommandL( EIRCmdStepNextPreset );
       
   225             break;
       
   226             }
       
   227         default:
       
   228             break;
       
   229         }
       
   230     }
       
   231 #else
       
   232 
       
   233 
       
   234 // ---------------------------------------------------------------------------
       
   235 // From class CAlfControl.
       
   236 // Called when an event occurs.
       
   237 // ---------------------------------------------------------------------------
       
   238 //
       
   239 TBool CIRNowPlayingViewContainer::OfferEventL( const TAlfEvent& aEvent )
       
   240 	{
       
   241     TBool eventHandled = EFalse;
       
   242     IRLOG_DEBUG( "CIRNowPlayingViewContainer::OfferEventL - Entering" );
       
   243 	if(aEvent.IsPointerEvent())
       
   244 		{
       
   245 		if ( iFeedback )
       
   246 			{	
       
   247 			iFeedback->InstantFeedback( ETouchFeedbackBasic );
       
   248 			}
       
   249 		TriggerCommandL(EIRCmdVolumeControl);
       
   250         eventHandled = ETrue;
       
   251 		}
       
   252 	else if(aEvent.IsKeyEvent() )
       
   253 		{
       
   254 		const TKeyEvent& kEvent = aEvent.KeyEvent();
       
   255 		KeyHitL( kEvent.iScanCode );
       
   256 		}
       
   257 	IRLOG_DEBUG( "CIRNowPlayingViewContainer::OfferEventL - Exiting" );
       
   258     return eventHandled;
       
   259 	}
       
   260 #endif
       
   261 // ---------------------------------------------------------------------------
       
   262 // Returns a reference to the station information display.
       
   263 // ---------------------------------------------------------------------------
       
   264 //
       
   265 CIRStationInformationDisplay& CIRNowPlayingViewContainer::StationInformationDisplay()
       
   266     {
       
   267     IRLOG_DEBUG( "CIRNowPlayingViewContainer::StationInformationDisplay " );
       
   268     return *iStationInformationDisplay;
       
   269     }
       
   270 // ---------------------------------------------------------------------------
       
   271 // void CIRNowPlayingViewContainer::SetRdsTextL( const TDesC& aText )
       
   272 // Set the text in the visual.
       
   273 // ---------------------------------------------------------------------------
       
   274 //
       
   275 void CIRNowPlayingViewContainer::SetBitrateL( const TDesC& aText )
       
   276     {
       
   277     IRLOG_DEBUG( "CIRNowPlayingViewContainer::SetBitrateL - Entering" );
       
   278     iBitrate->SetColor( KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6 );
       
   279     iBitrate->SetStyle( EAlfTextStyleSmall );
       
   280     iBitrate->SetTextL( aText );
       
   281     iBitrate->SetWrapping( CAlfTextVisual::ELineWrapManual );
       
   282     IRLOG_DEBUG( "CIRNowPlayingViewContainer::SetBitrateL - Exiting" );
       
   283     }
       
   284 
       
   285 // ---------------------------------------------------------------------------
       
   286 // void CIRNowPlayingViewContainer::SetRdsTextL1( const TDesC& aText )
       
   287 // Set the text in the visual.
       
   288 // ---------------------------------------------------------------------------
       
   289 //
       
   290 void CIRNowPlayingViewContainer::SetByteCounterL( const TDesC& aText )
       
   291 	{
       
   292 	IRLOG_DEBUG( "CIRNowPlayingViewContainer::SetByteCounterL - Entering" );
       
   293 	iByteCounter->SetColor( KAknsIIDQsnTextColors, EAknsCIQsnTextColorsCG6 );
       
   294 	iByteCounter->SetStyle( EAlfTextStyleSmall );
       
   295 	iByteCounter->SetTextL( aText );
       
   296 	IRLOG_DEBUG( "CIRNowPlayingViewContainer::SetByteCounterL - Exiting" );
       
   297 	}
       
   298 // ---------------------------------------------------------------------------
       
   299 // CIRNowPlayingViewContainer::KeyHit()
       
   300 // Loads the fonts required to draw this view
       
   301 // ---------------------------------------------------------------------------
       
   302 //
       
   303 
       
   304 TBool CIRNowPlayingViewContainer::KeyHitL(  TInt aScanCode 
       
   305 	                  /*TVRRockerButtonHitTestType aType */)
       
   306 	{
       
   307      IRLOG_DEBUG( "CIRNowPlayingViewContainer::KeyHit - Entering" );
       
   308 	TBool ret = EFalse;
       
   309 	switch ( aScanCode )
       
   310 		{
       
   311 		case EStdKeyRightArrow:
       
   312 			{
       
   313 			TriggerCommandL(EIRCmdStepNextPreset);
       
   314 			}
       
   315 		break;
       
   316 		case EStdKeyLeftArrow:
       
   317 			{
       
   318 			TriggerCommandL(EIRCmdStepPrevPreset);
       
   319 			}
       
   320 		break;
       
   321 		case EStdKeyDevice3:
       
   322 			{
       
   323 			if(iNowPlayingView->iNowPlayingWrapper->iPlaying)
       
   324 				{
       
   325 				TriggerCommandL(EIRCmdStop);
       
   326 				}
       
   327 			else
       
   328 				{
       
   329 				TriggerCommandL(EIRCmdPlay);
       
   330 				}
       
   331 			}
       
   332 		break;
       
   333 		case EStdKeyUpArrow:
       
   334 		break;
       
   335 		case EStdKeyDownArrow:
       
   336 		break;
       
   337 		default:
       
   338 		break;
       
   339 		}
       
   340 	IRLOG_DEBUG( "CIRNowPlayingViewContainer::KeyHit - Exiting" );
       
   341 	return ret;
       
   342 	}
       
   343 // ---------------------------------------------------------------------------
       
   344 // Layouts this control.
       
   345 // ---------------------------------------------------------------------------
       
   346 //
       
   347 void CIRNowPlayingViewContainer::LayoutControl()
       
   348     {
       
   349     IRLOG_DEBUG( "CIRNowPlayingViewContainer::LayoutControl - Entering" );
       
   350      TInt ordinal = KControl1;
       
   351 	 TInt resId ;
       
   352     
       
   353     
       
   354     //Set anchor for ByteCounter
       
   355     resId = iNowPlayingView->iUi->ChooseLayoutResource( 
       
   356     									 R_IR_NOWPLAYING_VIEW_BYTECOUNTER_LAYOUT, 
       
   357                                          R_IR_NOWPLAYING_VIEW_BYTECOUNTER_LAYOUT_MIRRORED, 
       
   358                                          R_IR_NOWPLAYING_VIEW_BYTECOUNTER_LAYOUT_LANDSCAPE, 
       
   359                                  R_IR_NOWPLAYING_VIEW_BYTECOUNTER_LAYOUT_LANDSCAPE_MIRRORED );
       
   360     SetLayoutAnchor( ordinal, resId );
       
   361     ordinal++;
       
   362 
       
   363     //Set anchor for the BitRate
       
   364      resId = iNowPlayingView->iUi->ChooseLayoutResource( 
       
   365         								 R_IR_NOWPLAYING_VIEW_BITRATE_LAYOUT, 
       
   366                                          R_IR_NOWPLAYING_VIEW_BITRATE_LAYOUT_MIRRORED, 
       
   367                                          R_IR_NOWPLAYING_VIEW_BITRATE_LAYOUT_LANDSCAPE, 
       
   368                                  R_IR_NOWPLAYING_VIEW_BITRATE_LAYOUT_LANDSCAPE_MIRRORED );
       
   369     SetLayoutAnchor( ordinal, resId );  
       
   370      ordinal++;
       
   371                                 
       
   372     // Set anchor for station logo.
       
   373     resId = iNowPlayingView->iUi->ChooseLayoutResource( 
       
   374     									 R_IR_NOWPLAYING_VIEW_LOGO_BITMAP_LAYOUT, 
       
   375                                          R_IR_NOWPLAYING_VIEW_LOGO_BITMAP_LAYOUT_MIRRORED, 
       
   376                                          R_IR_NOWPLAYING_VIEW_LOGO_BITMAP_LAYOUT_LANDSCAPE, 
       
   377                                  R_IR_NOWPLAYING_VIEW_LOGO_BITMAP_LAYOUT_LANDSCAPE_MIRRORED );
       
   378     SetLayoutAnchor( ordinal, resId );
       
   379      ordinal++;
       
   380 
       
   381     // Set anchor for station information.
       
   382     resId = iNowPlayingView->iUi->ChooseLayoutResource(
       
   383     									 R_IR_NOWPLAYING_VIEW_STATION_INFORMATION_LAYOUT, 
       
   384                                          R_IR_NOWPLAYING_VIEW_STATION_INFORMATION_LAYOUT_MIRRORED, 
       
   385                            R_IR_NOWPLAYING_VIEW_STATION_INFORMATION_LAYOUT_LANDSCAPE,
       
   386                            R_IR_NOWPLAYING_VIEW_STATION_INFORMATION_LAYOUT_LANDSCAPE_MIRRORED );
       
   387     SetLayoutAnchor( ordinal, resId );
       
   388     ordinal++;
       
   389     
       
   390     if ( iNowPlayingView->iUi->IsLandscapeOrientation() )
       
   391         {
       
   392         // Set anchor for RDS data on landscape.
       
   393         resId = R_IR_NOWPLAYING_VIEW_METADATA_LAYOUT_LANDSCAPE;
       
   394         if ( AknLayoutUtils::LayoutMirrored() )
       
   395             {
       
   396             resId = R_IR_NOWPLAYING_VIEW_METADATA_LAYOUT_LANDSCAPE_MIRRORED;    
       
   397             }
       
   398         SetLayoutAnchor( ordinal, resId );
       
   399         ordinal++;
       
   400         } 
       
   401     else
       
   402 	    {
       
   403         // If RDS data is on separate layout then remove it 
       
   404         iLayout->Detach( ordinal );
       
   405 	    }
       
   406     if ( iStationInformationDisplay )
       
   407         {
       
   408         iStationInformationDisplay->SetDisplayOrientation( 
       
   409         			iNowPlayingView->iUi->IsLandscapeOrientation() );
       
   410         }
       
   411     iLayout->UpdateChildrenLayout();
       
   412 
       
   413     IRLOG_DEBUG( "CIRNowPlayingViewContainer::LayoutControl - Exiting" );
       
   414     }
       
   415 
       
   416 // ---------------------------------------------------------------------------
       
   417 // Sets layout anchor for child visual.
       
   418 // ---------------------------------------------------------------------------
       
   419 //
       
   420 void CIRNowPlayingViewContainer::SetLayoutAnchor( TInt aOrdinal, TInt aResourceId )
       
   421     {
       
   422     IRLOG_DEBUG( "CIRNowPlayingViewContainer::SetLayoutAnchor - Entering" );
       
   423 
       
   424     // Read LAFs.
       
   425     TSize size = iAlfEnv.PrimaryDisplay().VisibleArea().Size();
       
   426     TRect rect( size );
       
   427     
       
   428     TAknLayoutRect layoutRect;
       
   429     layoutRect.LayoutRect( rect, aResourceId );
       
   430     
       
   431     // Set top/left anchor.
       
   432     iLayout->Attach( aOrdinal, 
       
   433                      EAlfAnchorTypeTopLeft,
       
   434                      TAlfXYMetric( TAlfMetric( layoutRect.Rect().iTl.iX ),
       
   435                      TAlfMetric( layoutRect.Rect().iTl.iY ) ),
       
   436                      EAlfAnchorAttachmentOriginTopLeft );
       
   437 
       
   438     // Set bottom/right anchor.
       
   439     iLayout->Attach( aOrdinal, 
       
   440                      EAlfAnchorTypeBottomRight, 
       
   441                      TAlfXYMetric( TAlfMetric( layoutRect.Rect().iBr.iX ),
       
   442                      TAlfMetric( layoutRect.Rect().iBr.iY ) ),
       
   443                      EAlfAnchorAttachmentOriginTopLeft );
       
   444     IRLOG_DEBUG( "CIRNowPlayingViewContainer::SetLayoutAnchor - Exiting" );
       
   445     }
       
   446 
       
   447 // ---------------------------------------------------------------------------
       
   448 // Triggers the command to view handling
       
   449 // ---------------------------------------------------------------------------
       
   450 //
       
   451 void CIRNowPlayingViewContainer::TriggerCommandL( TInt iCommandId)
       
   452 	{
       
   453 	IRLOG_DEBUG( "CIRNowPlayingViewContainer::TriggerCommandL - Entering" );
       
   454 	TVwsViewId viewId( KNullUid, KNullUid );
       
   455 	CAknViewAppUi* appUi = static_cast<CAknViewAppUi*>( CCoeEnv::Static()->AppUi() );
       
   456 	TInt err = appUi->GetActiveViewId( viewId );
       
   457 	RProcess process;
       
   458 	TSecureId id = process.SecureId();
       
   459 	// TO be DOne GetActiveViewId doesn't always work (when switched back to VRA through RadioLauncher icon
       
   460 	if( !err && viewId.iAppUid.iUid == id.iId )
       
   461 		{
       
   462 		CAknView* view = appUi->View( viewId.iViewUid );
       
   463 		if( view )
       
   464 			{
       
   465 			view->ProcessCommandL( iCommandId );
       
   466 			}
       
   467 		}
       
   468 	IRLOG_DEBUG( "CIRNowPlayingViewContainer::TriggerCommandL - Exiting" );
       
   469 	}
       
   470 //Calls the Views Draw Function
       
   471 // ---------------------------------------------------------------------------
       
   472 //
       
   473 void CIRNowPlayingViewContainer::DrawViewL( TBool aStationHasLogo)
       
   474 	{
       
   475 	IRLOG_DEBUG( "CIRNowPlayingViewContainer::TriggerCommandL - Entering" );
       
   476 	iNowPlayingView->DrawViewL(aStationHasLogo);
       
   477 	IRLOG_DEBUG( "CIRNowPlayingViewContainer::TriggerCommandL - Entering" );
       
   478 	}