internetradio2.0/mcppluginsrc/irmcpplugin.cpp
changeset 14 896e9dbc5f19
parent 12 608f67c22514
child 15 065198191975
equal deleted inserted replaced
12:608f67c22514 14:896e9dbc5f19
     1 /*
       
     2 * Copyright (c) 2008-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 "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 
       
    18 
       
    19 #include <bautils.h>
       
    20 #include <coemain.h>
       
    21 #include <data_caging_path_literals.hrh>
       
    22 #include <e32cmn.h>
       
    23 #include <implementationproxy.h>
       
    24 #include <liwvariant.h>
       
    25 #include <stringloader.h>
       
    26 #include <irmcpplugin.rsg>
       
    27 
       
    28 #include <e32property.h>
       
    29 
       
    30 #include "iractionhandler.hrh"
       
    31 #include "iractionhandlerdefs.h"
       
    32 #include "iractiveidleeng.h"
       
    33 #include "iractiveidleengnotifyhandler.h"
       
    34 #include "irdebug.h"
       
    35 #include "irmcpplugin.h"
       
    36 #include "irmcpplugin.hrh"
       
    37 
       
    38 
       
    39 
       
    40 #include "irmetadata.h"
       
    41 
       
    42 const TInt KIRMinVolumeLevel = 0;
       
    43 const TInt KIRMaxVolumeLevel  = 10;
       
    44 
       
    45 _LIT( KIRMCPPluginResourceFileName, "irmcpplugin.rsc" );
       
    46 
       
    47 //Temp images from Music widget, svg via handle to rgba bitmap will be supported soon.
       
    48 _LIT( KIMGPlay, "z:\\Resource\\apps\\qgn_prop_image_tb_play2_dimmed2.png" );
       
    49 _LIT( KIMGStop, "z:\\Resource\\apps\\qgn_prop_image_tb_pause_dimmed2.png" );
       
    50 
       
    51 _LIT8( KIRPluginUid, "plugin_id" );
       
    52 _LIT8( KIRData, "data" );
       
    53 _LIT( KEmpty, "" );
       
    54 // ---------------------------------------------------------
       
    55 // CIRMCPPlugin::NewL
       
    56 // ---------------------------------------------------------
       
    57 //
       
    58 CIRMCPPlugin* CIRMCPPlugin::NewL( MMCPPluginObserver* aObserver )
       
    59     {
       
    60     CIRMCPPlugin* self = new ( ELeave ) CIRMCPPlugin( aObserver );
       
    61     CleanupStack::PushL( self );
       
    62 
       
    63     self->ConstructL();
       
    64     
       
    65     CleanupStack::Pop( self );
       
    66     return self;
       
    67     }
       
    68 
       
    69 // ---------------------------------------------------------
       
    70 // CIRMCPPlugin::~CIRMCPPlugin
       
    71 // ---------------------------------------------------------
       
    72 //
       
    73 CIRMCPPlugin::~CIRMCPPlugin()
       
    74     {
       
    75     if ( iResourceOffset > 0 )
       
    76         {
       
    77         CCoeEnv::Static()->DeleteResourceFile( iResourceOffset );
       
    78         }
       
    79 
       
    80     delete iMetaData;
       
    81 
       
    82     delete iEngine;
       
    83     delete iLastPlayedText;
       
    84     }
       
    85 
       
    86 // ---------------------------------------------------------
       
    87 // CIRMCPPlugin::CIRMCPPlugin
       
    88 // ---------------------------------------------------------
       
    89 //
       
    90 CIRMCPPlugin::CIRMCPPlugin( MMCPPluginObserver* aObserver )
       
    91     : iObserver( aObserver )
       
    92     {
       
    93     }
       
    94 
       
    95 // ---------------------------------------------------------
       
    96 // CIRMCPPlugin::ConstructL
       
    97 // ---------------------------------------------------------
       
    98 //
       
    99 void CIRMCPPlugin::ConstructL()
       
   100     {
       
   101     InitializeResourceLoadingL();
       
   102 
       
   103     iRunningState = EIRPSApplicationUninitialized;
       
   104 
       
   105     iLastPlayedText = StringLoader::LoadL( R_IR_MCP_LASTPLAYED);
       
   106     iBufferingText = StringLoader::LoadL( R_IR_MCP_BUFFERING);
       
   107 
       
   108     iEngine = CIRActiveIdleEng::NewL( *this );
       
   109     iEngine->SecondConstructL();
       
   110     
       
   111     iMetaData = CIRMetaData::NewL();
       
   112 	HandleApplicationRunningStateChangeL(iRunningState);
       
   113 
       
   114     }
       
   115 
       
   116 
       
   117 // ---------------------------------------------------------------------------
       
   118 // CIRMCPPlugin::InitializeResourceLoadingL
       
   119 // ---------------------------------------------------------------------------
       
   120 //
       
   121 void CIRMCPPlugin::InitializeResourceLoadingL()
       
   122     {
       
   123     CCoeEnv* coeEnv = CCoeEnv::Static();
       
   124     RFs fs( coeEnv->FsSession() );
       
   125     TFileName fileName; 
       
   126     TFileName baseResource;
       
   127     TFindFile finder( fs );
       
   128     TLanguage language( ELangNone );
       
   129     
       
   130     TParsePtrC parse( KIRMCPPluginResourceFileName );
       
   131     _LIT( resourceFileWildExt, ".r*" );
       
   132 
       
   133     // Make sure to find all resource files, not only .rsc files as it may be so
       
   134     // that there is only .r01, .r02, etc. files available
       
   135     fileName.Copy( parse.Name() );
       
   136     fileName.Append( resourceFileWildExt );
       
   137 
       
   138     // TFindFile applies search order that is from 
       
   139     // drive Y to A, then Z
       
   140     CDir* entries = NULL;
       
   141     TInt err = finder.FindWildByDir( fileName , KDC_RESOURCE_FILES_DIR, entries );
       
   142     delete entries;
       
   143     entries = NULL;
       
   144     TBool found = EFalse;
       
   145     while ( !found && err == KErrNone )
       
   146         {
       
   147         // Found file
       
   148         fileName.Zero();
       
   149         TParsePtrC foundPath( finder.File() );
       
   150         fileName.Copy( foundPath.DriveAndPath() );
       
   151         fileName.Append( KIRMCPPluginResourceFileName );
       
   152         BaflUtils::NearestLanguageFile( fs, fileName, language );
       
   153         if ( language != ELangNone && BaflUtils::FileExists( fs, fileName ) )
       
   154             {
       
   155             found = ETrue;
       
   156             iResourceOffset = coeEnv->AddResourceFileL( fileName );
       
   157             }
       
   158         else
       
   159             {
       
   160             if ( language == ELangNone &&
       
   161                  !baseResource.Compare( KNullDesC ) &&
       
   162                  BaflUtils::FileExists( fs, fileName ) )
       
   163                 {
       
   164                 baseResource.Copy( fileName );
       
   165                 }
       
   166             err = finder.FindWild( entries );
       
   167             delete entries;
       
   168             entries = NULL;
       
   169             }
       
   170         }
       
   171 
       
   172     if ( !found && baseResource.Compare( KNullDesC ) )
       
   173         {
       
   174         // If we found *.rsc then better to use that than nothing
       
   175         if ( BaflUtils::FileExists( fs, baseResource ) )
       
   176             {
       
   177             iResourceOffset = coeEnv->AddResourceFileL( baseResource );
       
   178             }
       
   179         }
       
   180     }
       
   181 
       
   182 // ---------------------------------------------------------------------------
       
   183 // CIRMCPPlugin::Deactivate
       
   184 // ---------------------------------------------------------------------------
       
   185 //
       
   186 void CIRMCPPlugin::Deactivate()
       
   187     {
       
   188     IRRDEBUG2("InternetRadio -- CIRMCPPlugin::Deactivate Entering", KNullDesC);
       
   189 
       
   190     iActive = EFalse;
       
   191     }
       
   192 
       
   193 // ---------------------------------------------------------------------------
       
   194 // CIRMCPPlugin::ActivateL
       
   195 // ---------------------------------------------------------------------------
       
   196 //
       
   197 void CIRMCPPlugin::ActivateL()
       
   198     {
       
   199     IRRDEBUG2("CIRMCPPlugin::ActivateL Entering", KNullDesC);
       
   200 
       
   201     iActive = ETrue;
       
   202     iObserver->BecameActiveL(this);
       
   203     
       
   204     HandleChannelChangeL();
       
   205     
       
   206     HandleMetaDataReceivedL(*iMetaData);
       
   207   
       
   208   	RProperty::Get( KUidActiveInternetRadioApp,KIRPSPlayStop,
       
   209 					 iPlayingState );	 
       
   210 
       
   211 	HandlePlayStopL(static_cast<TIRStopPlayState>(iPlayingState));
       
   212 	
       
   213 /*	IRRDEBUG2("ActivateL iRunningState = %d",iRunningState);
       
   214     InstallIRCommandActionL( KIRCommandValueStartNowPlaying(), EMusicWidgetTrigger1 );
       
   215     iObserver->PublishImageL( this, EMusicWidgetImage1, KIMGPlay ); */ 	
       
   216 	
       
   217     InstallIRCommandActionL( KIRCommandValueStartNowPlaying(), EMusicWidgetTrigger2 );            
       
   218 
       
   219     }
       
   220 
       
   221 
       
   222 
       
   223 
       
   224 // ---------------------------------------------------------------------------
       
   225 // CIRMCPPlugin::PublishLastPlayedWidgetItemsL
       
   226 // ---------------------------------------------------------------------------
       
   227 //
       
   228 void CIRMCPPlugin::PublishLastPlayedWidgetItemsL()
       
   229     {
       
   230     if ( iActive )
       
   231     	{
       
   232    	    IRRDEBUG2("CIRMCPPlugin::PublishLastPlayedWidgetItemsL Entering", KNullDesC);
       
   233 
       
   234         InstallIRCommandActionL( KIRCommandValueStartNowPlaying(), EMusicWidgetTrigger1 );
       
   235         iObserver->PublishImageL( this, EMusicWidgetImage1, KIMGPlay );
       
   236         }
       
   237 	
       
   238     HandleChannelChangeL();
       
   239     IRRDEBUG2("CIRMCPPlugin::PublishLastPlayedWidgetItemsL Exitings", KNullDesC);
       
   240        
       
   241     }
       
   242 
       
   243 
       
   244 
       
   245 // ---------------------------------------------------------------------------
       
   246 // CIRMCPPlugin::HandleChannelChangeL
       
   247 // Handles channel change
       
   248 // ---------------------------------------------------------------------------
       
   249 //
       
   250 void CIRMCPPlugin::HandleChannelChangeL()
       
   251 	{
       
   252 	
       
   253     IRRDEBUG2("CIRMCPPlugin::HandleChannelChangeL Entering", KNullDesC);
       
   254 
       
   255 	RProperty::Get ( KUidActiveInternetRadioApp, KIRPSDataChannel,
       
   256 				 	 iChannelName );
       
   257 				 	 
       
   258 	IRRDEBUG2("HandleChannelChange iRunningState = %d",iRunningState);
       
   259 
       
   260 	 if ( iActive )
       
   261         {
       
   262         switch(iRunningState)
       
   263 	        {
       
   264 	        case EIRPSApplicationRunning:
       
   265 		        {
       
   266 		        iObserver->PublishTextL( this, EMusicWidgetText1, iChannelName);
       
   267 		        IRRDEBUG2("CIRMCPPlugin::HandleChannelChangeL iChannelName published", KNullDesC);
       
   268 							       	
       
   269 				break;
       
   270 		        }
       
   271 		     
       
   272 	        case  EIRPSApplicationUninitialized:
       
   273 	        case  EIRPSApplicationClosing:
       
   274 		       {
       
   275 	     	   IRRDEBUG2("CIRMCPPlugin::HandleChannelChangeL EIRPSApplicationUninitialized", KNullDesC);
       
   276 		       iObserver->PublishTextL( this, EMusicWidgetText1, *iLastPlayedText );
       
   277 	           iObserver->PublishTextL( this, EMusicWidgetText2, iChannelName );
       
   278 	      			
       
   279 					break;
       
   280 		       }
       
   281 		       
       
   282 		    default:
       
   283 		    	break;
       
   284 	        }
       
   285         }	
       
   286 
       
   287     IRRDEBUG2("CIRMCPPlugin::HandleChannelChangeL Exiting", KNullDesC);
       
   288 
       
   289 	}
       
   290 
       
   291 
       
   292 // ---------------------------------------------------------------------------
       
   293 // CIRMCPPlugin::HandleMetaDataReceivedL
       
   294 // Handles meta data changes
       
   295 // ---------------------------------------------------------------------------
       
   296 //
       
   297 void CIRMCPPlugin::HandleMetaDataReceivedL( const CIRMetaData& aMetaData )
       
   298     {
       
   299     IRRDEBUG2("CIRMCPPlugin::HandleMetaDataReceivedL Entering", KNullDesC);
       
   300 
       
   301     iMetaData->SetL( aMetaData );
       
   302     
       
   303     if ( iActive )
       
   304         {
       
   305         switch(iRunningState)
       
   306 	        {
       
   307 
       
   308 	        case EIRPSApplicationRunning:
       
   309 		        {
       
   310 		        IRRDEBUG2("CIRMCPPlugin::HandleMetaDataReceivedL EIRPSApplicationRunning", KNullDesC);
       
   311 				if(iMetaData->Song().Length())
       
   312 					{
       
   313 					iObserver->PublishTextL( this, EMusicWidgetText2, iMetaData->Song());
       
   314 		            IRRDEBUG2("CIRMCPPlugin::HandleMetaDataReceivedL Song published", KNullDesC);
       
   315 					}
       
   316 			/*	else
       
   317 					{
       
   318 					iObserver->PublishTextL( this, EMusicWidgetText2, KEmpty)
       
   319 					}*/
       
   320 										
       
   321 				if(iMetaData->Artist().Length())
       
   322 					{
       
   323 					iObserver->PublishTextL( this, EMusicWidgetText3, iMetaData->Artist());
       
   324 			        IRRDEBUG2("CIRMCPPlugin::HandleMetaDataReceivedL Artist published", KNullDesC);
       
   325 					} 
       
   326 			/*	else
       
   327 					{
       
   328 					iObserver->PublishTextL( this, EMusicWidgetText3, KEmpty)
       
   329 					}*/	
       
   330 									       	
       
   331 				break;
       
   332 		        }
       
   333 		     
       
   334 	        case  EIRPSApplicationUninitialized:
       
   335 	        case  EIRPSApplicationClosing:
       
   336 		       {
       
   337 	     	   IRRDEBUG2("CIRMCPPlugin::HandleMetaDataReceivedL EIRPSApplicationUninitialized/Closing", KNullDesC);
       
   338 	           if(iMetaData->Song().Length())
       
   339 					{
       
   340 					iObserver->PublishTextL( this, EMusicWidgetText3, iMetaData->Song());
       
   341 		            IRRDEBUG2("CIRMCPPlugin::HandleMetaDataReceivedL LastSong published", KNullDesC);
       
   342 					}
       
   343 			   else
       
   344 					{
       
   345 					iObserver->PublishTextL( this, EMusicWidgetText3, KEmpty);
       
   346 					}	
       
   347 						
       
   348 					break;
       
   349 		       }
       
   350 		       
       
   351 		    default:
       
   352 		    	break;
       
   353 	        }
       
   354         }	   
       
   355         	
       
   356     IRRDEBUG2("CIRMCPPlugin::HandleMetaDataReceivedL exiting", KNullDesC);
       
   357 
       
   358 	}
       
   359 
       
   360 // ---------------------------------------------------------------------------
       
   361 // CIRMCPPlugin::HandlePlayStopL
       
   362 // Handles data change in Stop State
       
   363 // ---------------------------------------------------------------------------
       
   364 //
       
   365 void CIRMCPPlugin::HandlePlayStopL( TIRStopPlayState aState )
       
   366 	{
       
   367 	
       
   368     IRRDEBUG2("CIRMCPPlugin::HandlePlayStopL Entering", KNullDesC);
       
   369 
       
   370 	if ( aState == EIRStatePlay )
       
   371 		{
       
   372 	    IRRDEBUG2("CIRMCPPlugin::HandlePlayStopL unmute/play", KNullDesC);
       
   373 
       
   374 	    InstallIRCommandActionL( KIRCommandValueStop(), EMusicWidgetTrigger1 );
       
   375 
       
   376         iObserver->PublishImageL( this, EMusicWidgetImage1, KIMGStop );
       
   377 		}
       
   378 	else 			//if (aState == EIRStateStop)
       
   379 		{
       
   380 		
       
   381 	    IRRDEBUG2("CIRMCPPlugin::HandlePlayStopL mute/stop", KNullDesC);
       
   382 
       
   383 	    InstallIRCommandActionL( KIRCommandValuePlay(), EMusicWidgetTrigger1 );
       
   384 
       
   385         iObserver->PublishImageL( this, EMusicWidgetImage1, KIMGPlay );
       
   386 		}
       
   387 		
       
   388 		
       
   389 
       
   390     IRRDEBUG2("InternetRadio -- CIRMCPPlugin::HandlePlayStopL Exiting", KNullDesC);
       
   391 
       
   392 	}
       
   393 
       
   394 // ---------------------------------------------------------------------------
       
   395 // CIRMCPPlugin::HandleVolumeChangeL
       
   396 // Handles volume change
       
   397 // ---------------------------------------------------------------------------
       
   398 //
       
   399 void CIRMCPPlugin::HandleVolumeChangeL( const TInt aVolume )
       
   400 	  {
       
   401       if ( aVolume >= KIRMinVolumeLevel && aVolume <= KIRMaxVolumeLevel )
       
   402 	      {
       
   403 	      	
       
   404 	      }
       
   405 	  else
       
   406 		  {
       
   407 		  User::Leave(KErrGeneral);
       
   408 	 	  }		      
       
   409  	  }
       
   410 
       
   411 
       
   412 // ---------------------------------------------------------------------------
       
   413 // CIRMCPPlugin::HandleApplicationRunningStateChangeL
       
   414 // ---------------------------------------------------------------------------
       
   415 //
       
   416 void CIRMCPPlugin::HandleApplicationRunningStateChangeL( TIRPSApplicationRunningState 
       
   417 															aRunningState )
       
   418 	{
       
   419 	IRRDEBUG2("CIRMCPPlugin::HandleApplicationRunningStateChangeL Entering aRunningState= %d", aRunningState);
       
   420 
       
   421 	if ( iRunningState != aRunningState )
       
   422 		{
       
   423 		iRunningState = aRunningState;
       
   424 
       
   425 		switch ( iRunningState )
       
   426 			{
       
   427 			case EIRPSApplicationUninitialized:
       
   428 			case EIRPSApplicationRunning:
       
   429 			ActivateL();
       
   430 			break;
       
   431 			case EIRPSApplicationClosing:
       
   432 			if ( iActive )
       
   433 				{
       
   434 				IRRDEBUG2("HandleApplicationRunningStateChangeL EIRPSApplicationClosing iActive", KNullDesC);
       
   435 
       
   436 				InstallIRCommandActionL( KIRCommandValueStartNowPlaying(), EMusicWidgetTrigger1 );
       
   437 				IRRDEBUG2("HandleApplicationRunningStateChangeL StartNowPlaying", KNullDesC);
       
   438 
       
   439 				iObserver->PublishImageL( this, EMusicWidgetImage1, KIMGPlay );
       
   440 				IRRDEBUG2("HandleApplicationRunningStateChangeL PublishImageL", KNullDesC);
       
   441 
       
   442  				iObserver->PublishTextL( this, EMusicWidgetText1, *iLastPlayedText );
       
   443 	            iObserver->PublishTextL( this, EMusicWidgetText2, iChannelName );
       
   444 	      	
       
   445 
       
   446 				if(iMetaData->Song().Length())
       
   447 					{
       
   448 					iObserver->PublishTextL( this, EMusicWidgetText3, iMetaData->Song());
       
   449 					IRRDEBUG2("CIRMCPPlugin::HandleMetaDataReceivedL Song published", KNullDesC);
       
   450 					}
       
   451 				else
       
   452 					{
       
   453 					iObserver->PublishTextL( this, EMusicWidgetText3, KEmpty);
       
   454 					}
       
   455 
       
   456 				}
       
   457 			iActive = EFalse;
       
   458 			break;
       
   459 			default:
       
   460 			break;
       
   461 
       
   462 			}
       
   463 
       
   464 		}
       
   465 	IRRDEBUG2("CIRMCPPlugin::HandleApplicationRunningStateChangeL Exiting", KNullDesC);
       
   466 
       
   467 	}
       
   468 
       
   469 
       
   470 // ---------------------------------------------------------------------------
       
   471 // CIRMCPPlugin::InstallIRCommandActionL
       
   472 // ---------------------------------------------------------------------------
       
   473 //
       
   474 void CIRMCPPlugin::InstallIRCommandActionL( const TDesC& aCommand, 
       
   475 											TMCPTriggerDestination aDestination )
       
   476     {
       
   477     IRRDEBUG2("CIRMCPPlugin::InstallIRCommandActionL Entering", KNullDesC);
       
   478 
       
   479     CLiwDefaultMap* mapTrigger = CLiwDefaultMap::NewLC();
       
   480     CLiwDefaultMap* mapData = CLiwDefaultMap::NewLC();
       
   481 
       
   482     mapTrigger->InsertL( KIRPluginUid, TLiwVariant( 
       
   483 	TUid::Uid( KIRActionHandlerImplementationUid ) ) );
       
   484 	
       
   485     mapData->InsertL( KIRCommand, TLiwVariant( aCommand ) );
       
   486     
       
   487     mapTrigger->InsertL( KIRData, TLiwVariant( mapData ) );
       
   488     
       
   489     if ( iActive )
       
   490         {
       
   491         IRRDEBUG2("InstallIRCommandActionL iActive", KNullDesC);
       
   492         
       
   493         iObserver->PublishActionL( this, aDestination, mapTrigger );
       
   494         IRRDEBUG2("InstallIRCommandActionL PublishActionL", KNullDesC);
       
   495         
       
   496         }
       
   497     
       
   498     CleanupStack::PopAndDestroy( mapData );
       
   499     CleanupStack::PopAndDestroy( mapTrigger );
       
   500     
       
   501     IRRDEBUG2("CIRMCPPlugin::InstallIRCommandActionL Exiting", KNullDesC);
       
   502 
       
   503     }
       
   504 
       
   505 
       
   506 
       
   507 // ---------------------------------------------------------------------------
       
   508 // CIRActiveIdle::HandleBufferingStateL
       
   509 // Handles changes in Internet Radio buffering state
       
   510 // ---------------------------------------------------------------------------
       
   511 //
       
   512 
       
   513 void CIRMCPPlugin::HandleBufferingStateL(TIRBufferingState aState )
       
   514 	{
       
   515 	IRRDEBUG2("CIRMCPPlugin::HandleBufferingStateL Entering", KNullDesC);
       
   516 	
       
   517 	if(iActive)
       
   518 		{
       
   519 		switch (aState)	
       
   520 			{
       
   521 			case EIRStateBufferingStop:
       
   522 				{
       
   523 				IRRDEBUG2("CIRMCPPlugin::HandleBufferingStateL 0", KNullDesC);
       
   524 
       
   525 				HandleChannelChangeL();
       
   526     
       
   527     			HandleMetaDataReceivedL(*iMetaData);
       
   528   
       
   529   				RProperty::Get( KUidActiveInternetRadioApp,KIRPSPlayStop,
       
   530 					 iPlayingState );	 
       
   531 
       
   532 				HandlePlayStopL(static_cast<TIRStopPlayState>(iPlayingState));
       
   533 	
       
   534 	
       
   535 				}
       
   536 			break;
       
   537 			case EIRStateBufferingStart:
       
   538 				{
       
   539 				
       
   540  				IRRDEBUG2("CIRMCPPlugin::HandleBufferingStateL 1", KNullDesC);
       
   541 
       
   542 				iObserver->PublishTextL( this, EMusicWidgetText1, KEmpty);
       
   543 				iObserver->PublishTextL( this, EMusicWidgetText2,KEmpty);
       
   544 				iObserver->PublishTextL( this, EMusicWidgetText3,*iBufferingText);
       
   545 	
       
   546 				}
       
   547 				break;
       
   548 				
       
   549 			case  EIRStateBufferingError:
       
   550 				{
       
   551 				iObserver->PublishTextL( this, EMusicWidgetText1, KEmpty);
       
   552 				iObserver->PublishTextL( this, EMusicWidgetText2,KEmpty);
       
   553 				iObserver->PublishTextL( this, EMusicWidgetText3,KEmpty);
       
   554 	
       
   555 				}
       
   556 			break;
       
   557 			}
       
   558 		}
       
   559 
       
   560 	IRRDEBUG2("CIRMCPPlugin::HandleBufferingStateL Exiting", KNullDesC);
       
   561 	
       
   562 	}
       
   563 
       
   564     
       
   565 /** Provides a key-value pair table, that is used to identify the correct construction function for the requested interface. */
       
   566 const TImplementationProxy KIRMCPPluginImplementationTable[] =
       
   567     {
       
   568     IMPLEMENTATION_PROXY_ENTRY( KIRMCPPluginImplementationUid, CIRMCPPlugin::NewL )
       
   569     };
       
   570 
       
   571 const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount );
       
   572 
       
   573 // ---------------------------------------------------------------------------
       
   574 // Returns the implementations provided by this ECOM plugin DLL.
       
   575 // ---------------------------------------------------------------------------
       
   576 //
       
   577 EXPORT_C const TImplementationProxy* ImplementationGroupProxy( TInt& aTableCount )
       
   578     {
       
   579     IRRDEBUG2("CIRMCPPlugin::ImplementationGroupProxy", KNullDesC);
       
   580 
       
   581     aTableCount = sizeof( KIRMCPPluginImplementationTable ) / sizeof( TImplementationProxy );
       
   582     return KIRMCPPluginImplementationTable;
       
   583     }
       
   584