phoneplugins/csplugin/src/cspcall.cpp
changeset 60 1eef62f5c541
parent 50 377c906a8701
child 65 2a5d4ab426d3
equal deleted inserted replaced
53:22cc52eade9b 60:1eef62f5c541
  1009 TBool CSPCall::IsCallForwarded( ) const
  1009 TBool CSPCall::IsCallForwarded( ) const
  1010     {
  1010     {
  1011     CSPLOGSTRING(CSPREQIN, "CSPCall::IsCallForwarded <");
  1011     CSPLOGSTRING(CSPREQIN, "CSPCall::IsCallForwarded <");
  1012     TBool ret( EFalse );
  1012     TBool ret( EFalse );
  1013     TInt err( KErrNone );
  1013     TInt err( KErrNone );
  1014     RMobileCall::TMobileCallInfoV3Pckg pck( iEtelCallInfo );
  1014     RMobileCall::TMobileCallInfoV7Pckg pck( iEtelCallInfo );
  1015     err = iCall.GetMobileCallInfo( pck );
  1015     err = GetMobileCallInfo( pck );
  1016     if (err == KErrNone )
  1016     if (err == KErrNone )
  1017         {
  1017         {
  1018         ret = iEtelCallInfo.iForwarded;
  1018         ret = iEtelCallInfo.iForwarded;
  1019         }
  1019         }
  1020     
  1020     
  1229                   MCSPCommonInfo& aCommonInfo,
  1229                   MCSPCommonInfo& aCommonInfo,
  1230                   TBool aIsEmergencyCall ) : 
  1230                   TBool aIsEmergencyCall ) : 
  1231                     iLine( aLine ),
  1231                     iLine( aLine ),
  1232                     iMobileOriginated( aMobileOriginated ),
  1232                     iMobileOriginated( aMobileOriginated ),
  1233                     iName( aName ), 
  1233                     iName( aName ), 
       
  1234                     iParams( NULL ),
       
  1235                     iCallState( MCCPCallObserver::ECCPStateIdle ),
       
  1236                     iCapsFlags( 0 ),
       
  1237                     iCallStatusMonitor( NULL ),
       
  1238                     iCallEventMonitor( NULL ),
       
  1239                     iCallInfoMonitor( NULL ),
       
  1240                     iRequester( NULL ),
       
  1241                     iDialCompletionCode( KErrNone ),
  1234                     iCommonInfo( aCommonInfo ),
  1242                     iCommonInfo( aCommonInfo ),
  1235                     iTerminationErrorNotified( EFalse ),
  1243                     iTerminationErrorNotified( EFalse ),
  1236                     iIsEmergencyCall( aIsEmergencyCall),
  1244                     iIsEmergencyCall( aIsEmergencyCall),
  1237                     iFdnCheck(ETrue),
  1245                     iTransferProvider( NULL ),
  1238                     iAudioStatus( ECSPCallAudioStatusInactive ) 
  1246                     iForwardProvider( NULL ),
  1239                     
  1247                     iAudioHandler( NULL ),
       
  1248                     iFdnCheck( ETrue ),
       
  1249                     iCallCapsMonitor( NULL ),
       
  1250                     iUUIMonitor( NULL ),
       
  1251                     iUUIMessageSender( NULL ),
       
  1252                     iSkypeId( NULL ),
       
  1253                     iAudioStatus( ECSPCallAudioStatusInactive ),
       
  1254                     iDontReportTerm( EFalse ),
       
  1255                     iUserToUserInformation( NULL )
  1240     {
  1256     {
  1241     CSPLOGSTRING(CSPOBJECT, "CSPCall::CSPCall");
  1257     CSPLOGSTRING(CSPOBJECT, "CSPCall::CSPCall");
  1242     }
  1258     }
  1243 
  1259 
  1244 // ---------------------------------------------------------------------------
  1260 // ---------------------------------------------------------------------------
  1299 // ---------------------------------------------------------------------------
  1315 // ---------------------------------------------------------------------------
  1300 //    
  1316 //    
  1301 void CSPCall::UpdateCallInfo()
  1317 void CSPCall::UpdateCallInfo()
  1302     {
  1318     {
  1303     CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallInfo <");
  1319     CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallInfo <");
  1304     RMobileCall::TMobileCallInfoV7 callInfo;
  1320     RMobileCall::TMobileCallInfoV7Pckg pck( iEtelCallInfo );
  1305     RMobileCall::TMobileCallInfoV7Pckg pck( callInfo );
  1321     TInt err = GetMobileCallInfo( pck );
  1306     TInt err = iCall.GetMobileCallInfo( pck );
  1322     UpdateCallInfoImpl( iEtelCallInfo );
  1307     
       
  1308     UpdateCallInfoImpl( callInfo );
       
  1309 
  1323 
  1310     CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallInfo >");
  1324     CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallInfo >");
  1311     }
  1325     }
  1312 
  1326 
  1313 // ---------------------------------------------------------------------------
  1327 // ---------------------------------------------------------------------------
  1314 // CSPCall::UpdateCallInfoImpl
  1328 // CSPCall::UpdateCallInfoImpl
  1315 // Implementation for UpdateCallInfo().
  1329 // Implementation for UpdateCallInfo().
  1316 // ---------------------------------------------------------------------------
  1330 // ---------------------------------------------------------------------------
  1317 //    
  1331 //    
  1318 void CSPCall::UpdateCallInfoImpl( RMobileCall::TMobileCallInfoV7 aCallInfo )
  1332 void CSPCall::UpdateCallInfoImpl( const RMobileCall::TMobileCallInfoV7& aCallInfo )
  1319     {
  1333     {
  1320     CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallInfoImpl <");
  1334     CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallInfoImpl <");
  1321 
  1335 
  1322     if ( iMobileOriginated )
  1336     if ( iMobileOriginated )
  1323         {
  1337         {
  1337 // ---------------------------------------------------------------------------
  1351 // ---------------------------------------------------------------------------
  1338 // CSPCall::UpdateCallOrigin
  1352 // CSPCall::UpdateCallOrigin
  1339 // Set call origin to CCCECallParameters.
  1353 // Set call origin to CCCECallParameters.
  1340 // ---------------------------------------------------------------------------
  1354 // ---------------------------------------------------------------------------
  1341 //    
  1355 //    
  1342 void CSPCall::UpdateCallOrigin( RMobileCall::TMobileCallInfoV7 aCallInfo )
  1356 void CSPCall::UpdateCallOrigin( const RMobileCall::TMobileCallInfoV7& aCallInfo )
  1343     {
  1357     {
  1344     CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallOrigin <");
  1358     CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallOrigin <");
  1345 
  1359 
  1346     if ( RMobileCall::EOriginatorSIM == aCallInfo.iCallParamOrigin )
  1360     if ( RMobileCall::EOriginatorSIM == aCallInfo.iCallParamOrigin )
  1347         {
  1361         {
  1387     // If COLP number is different from original dialled number
  1401     // If COLP number is different from original dialled number
  1388     // it is available in connected state of a MO call.
  1402     // it is available in connected state of a MO call.
  1389     // TSY does not send notification so number must be fetched.
  1403     // TSY does not send notification so number must be fetched.
  1390     if ( IsMobileOriginated() )
  1404     if ( IsMobileOriginated() )
  1391         {
  1405         {
  1392         RMobileCall::TMobileCallInfoV3Pckg callInfoPckg( iEtelCallInfo );
  1406         RMobileCall::TMobileCallInfoV7Pckg callInfoPckg( iEtelCallInfo );
  1393         GetMobileCallInfo( callInfoPckg );
  1407         GetMobileCallInfo( callInfoPckg );
  1394         if ( iEtelCallInfo.iRemoteParty.iRemoteNumber.iTelNumber.Length() )
  1408         if ( iEtelCallInfo.iRemoteParty.iRemoteNumber.iTelNumber.Length() )
  1395             {
  1409             {
  1396             NotifyRemotePartyInfoChanged( KNullDesC(),
  1410             NotifyRemotePartyInfoChanged( KNullDesC(),
  1397                 iEtelCallInfo.iRemoteParty.iRemoteNumber.iTelNumber);        
  1411                 iEtelCallInfo.iRemoteParty.iRemoteNumber.iTelNumber);        
  1760 TInt CSPCall::ExitCodeError() const
  1774 TInt CSPCall::ExitCodeError() const
  1761     {
  1775     {
  1762     CSPLOGSTRING2(CSPINT, "CSPCall::ExitCodeError < this: %x", 
  1776     CSPLOGSTRING2(CSPINT, "CSPCall::ExitCodeError < this: %x", 
  1763                     this );
  1777                     this );
  1764     TInt callError;
  1778     TInt callError;
  1765     RMobileCall::TMobileCallInfoV3Pckg pck( iEtelCallInfo );
  1779     RMobileCall::TMobileCallInfoV7Pckg pck( iEtelCallInfo );
  1766     TInt getErr = iCall.GetMobileCallInfo( pck );
  1780     TInt getErr = GetMobileCallInfo( pck );
  1767     // Is there value in higher 16 bits
  1781     // Is there value in higher 16 bits
  1768     if ( KErrNone == getErr && (iEtelCallInfo.iExitCode & 0xFFFF0000) ) 
  1782     if ( KErrNone == getErr && (iEtelCallInfo.iExitCode & 0xFFFF0000) ) 
  1769         {
  1783         {
  1770         CSPLOGSTRING2(CSPINT, "CSPCall::ExitCodeError callInfo.iExitCode %d", 
  1784         CSPLOGSTRING2(CSPINT, "CSPCall::ExitCodeError callInfo.iExitCode %d", 
  1771             iEtelCallInfo.iExitCode );
  1785             iEtelCallInfo.iExitCode );
  1805 
  1819 
  1806 // ---------------------------------------------------------------------------
  1820 // ---------------------------------------------------------------------------
  1807 // CSPCall::UUSMessageReceived
  1821 // CSPCall::UUSMessageReceived
  1808 // ---------------------------------------------------------------------------
  1822 // ---------------------------------------------------------------------------
  1809 //
  1823 //
  1810  void CSPCall::UUSMessageReceived( TDesC& aMessage )
  1824  void CSPCall::UUSMessageReceived( const TDesC& aMessage )
  1811     {      
  1825     {      
  1812     CSPLOGSTRING(CSPREQIN, "CSPCall::UUSMessageReceived");
  1826     CSPLOGSTRING(CSPREQIN, "CSPCall::UUSMessageReceived");
  1813     TCSPSkypeIdParser parser;
  1827     TCSPSkypeIdParser parser;
  1814            
  1828            
  1815     TPtr ptr = iSkypeId->Des();
  1829     TPtr ptr = iSkypeId->Des();
  1859 // CSPCall::UpdateCallNameNumberInfo
  1873 // CSPCall::UpdateCallNameNumberInfo
  1860 // Update call info including remote party name and number data  
  1874 // Update call info including remote party name and number data  
  1861 // ---------------------------------------------------------------------------
  1875 // ---------------------------------------------------------------------------
  1862 //    
  1876 //    
  1863 void CSPCall::UpdateCallNameNumberInfo(
  1877 void CSPCall::UpdateCallNameNumberInfo(
  1864         RMobileCall::TMobileCallInfoV3& aCallInfo, 
  1878         const RMobileCall::TMobileCallInfoV3& aCallInfo, 
  1865         TBool aCallAddedByMonitor )
  1879         TBool aCallAddedByMonitor )
  1866     {
  1880     {
  1867     CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallNameNumberInfo <");
  1881     CSPLOGSTRING(CSPINT, "CSPCall::UpdateCallNameNumberInfo <");
  1868 
  1882 
  1869     iCallName.Zero();
  1883     iCallName.Zero();