fmradio/fmradioengine/src/fmradioengine.cpp
branchRCL_3
changeset 11 97dcae98e602
parent 6 3cb097cb90f8
child 13 4f2584af5a29
equal deleted inserted replaced
9:0004e923f486 11:97dcae98e602
    35 #include "fmradiosystemeventdetector.h"
    35 #include "fmradiosystemeventdetector.h"
    36 #include "fmradiomobilenetworkinfolistener.h"
    36 #include "fmradiomobilenetworkinfolistener.h"
    37 #include "fmradiopubsub.h"
    37 #include "fmradiopubsub.h"
    38 #include "fmradiordsreceiver.h"
    38 #include "fmradiordsreceiver.h"
    39 #include "fmradiordsreceiversimulator.h"
    39 #include "fmradiordsreceiversimulator.h"
    40 #include "fmradioaccessoryobserver.h"
    40 #include "fmradioaccessoryconnection.h"
       
    41 
    41 #ifndef __ACCESSORY_FW
    42 #ifndef __ACCESSORY_FW
    42 #include "fmradioenginedosserverobserver.h"
    43 #include "fmradioenginedosserverobserver.h"
    43 #endif
    44 #endif
    44 
    45 
    45 // CONSTANTS
    46 // CONSTANTS
   144         {
   145         {
   145         // Pre-empted due to phone call, start Call State Observer
   146         // Pre-empted due to phone call, start Call State Observer
   146         iInCall = ETrue;
   147         iInCall = ETrue;
   147         }
   148         }
   148     // accessory observer
   149     // accessory observer
   149     iHeadsetObserver = CFMRadioAccessoryObserver::NewL();
   150     iHeadsetObserver = CFMRadioAccessoryConnection::NewL();
   150     iHeadsetObserver->SetObserver( this );    
   151     iHeadsetObserver->SetObserver( this );    
   151     // Set audio output to current setting
   152     // Set audio output to current setting
   152     if ( iHeadsetObserver->IsHeadsetAccessoryConnected() )
   153     if ( iHeadsetObserver->WiredHeadsetConnected() )
   153         {
   154         {
   154         SetAudioOutput( EFMRadioOutputHeadset );
   155         SetAudioOutput( EFMRadioOutputHeadset );
   155         }
   156         }
   156     else
   157     else
   157         {
   158         {
   834 
   835 
   835 #endif
   836 #endif
   836 
   837 
   837     if ( KErrNone == tempError )
   838     if ( KErrNone == tempError )
   838         {        
   839         {        
   839         if ( !iHeadsetObserver->IsHeadsetAccessoryConnected() )
   840         if ( !iHeadsetObserver->WiredHeadsetConnected() )
   840         	{
   841         	{
   841         	iRadioSettings->SetAudioOutput( EFMRadioOutputIHF );
   842         	iRadioSettings->SetAudioOutput( EFMRadioOutputIHF );
   842         	}
   843         	}
   843         else
   844         else
   844         	{
   845         	{
  1896 EXPORT_C TBool CRadioEngine::IsAudioRoutingPossible() const
  1897 EXPORT_C TBool CRadioEngine::IsAudioRoutingPossible() const
  1897     {
  1898     {
  1898     FTRACE( FPrint( _L("CRadioEngine::IsAudioRoutingPossible()" ) ) );
  1899     FTRACE( FPrint( _L("CRadioEngine::IsAudioRoutingPossible()" ) ) );
  1899     TBool isAudioRoutingPossible = EFalse;
  1900     TBool isAudioRoutingPossible = EFalse;
  1900     
  1901     
  1901     TBool headsetConnected = iHeadsetObserver->IsHeadsetAccessoryConnected();
  1902     TBool headsetConnected = iHeadsetObserver->WiredHeadsetConnected();
  1902     TBool radioOn = iRadioSettings->IsRadioOn();
  1903     TBool radioOn = iRadioSettings->IsRadioOn();
  1903         
  1904         
  1904     if ( headsetConnected && radioOn )
  1905     if ( headsetConnected && radioOn )
  1905         {
  1906         {
  1906         isAudioRoutingPossible = ETrue;
  1907         isAudioRoutingPossible = ETrue;