mmserv/tms/tmsserver/src/tmsserver.cpp
changeset 43 9894ed580e4a
parent 38 9e9fc5ab059f
child 53 eabc8c503852
equal deleted inserted replaced
39:1f58177f6740 43:9894ed580e4a
   799 TInt TMSServer::NotifyTarClients(TRoutingMsgBufPckg routingpckg)
   799 TInt TMSServer::NotifyTarClients(TRoutingMsgBufPckg routingpckg)
   800     {
   800     {
   801     TRACE_PRN_FN_ENT;
   801     TRACE_PRN_FN_ENT;
   802 
   802 
   803     TInt vol;
   803     TInt vol;
   804     iCurrentRouting = routingpckg().iOutput;
   804     TInt status(TMS_RESULT_SUCCESS);
   805     if (iCurrentRouting == TMS_AUDIO_OUTPUT_PUBLIC ||
   805     FindActiveCallType();
   806             iCurrentRouting == TMS_AUDIO_OUTPUT_LOUDSPEAKER)
   806 
   807         {
   807     if (iActiveCallType == TMS_CALL_CS)
   808         iEffectSettings->GetLoudSpkrVolume(vol);
   808         {
   809         TRACE_PRN_N1(_L("TMSServer::NotifyTarClients loudspkr vol %d"),vol);
   809 
   810         }
   810         iCurrentRouting = routingpckg().iOutput;
   811     else
   811         if (iCurrentRouting == TMS_AUDIO_OUTPUT_PUBLIC || 
   812         {
   812         	  iCurrentRouting == TMS_AUDIO_OUTPUT_LOUDSPEAKER)
   813         iEffectSettings->GetEarPieceVolume(vol);
   813             {
   814         TRACE_PRN_N1(_L("TMSServer::NotifyTarClients ear vol %d"),vol);
   814             iEffectSettings->GetLoudSpkrVolume(vol);
   815         }
   815             TRACE_PRN_N1(_L("TMSServer::NotifyTarClients loudspkr vol %d"),vol);
   816 
   816             }
   817     TInt status = SendMessageToCallServ(TMS_EFFECT_GLOBAL_VOL_SET, vol);
   817         else
       
   818             {
       
   819             iEffectSettings->GetEarPieceVolume(vol);
       
   820             TRACE_PRN_N1(_L("TMSServer::NotifyTarClients ear vol %d"),vol);
       
   821             }
       
   822 
       
   823         status = SendMessageToCallServ(TMS_EFFECT_GLOBAL_VOL_SET, vol);
       
   824         }
   818 
   825 
   819     iSessionIter.SetToFirst();
   826     iSessionIter.SetToFirst();
   820     TMSServerSession* ss = static_cast<TMSServerSession*> (iSessionIter++);
   827     TMSServerSession* ss = static_cast<TMSServerSession*> (iSessionIter++);
   821     while (ss != NULL)
   828     while (ss != NULL)
   822         {
   829         {
   823         // Send only if there is a subscriber to TMS routing notifications.
   830         // Send only if there is a subscriber to TMS routing notifications.
   824         if (iTarHandlerCount > 1)
   831         if (iTarHandlerCount > 1)
   825             {
   832             {
   826             ss->HandleRoutingChange(routingpckg);
   833             ss->HandleRoutingChange(routingpckg);
   827             }
   834             }
   828         ss->HandleGlobalEffectChange(TMS_EVENT_EFFECT_VOL_CHANGED, vol, ETrue,
   835         if (iActiveCallType == TMS_CALL_CS)
   829                 iCurrentRouting);
   836             {
       
   837             ss->HandleGlobalEffectChange(TMS_EVENT_EFFECT_VOL_CHANGED, vol,
       
   838                     ETrue, iCurrentRouting);
       
   839             }
   830         ss = static_cast<TMSServerSession*> (iSessionIter++);
   840         ss = static_cast<TMSServerSession*> (iSessionIter++);
   831         }
   841         }
   832 
   842 
   833     TRACE_PRN_FN_EXT;
   843     TRACE_PRN_FN_EXT;
   834     return status;
   844     return status;