---
 src/callmanager.cpp |   23 +++++++++++++++++++++++
 src/callmanager.h   |    3 +++
 2 files changed, 26 insertions(+), 0 deletions(-)

diff --git a/src/callmanager.cpp b/src/callmanager.cpp
index fb132b5..a9fe171 100644
--- a/src/callmanager.cpp
+++ b/src/callmanager.cpp
@@ -445,6 +445,29 @@ void CallManager::hangupCall( int id )
     chld1x( id );
 }
 
+void CallManager::hangupRemote( int id )
+{
+    int index = indexForId( id );
+    if ( index >= 0 )
+    {
+        if ( callList[index].state == CallState_Dialing ||
+                callList[index].state == CallState_Alerting )
+        {
+            hangupTimer->stop();
+        }
+        callList[index].state = CallState_Hangup;
+        sendState( callList[index] );
+
+        callList.removeAt( index );
+
+        if ( !hasCall( CallState_Active ) && !hasCall( CallState_Held ) )
+            waitingToIncoming();
+
+        send ( "NO CARRIER" );
+        emit callStatesChanged( &callList );
+    }
+}
+
 bool CallManager::acceptCall()
 {
     int id = idForIncoming();
diff --git a/src/callmanager.h b/src/callmanager.h
index ff3ac30..c34e7fd 100644
--- a/src/callmanager.h
+++ b/src/callmanager.h
@@ -106,6 +106,9 @@ public slots:
     // Transition the active dialing call to alerting.
     void dialingToAlerting();
 
+    // Simulate a remote hangup.
+    void hangupRemote( int id );
+
 signals:
     // Send a response to a command.
     void send( const QString& line );
-- 
1.7.1

_______________________________________________
ofono mailing list
ofono@ofono.org
http://lists.ofono.org/listinfo/ofono

Reply via email to