fmradio/fmradioengine/src/fmradiopubsub.cpp
changeset 0 f3d95d9c00ab
equal deleted inserted replaced
-1:000000000000 0:f3d95d9c00ab
       
     1 /*
       
     2 * Copyright (c) 2005-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:  Publish&Subscribe component of FM Radio
       
    15 *
       
    16 */
       
    17 
       
    18 #include "fmradiocontroleventobserver.h"
       
    19 
       
    20 #include "fmradiopubsub.h"
       
    21 
       
    22 
       
    23 // ================= MEMBER FUNCTIONS =======================
       
    24 
       
    25 // ---------------------------------------------------------------------------
       
    26 // C++ default constructor can NOT contain any code, that might leave.
       
    27 // ---------------------------------------------------------------------------
       
    28 //
       
    29 CFMRadioPubSub::CFMRadioPubSub()
       
    30     {
       
    31     }
       
    32 
       
    33 // ---------------------------------------------------------------------------
       
    34 // EPOC default constructor can leave.
       
    35 // ---------------------------------------------------------------------------
       
    36 //
       
    37 void CFMRadioPubSub::ConstructL()
       
    38     {    
       
    39     // Define data properties.
       
    40     DefinePropertyL( KFMRadioPSDataChannel, RProperty::EInt, ETrue );
       
    41     DefinePropertyL( KFMRadioPSDataFrequency, RProperty::EInt, ETrue );
       
    42     DefinePropertyL( KFMRadioPSDataRadioPowerState, RProperty::EInt, ETrue );
       
    43     DefinePropertyL( KFMRadioPSDataVolume, RProperty::EInt, ETrue );
       
    44     DefinePropertyL( KFMRadioPSDataChannelDataChanged, RProperty::EInt, ETrue );
       
    45     DefinePropertyL( KFMRadioPSDataTuningState, RProperty::EInt, ETrue );
       
    46     DefinePropertyL( KFMRadioPSDataRadioMuteState, RProperty::EInt, ETrue );
       
    47     DefinePropertyL( KFMRadioPSDataApplicationRunning, RProperty::EInt, ETrue );
       
    48     DefinePropertyL( KFMRadioPSDataHeadsetStatus, RProperty::EInt, ETrue );
       
    49     DefinePropertyL( KFMRadioPSDataFrequencyDecimalCount, RProperty::EInt, ETrue );
       
    50     DefinePropertyL( KFMRadioPSDataLoudspeakerStatus, RProperty::EInt, ETrue );
       
    51     DefinePropertyL( KFMRadioPSDataRDSProgramService, RProperty::EText, ETrue );
       
    52     DefinePropertyL( KFMRadioPSDataRDSRadioText, RProperty::EText, ETrue );
       
    53     DefinePropertyL( KFMRadioPSDataChannelName, RProperty::EText, ETrue );
       
    54     
       
    55     // Define control properties.
       
    56     DefinePropertyL( KFMRadioPSControlStepToChannel, RProperty::EInt, EFalse );
       
    57     DefinePropertyL( KFMRadioPSControlSeek, RProperty::EInt, EFalse );
       
    58     DefinePropertyL( KFMRadioPSControlSetRadioMuteState , RProperty::EInt, EFalse );
       
    59     // Observe control properties.
       
    60     DefinePropertyL( KFMRadioActiveIdlePresetListCount, RProperty::EInt, ETrue );    
       
    61     DefinePropertyL( KFMRadioActiveIdlePresetListFocus, RProperty::EInt, ETrue );
       
    62     
       
    63     
       
    64     CFMRadioPropertyObserver* observer = CFMRadioPropertyObserver::NewLC( *this,
       
    65             KFMRadioPSUid, KFMRadioPSControlStepToChannel, CFMRadioPropertyObserver::EFMRadioPropertyInt);
       
    66     iPropertyArray.AppendL( observer );
       
    67     CleanupStack::Pop( observer );
       
    68     
       
    69     observer = CFMRadioPropertyObserver::NewLC( *this,
       
    70             KFMRadioPSUid, KFMRadioPSControlSeek, CFMRadioPropertyObserver::EFMRadioPropertyInt );
       
    71     iPropertyArray.AppendL( observer );
       
    72     CleanupStack::Pop( observer );
       
    73     
       
    74     observer = CFMRadioPropertyObserver::NewLC( *this,
       
    75             KFMRadioPSUid, KFMRadioPSControlSetRadioMuteState, CFMRadioPropertyObserver::EFMRadioPropertyInt );
       
    76     iPropertyArray.AppendL( observer );
       
    77     CleanupStack::Pop( observer );
       
    78     
       
    79     observer = CFMRadioPropertyObserver::NewLC( *this,
       
    80             KFMRadioPSUid, KFMRadioActiveIdlePresetListCount, CFMRadioPropertyObserver::EFMRadioPropertyInt );
       
    81     iPropertyArray.AppendL( observer );
       
    82     CleanupStack::Pop( observer );
       
    83 
       
    84     for ( TInt i = 0; i < iPropertyArray.Count(); i++ )
       
    85 		{
       
    86 		iPropertyArray[i]->ActivateL();	
       
    87 		}
       
    88     }
       
    89 
       
    90 // -------------------------------------------------------f--------------------
       
    91 // Two-phased constructor.
       
    92 // ---------------------------------------------------------------------------
       
    93 //
       
    94 CFMRadioPubSub* CFMRadioPubSub::NewL()
       
    95     {
       
    96     CFMRadioPubSub* self = new (ELeave) CFMRadioPubSub();
       
    97     CleanupStack::PushL(self);
       
    98     self->ConstructL();
       
    99     CleanupStack::Pop();
       
   100     return self;
       
   101     }
       
   102 
       
   103     
       
   104 // ---------------------------------------------------------------------------
       
   105 // Destructor
       
   106 // ---------------------------------------------------------------------------
       
   107 //
       
   108 CFMRadioPubSub::~CFMRadioPubSub()
       
   109     {
       
   110     iPropertyArray.ResetAndDestroy();
       
   111 	iPropertyArray.Close();
       
   112 	
       
   113 	DeleteProperty( KFMRadioPSDataChannel );
       
   114 	DeleteProperty( KFMRadioPSDataFrequency );
       
   115 	DeleteProperty( KFMRadioPSDataRadioPowerState );
       
   116 	DeleteProperty( KFMRadioPSDataVolume );
       
   117 	DeleteProperty( KFMRadioPSDataChannelDataChanged );
       
   118 	DeleteProperty( KFMRadioPSDataTuningState );
       
   119 	DeleteProperty( KFMRadioPSDataRadioMuteState );
       
   120 	DeleteProperty( KFMRadioPSDataApplicationRunning );
       
   121     DeleteProperty( KFMRadioPSDataHeadsetStatus );
       
   122     DeleteProperty( KFMRadioPSDataFrequencyDecimalCount );
       
   123     DeleteProperty( KFMRadioPSDataLoudspeakerStatus );
       
   124     DeleteProperty( KFMRadioPSDataRDSProgramService );
       
   125     DeleteProperty( KFMRadioPSDataRDSRadioText );
       
   126     DeleteProperty( KFMRadioPSDataChannelName );
       
   127     
       
   128 	DeleteProperty( KFMRadioPSControlStepToChannel );
       
   129 	DeleteProperty( KFMRadioPSControlSeek );
       
   130 	DeleteProperty( KFMRadioPSControlSetRadioMuteState );
       
   131     DeleteProperty ( KFMRadioActiveIdlePresetListCount);
       
   132 	DeleteProperty ( KFMRadioActiveIdlePresetListFocus);
       
   133     }
       
   134 
       
   135 // ---------------------------------------------------------------------------
       
   136 // Defines a property.
       
   137 // ---------------------------------------------------------------------------
       
   138 //
       
   139 void CFMRadioPubSub::DefinePropertyL( TUint aKey, TInt aAttr, TBool aDataProperty ) const
       
   140     {
       
   141     /*lint -save -e648*/
       
   142     _LIT_SECURITY_POLICY_PASS( KFMRadioExternalAccessPolicy );
       
   143     /*lint -restore*/
       
   144     _LIT_SECURITY_POLICY_S0( KFMRadioInternalAccessPolicy, KUidFMRadioApplication );
       
   145     
       
   146     TInt err = KErrNone;
       
   147     if ( aDataProperty )
       
   148         {   
       
   149         // For data properties, grant read access for all, but write access only for FMRadioEngine
       
   150         err = RProperty::Define( KFMRadioPSUid, aKey, aAttr, KFMRadioExternalAccessPolicy, KFMRadioInternalAccessPolicy );
       
   151         }
       
   152     else
       
   153         {
       
   154         // For control properties, grant read access only for FMRadioEngine , but write access for all
       
   155         err = RProperty::Define( KFMRadioPSUid, aKey, aAttr, KFMRadioInternalAccessPolicy, KFMRadioExternalAccessPolicy );
       
   156         }
       
   157     
       
   158     
       
   159     if ( err && err != KErrAlreadyExists )
       
   160         {
       
   161         User::Leave( err );
       
   162         }
       
   163     }
       
   164 
       
   165 // ---------------------------------------------------------------------------
       
   166 // Deletes a property
       
   167 // ---------------------------------------------------------------------------
       
   168 //
       
   169 void CFMRadioPubSub::DeleteProperty( TUint aKey ) const
       
   170     {
       
   171     RProperty::Delete( KFMRadioPSUid, aKey );
       
   172     }
       
   173 
       
   174 // ---------------------------------------------------------------------------
       
   175 // Gets the integer value stored in a property.
       
   176 // ---------------------------------------------------------------------------
       
   177 //
       
   178 TInt CFMRadioPubSub::PropertyValueIntL( TUint aKey ) const
       
   179     {
       
   180     TInt value;
       
   181     User::LeaveIfError( RProperty::Get( KFMRadioPSUid, aKey, value ) );
       
   182     return value;
       
   183     }
       
   184 
       
   185 // ---------------------------------------------------------------------------
       
   186 // Sets a property's value.
       
   187 // ---------------------------------------------------------------------------
       
   188 //
       
   189 void CFMRadioPubSub::SetPropertyValueL( TUint aKey, TInt aValue ) const
       
   190     {
       
   191     User::LeaveIfError( RProperty::Set( KFMRadioPSUid, aKey, aValue ) );
       
   192     }
       
   193 
       
   194 // ---------------------------------------------------------------------------
       
   195 // Sets a text property value
       
   196 // ---------------------------------------------------------------------------
       
   197 //
       
   198 void CFMRadioPubSub::SetPropertyValueL( TUint aKey, const TDesC& aValue ) const
       
   199     {
       
   200     User::LeaveIfError( RProperty::Set( KFMRadioPSUid, aKey, aValue ) );
       
   201     }
       
   202 
       
   203 // ---------------------------------------------------------------------------
       
   204 // CFMRadioPubSub::HandlePropertyChangeL
       
   205 // ---------------------------------------------------------------------------
       
   206 //
       
   207 void CFMRadioPubSub::HandlePropertyChangeL( const TUid& aCategory, const TUint aKey, const TInt aValue )
       
   208 	{		
       
   209 	if (aCategory != KFMRadioPSUid)
       
   210 		{
       
   211 		User::Leave(KErrArgument);
       
   212 		}
       
   213 	
       
   214 	if (iObserver)
       
   215 		{
       
   216 		if (aKey == KFMRadioPSControlStepToChannel)
       
   217 	    	{
       
   218 	    	switch (aValue)
       
   219 	    		{
       
   220 				case EFMRadioPSStepToChannelUninitialized:
       
   221 					{
       
   222 					break;	
       
   223 					}
       
   224 				case EFMRadioPSStepToChannelUp:
       
   225 					{
       
   226 					iObserver->StepToChannelL(EFMRadioUp);
       
   227 					break;
       
   228 					}
       
   229 				case EFMRadioPSStepToChannelDown:
       
   230 					{
       
   231 					iObserver->StepToChannelL(EFMRadioDown);
       
   232 					break;
       
   233 					}
       
   234 	 			default:
       
   235 	 				{
       
   236 	 				break; 
       
   237 	 				}			
       
   238 	    		}
       
   239 	    	}
       
   240 	    else if (aKey == KFMRadioPSControlSeek)
       
   241 	    	{
       
   242 	    	switch (aValue)
       
   243 	    		{
       
   244 				case EFMRadioPSSeekUninitialized:
       
   245 					{
       
   246 					break;	
       
   247 					}
       
   248 				case EFMRadioPSSeekUp:
       
   249 					{
       
   250 					iObserver->SeekL(EFMRadioUp);
       
   251 					break;
       
   252 					}
       
   253 				case EFMRadioPSSeekDown:
       
   254 					{
       
   255 					iObserver->SeekL(EFMRadioDown);
       
   256 					break;
       
   257 					}
       
   258 	 			default:
       
   259 	 				{
       
   260 	 				break; 
       
   261 	 				}			
       
   262 	    		}
       
   263 	    	}
       
   264 	    else if (aKey == KFMRadioPSControlSetRadioMuteState)
       
   265 	    	{
       
   266 	    	switch (aValue)
       
   267 	    		{
       
   268 				case EFMRadioPSMuteStateUninitialized:
       
   269 					{
       
   270 					break;	
       
   271 					}
       
   272 				case EFMRadioPSMuteStateOn:
       
   273 					{
       
   274 					iObserver->MuteL(ETrue);
       
   275 					break;
       
   276 					}
       
   277 				case EFMRadioPSMuteStateOff:
       
   278 					{
       
   279 					iObserver->MuteL(EFalse);
       
   280 					break;
       
   281 					}
       
   282 	 			default:
       
   283 	 				{
       
   284 	 				break; 
       
   285 	 				}			
       
   286 	    		}
       
   287 	    	}
       
   288 		}
       
   289 	}
       
   290 	
       
   291 // ---------------------------------------------------------------------------
       
   292 // Currently empty implementation because we don't listen byte array type properties.
       
   293 // ---------------------------------------------------------------------------
       
   294 //
       
   295 void CFMRadioPubSub::HandlePropertyChangeL(const TUid& /*aCategory*/, const TUint /*aKey*/, const TDesC8& /*aValue*/)
       
   296 	{
       
   297 	}
       
   298 	
       
   299 // ---------------------------------------------------------------------------
       
   300 // Currently empty implementation because we don't listen text type properties.
       
   301 // ---------------------------------------------------------------------------
       
   302 //
       
   303 void CFMRadioPubSub::HandlePropertyChangeL(const TUid& /*aCategory*/, const TUint /*aKey*/, const TDesC& /*aValue*/)
       
   304 	{
       
   305 	}
       
   306 	
       
   307 // ---------------------------------------------------------------------------
       
   308 // CFMRadioPubSub::HandlePropertyChangeErrorL
       
   309 // ---------------------------------------------------------------------------
       
   310 //
       
   311 void CFMRadioPubSub::HandlePropertyChangeErrorL (const TUid& /*aCategory*/, const TUint /*aKey*/, TInt /*aError*/ )
       
   312 	{
       
   313 	//NOP
       
   314 	}
       
   315 
       
   316 // ---------------------------------------------------------------------------
       
   317 // CFMRadioPubSub::PublishChannelL
       
   318 // ---------------------------------------------------------------------------
       
   319 //	
       
   320 void CFMRadioPubSub::PublishChannelL(TInt aChannelId) const
       
   321 	{	    
       
   322     TInt oldChannelId = PropertyValueIntL( KFMRadioPSDataChannel );
       
   323 
       
   324     if ( aChannelId != oldChannelId )
       
   325         {
       
   326     	SetPropertyValueL( KFMRadioPSDataChannel, aChannelId );
       
   327         }
       
   328 	}
       
   329 	
       
   330 // ---------------------------------------------------------------------------
       
   331 // CFMRadioPubSub::PublishFrequencyL
       
   332 // ---------------------------------------------------------------------------
       
   333 //	
       
   334 EXPORT_C void CFMRadioPubSub::PublishFrequencyL( TUint32 aFreq ) const
       
   335 	{	
       
   336     TInt oldFreq = PropertyValueIntL( KFMRadioPSDataFrequency );
       
   337     
       
   338     if ( aFreq != oldFreq )
       
   339         {
       
   340     	SetPropertyValueL( KFMRadioPSDataFrequency, aFreq );
       
   341         }
       
   342 	}
       
   343 	
       
   344 // ---------------------------------------------------------------------------
       
   345 // CFMRadioPubSub::PublishStateL
       
   346 // ---------------------------------------------------------------------------
       
   347 //	
       
   348 EXPORT_C void CFMRadioPubSub::PublishStateL( TBool aPowerOn ) const
       
   349 	{	
       
   350     // If application process gets killed, power on state remains published.
       
   351     // Must not compare state transition here, because then power on might not be published.
       
   352 	TFMRadioPSRadioPowerState newState = aPowerOn ? EFMRadioPSRadioPowerOn : EFMRadioPSRadioPowerOff;
       
   353     SetPropertyValueL( KFMRadioPSDataRadioPowerState, newState );
       
   354 	}
       
   355 	
       
   356 // ---------------------------------------------------------------------------
       
   357 // CFMRadioPubSub::PublishVolumeL
       
   358 // ---------------------------------------------------------------------------
       
   359 //	
       
   360 void CFMRadioPubSub::PublishVolumeL( TInt aVol ) const
       
   361 	{	
       
   362 	TInt oldVol = PropertyValueIntL( KFMRadioPSDataVolume );
       
   363 	
       
   364 	if ( aVol != oldVol )
       
   365 	    {
       
   366     	SetPropertyValueL( KFMRadioPSDataVolume, aVol );
       
   367 	    }
       
   368 	}
       
   369 
       
   370 // ---------------------------------------------------------------------------
       
   371 // CFMRadioPubSub::PublishPresetCountL
       
   372 // ---------------------------------------------------------------------------
       
   373 //	
       
   374 EXPORT_C void CFMRadioPubSub::PublishPresetCountL( TInt aVal ) const
       
   375 	{	
       
   376 	TInt oldVal = PropertyValueIntL( KFMRadioActiveIdlePresetListCount );
       
   377 	
       
   378 	if ( aVal != oldVal )
       
   379 	    {
       
   380     	SetPropertyValueL( KFMRadioActiveIdlePresetListCount, aVal );
       
   381 	    }
       
   382 	}
       
   383 
       
   384 // ---------------------------------------------------------------------------
       
   385 // CFMRadioPubSub::PublishChannelDataChangedL
       
   386 // ---------------------------------------------------------------------------
       
   387 //	
       
   388 void CFMRadioPubSub::PublishChannelDataChangedL( TInt aChannelId ) const
       
   389 	{		
       
   390 	// Channel data changed notifications are allowed for the same channel multiple times, as the same channel's
       
   391 	// data can be changed many times in a row.
       
   392 	
       
   393 	SetPropertyValueL( KFMRadioPSDataChannelDataChanged, aChannelId );
       
   394 	}
       
   395 
       
   396 // ---------------------------------------------------------------------------
       
   397 // CFMRadioPubSub::PublishTuningStateL
       
   398 // ---------------------------------------------------------------------------
       
   399 //	
       
   400 void CFMRadioPubSub::PublishTuningStateL( TFMRadioPSTuningState aTuningState ) const
       
   401     {	
       
   402     TFMRadioPSTuningState oldState = static_cast<TFMRadioPSTuningState>( PropertyValueIntL( KFMRadioPSDataTuningState ) );
       
   403 	
       
   404 	if ( aTuningState != oldState )
       
   405 	    {
       
   406         SetPropertyValueL( KFMRadioPSDataTuningState, aTuningState );
       
   407 	    }
       
   408     }
       
   409 
       
   410 // ---------------------------------------------------------------------------
       
   411 // CFMRadioPubSub::PublishMuteStateL
       
   412 // ---------------------------------------------------------------------------
       
   413 //
       
   414 void CFMRadioPubSub::PublishRadioMuteStateL( TBool aMuted ) const
       
   415 	{
       
   416 	TFMRadioPSRadioMuteState oldState = static_cast<TFMRadioPSRadioMuteState>( PropertyValueIntL( KFMRadioPSDataRadioMuteState ) );
       
   417 	TFMRadioPSRadioMuteState newState = aMuted ? EFMRadioPSMuteStateOn : EFMRadioPSMuteStateOff;
       
   418 	
       
   419 	if ( newState != oldState )
       
   420 	    {
       
   421         SetPropertyValueL( KFMRadioPSDataRadioMuteState, newState );
       
   422 	    }
       
   423 	}
       
   424 	
       
   425 // ---------------------------------------------------------------------------
       
   426 // CFMRadioPubSub::PublishApplicationRunningStateL
       
   427 // ---------------------------------------------------------------------------
       
   428 //
       
   429 EXPORT_C void CFMRadioPubSub::PublishApplicationRunningStateL( TFMRadioPSApplicationRunningState aRunningState ) const
       
   430 	{	
       
   431     // If application process gets killed, wrong running state remains published.
       
   432     // Must not compare state transition here, because then application start might not be published.
       
   433     SetPropertyValueL( KFMRadioPSDataApplicationRunning, aRunningState );
       
   434 	}
       
   435 	
       
   436 // ---------------------------------------------------------------------------
       
   437 // CFMRadioPubSub::PublishAntennaStatusL
       
   438 // ---------------------------------------------------------------------------
       
   439 //
       
   440 void CFMRadioPubSub::PublishAntennaStatusL( TFMRadioPSHeadsetStatus aAntennaStatus ) const
       
   441 	{	
       
   442     TFMRadioPSHeadsetStatus oldState = static_cast<TFMRadioPSHeadsetStatus>( PropertyValueIntL( KFMRadioPSDataHeadsetStatus ) );
       
   443 	
       
   444 	if ( aAntennaStatus != oldState )
       
   445 	    {
       
   446         SetPropertyValueL( KFMRadioPSDataHeadsetStatus, aAntennaStatus );
       
   447 	    }
       
   448 	}
       
   449 	
       
   450 // ---------------------------------------------------------------------------
       
   451 // CFMRadioPubSub::PublishFrequencyDecimalCountL
       
   452 // ---------------------------------------------------------------------------
       
   453 //
       
   454 void CFMRadioPubSub::PublishFrequencyDecimalCountL( TFMRadioPSFrequencyDecimalCount aDecimalCount ) const
       
   455 	{	
       
   456     TFMRadioPSFrequencyDecimalCount oldCount = static_cast<TFMRadioPSFrequencyDecimalCount>( PropertyValueIntL( KFMRadioPSDataFrequencyDecimalCount ) );
       
   457 	
       
   458 	if ( aDecimalCount != oldCount )
       
   459 	    {
       
   460         SetPropertyValueL( KFMRadioPSDataFrequencyDecimalCount, aDecimalCount );
       
   461 	    }
       
   462 	}
       
   463 
       
   464 // ---------------------------------------------------------------------------
       
   465 // CFMRadioPubSub::PublishLoudspeakerStatusL
       
   466 // ---------------------------------------------------------------------------
       
   467 //
       
   468 void CFMRadioPubSub::PublishLoudspeakerStatusL( 
       
   469     TFMRadioPSLoudspeakerStatus aLoudspeakerStatus ) const
       
   470     {
       
   471     TFMRadioPSLoudspeakerStatus oldLoudspeakerStatus 
       
   472         = static_cast<TFMRadioPSLoudspeakerStatus>( 
       
   473         PropertyValueIntL(KFMRadioPSDataLoudspeakerStatus) );
       
   474     
       
   475     if(oldLoudspeakerStatus != aLoudspeakerStatus)
       
   476         {
       
   477         SetPropertyValueL( KFMRadioPSDataLoudspeakerStatus, aLoudspeakerStatus);
       
   478         }	
       
   479 	}
       
   480 
       
   481 // ---------------------------------------------------------------------------
       
   482 // CFMRadioPubSub::PublishRDSProgramServiceL
       
   483 // ---------------------------------------------------------------------------
       
   484 //
       
   485 EXPORT_C void CFMRadioPubSub::PublishRDSProgramServiceL( const TDesC& aProgramService ) const
       
   486     {
       
   487     SetPropertyValueL( KFMRadioPSDataRDSProgramService, aProgramService );
       
   488 	}
       
   489 
       
   490 // ---------------------------------------------------------------------------
       
   491 // CFMRadioPubSub::PublishRDSRadioTextL
       
   492 // ---------------------------------------------------------------------------
       
   493 //
       
   494 EXPORT_C void CFMRadioPubSub::PublishRDSRadioTextL( const TDesC& aRadioText ) const
       
   495     {
       
   496     SetPropertyValueL( KFMRadioPSDataRDSRadioText, aRadioText );
       
   497     }
       
   498 
       
   499 // ---------------------------------------------------------------------------
       
   500 // CFMRadioPubSub::PublishChannelNameL
       
   501 // ---------------------------------------------------------------------------
       
   502 //
       
   503 EXPORT_C void CFMRadioPubSub::PublishChannelNameL( const TDesC& aName ) const
       
   504     {
       
   505     SetPropertyValueL( KFMRadioPSDataChannelName, aName );
       
   506     }
       
   507 
       
   508 // ---------------------------------------------------------------------------
       
   509 // CFMRadioPubSub::SetControlEventObserver
       
   510 // ---------------------------------------------------------------------------
       
   511 //
       
   512 EXPORT_C void CFMRadioPubSub::SetControlEventObserver( MFMRadioControlEventObserver* aControlEventObserver )
       
   513     {
       
   514     iObserver = aControlEventObserver;
       
   515     }
       
   516