~ubuntu-branches/ubuntu/natty/ofono-phonesim/natty

« back to all changes in this revision

Viewing changes to src/callmanager.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonny Lamb
  • Date: 2010-11-30 10:01:36 UTC
  • mfrom: (1.1.2 upstream) (3.1.1 sid)
  • Revision ID: james.westby@ubuntu.com-20101130100136-13ieyajrl73z367p
Tags: 1.9-1
* New upstream release.
* debian/: Add files relating to building with git.
* debian/control: Adopt package from Andres. Thanks for your work!
* debian/rules: Port to cdbs to be like the rest of the pkg-telepathy
  packages.
* debian/source/format: Use 3.0 (quilt).
* debian/dirs: Removed.
* debian/docs: Removed.
* debian/copyright: Updated author list.

Show diffs side-by-side

added added

removed removed

Lines of Context:
643
643
    // Transition the call to its new state.
644
644
    callList[index].state = CallState_Active;
645
645
    sendState( callList[index] );
 
646
    // If the dialed number starts with 05123, disconnect the
 
647
    // call after xx seconds, where xx is part of the dial string
 
648
    // as 05123xx
 
649
    if( callList[index].number.startsWith( "05123" ) ) {
 
650
        bool ok;
 
651
        QString temp = callList[index].number;
 
652
        temp = temp.replace( "05123" , "" );
 
653
        int timeout = temp.toInt( &ok, 10 );
 
654
        timeout = ok ? timeout * 1000 : 10000;
 
655
        QTimer::singleShot( timeout, this, SLOT(hangup()) );
 
656
    }
646
657
}
647
658
 
648
659
void CallManager::dialingToAlerting()
686
697
    }
687
698
}
688
699
 
 
700
void CallManager::hangup()
 
701
{
 
702
    send ( "NO CARRIER" );
 
703
    hangupConnected();
 
704
}
 
705
 
689
706
void CallManager::sendNextRing()
690
707
{
691
708
    if ( idForIncoming() >= 0 ) {