resourcemgmt/hwresourcesmgr/server/src/HWRMFmTxCommonData.cpp
changeset 78 3f0699f2e14c
parent 0 4e1aa6a622a0
--- a/resourcemgmt/hwresourcesmgr/server/src/HWRMFmTxCommonData.cpp	Tue Oct 12 15:02:43 2010 +0300
+++ b/resourcemgmt/hwresourcesmgr/server/src/HWRMFmTxCommonData.cpp	Thu Oct 14 12:47:54 2010 +0300
@@ -278,13 +278,20 @@
         THWRMFmTxAvailableFlag nowAvailable = FmTxAvailableState(newState);
         THWRMFmTxAvailableFlag wasAvailable = FmTxAvailableState(iFmTxState);
 
+        COMPONENT_TRACE3( _L("HWRM Server - CHWRMFmTxCommonData::UpdateStatus - nowAvailable: %d, wasAvailable: %d"), 
+            nowAvailable, wasAvailable ); 
         if ( nowAvailable != wasAvailable )
             {
-            COMPONENT_TRACE2(_L("HWRM Server - CHWRMFmTxCommonData::UpdateStatus - Audio Policy notification: %d"), nowAvailable );
-            TInt err = iFmTxIsAvailableProperty.Set(nowAvailable);      
-            if ( err != KErrNone )
+            COMPONENT_TRACE2( _L("HWRM Server - CHWRMFmTxCommonData::UpdateStatus - iAudioRoutingEnabled: %d"), 
+                iAudioRoutingEnabled ); 
+            if ( iAudioRoutingEnabled )
                 {
-                COMPONENT_TRACE2( _L("HWRM Server - CHWRMFmTxCommonData::UpdateStatus - Audio Policy notification failed: %d"), err );
+                COMPONENT_TRACE2(_L("HWRM Server - CHWRMFmTxCommonData::UpdateStatus - Audio Policy notification: %d"), nowAvailable );
+                TInt err = iFmTxIsAvailableProperty.Set(nowAvailable);      
+                if ( err != KErrNone )
+                    {
+                    COMPONENT_TRACE2( _L("HWRM Server - CHWRMFmTxCommonData::UpdateStatus - Audio Policy notification failed: %d"), err );
+                    }
                 }
             
             // Update power save status if Fm Tx is available
@@ -534,6 +541,26 @@
     }
     
 // -----------------------------------------------------------------------------
+// CHWRMFmTxCommonData::EnableAudioRouting
+// Enables or disables audio routing
+// -----------------------------------------------------------------------------
+//
+void CHWRMFmTxCommonData::EnableAudioRouting(TBool aEnable, TBool aNotifyAudioPolicy)
+    {
+    COMPONENT_TRACE3( _L("HWRM Server - CHWRMFmTxCommonData::EnableAudioRouting %d, %d"), 
+            aEnable, aNotifyAudioPolicy );
+    iAudioRoutingEnabled = aEnable;
+    if ( aNotifyAudioPolicy )
+        {
+        TInt err = iFmTxIsAvailableProperty.Set( aEnable );      
+        if ( err != KErrNone )
+            {
+            COMPONENT_TRACE2( _L("HWRM Server - CHWRMFmTxCommonData::EnableAudioRouting - Audio Policy notification failed: %d"), err );
+            }
+        }
+    }
+    
+// -----------------------------------------------------------------------------
 // CHWRMFmTxCommonData::SetFrequencyRange
 // Set the Central Repository data, frequency range and step size
 // -----------------------------------------------------------------------------