Open Source Telephony
 help / color / mirror / Atom feed
* [PATCH 0/5] Introduce call management buttons
@ 2011-05-11 11:46 Nicolas Bertrand
  2011-05-11 11:46 ` [PATCH 1/5] controlbase: Add call state " Nicolas Bertrand
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: Nicolas Bertrand @ 2011-05-11 11:46 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 755 bytes --]

This patch add support of call state management.
Buttons Alerting and Active permit to change the state of on-going call.

Nicolas Bertrand (5):
  controlbase: Add call state management buttons
  hardwaremanipulator: Call state changed signals
  callmanager: Change call state management slots
  control: handle call management buttons
  phonesim: connect call mangagement signals

 src/callmanager.cpp       |    7 +++++++
 src/callmanager.h         |   12 ++++++------
 src/control.cpp           |   12 ++++++++++++
 src/control.h             |    2 ++
 src/controlbase.ui        |   18 ++++++++++++++++++
 src/hardwaremanipulator.h |    2 ++
 src/phonesim.cpp          |    4 ++++
 7 files changed, 51 insertions(+), 6 deletions(-)


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH 1/5] controlbase: Add call state management buttons
  2011-05-11 11:46 [PATCH 0/5] Introduce call management buttons Nicolas Bertrand
@ 2011-05-11 11:46 ` Nicolas Bertrand
  2011-05-11 11:46 ` [PATCH 2/5] hardwaremanipulator: Call state changed signals Nicolas Bertrand
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Nicolas Bertrand @ 2011-05-11 11:46 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1063 bytes --]

---
 src/controlbase.ui |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/src/controlbase.ui b/src/controlbase.ui
index dd60cda..45b60f9 100644
--- a/src/controlbase.ui
+++ b/src/controlbase.ui
@@ -1395,6 +1395,24 @@ p, li { white-space: pre-wrap; }
         </widget>
        </item>
        <item>
+        <layout class="QHBoxLayout" name="horizontalLayout_4">
+         <item>
+          <widget class="QPushButton" name="pbAlerting">
+           <property name="text">
+            <string>Alerting</string>
+           </property>
+          </widget>
+         </item>
+         <item>
+          <widget class="QPushButton" name="pbActive">
+           <property name="text">
+            <string>Active</string>
+           </property>
+          </widget>
+         </item>
+        </layout>
+       </item>
+       <item>
         <layout class="QHBoxLayout" name="horizontalLayout_3">
          <item>
           <widget class="QGroupBox" name="gbIncomingCall">
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 2/5] hardwaremanipulator: Call state changed signals
  2011-05-11 11:46 [PATCH 0/5] Introduce call management buttons Nicolas Bertrand
  2011-05-11 11:46 ` [PATCH 1/5] controlbase: Add call state " Nicolas Bertrand
@ 2011-05-11 11:46 ` Nicolas Bertrand
  2011-05-11 11:46 ` [PATCH 3/5] callmanager: Change call state management slots Nicolas Bertrand
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Nicolas Bertrand @ 2011-05-11 11:46 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 748 bytes --]

---
 src/hardwaremanipulator.h |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/src/hardwaremanipulator.h b/src/hardwaremanipulator.h
index ae8e716..9a82ca0 100644
--- a/src/hardwaremanipulator.h
+++ b/src/hardwaremanipulator.h
@@ -58,6 +58,8 @@ signals:
     void variableChanged(const QString &n, const QString &v);
     void switchTo(const QString &cmd);
     void startIncomingCall(const QString &number, const QString &called_number, const QString &name);
+    void stateChangedToAlerting();
+    void stateChangedToConnected();
 
 protected:
     virtual QString constructCBMessage(const QString &messageCode, int geographicalScope, const QString &updateNumber, const QString &channel,
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 3/5] callmanager: Change call state management slots
  2011-05-11 11:46 [PATCH 0/5] Introduce call management buttons Nicolas Bertrand
  2011-05-11 11:46 ` [PATCH 1/5] controlbase: Add call state " Nicolas Bertrand
  2011-05-11 11:46 ` [PATCH 2/5] hardwaremanipulator: Call state changed signals Nicolas Bertrand
@ 2011-05-11 11:46 ` Nicolas Bertrand
  2011-05-11 11:46 ` [PATCH 4/5] control: handle call management buttons Nicolas Bertrand
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: Nicolas Bertrand @ 2011-05-11 11:46 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1962 bytes --]

---
 src/callmanager.cpp |    7 +++++++
 src/callmanager.h   |   12 ++++++------
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/src/callmanager.cpp b/src/callmanager.cpp
index 0ede2ad..8085056 100644
--- a/src/callmanager.cpp
+++ b/src/callmanager.cpp
@@ -700,6 +700,10 @@ bool CallManager::chld4()
 
 void CallManager::dialingToConnected()
 {
+    // Stop timers in case they are still active
+    alertingTimer->stop();
+    connectTimer->stop();
+
     // Find the currently dialing or alerting call.
     int index = indexForId( idForState( CallState_Dialing ) );
     if ( index < 0 )
@@ -726,6 +730,9 @@ void CallManager::dialingToConnected()
 
 void CallManager::dialingToAlerting()
 {
+    // Stop the timer in case it is still active
+    alertingTimer->stop();
+
     // Find the currently dialing or alerting call.
     int index = indexForId( idForState( CallState_Dialing ) );
     if ( index < 0 )
diff --git a/src/callmanager.h b/src/callmanager.h
index 228e26c..c953a7d 100644
--- a/src/callmanager.h
+++ b/src/callmanager.h
@@ -100,6 +100,12 @@ public slots:
     void startIncomingCall( const QString& number, const QString& calledNumber,
                                 const QString& name );
 
+    // Transition the active dialing or alerting call to connected.
+    void dialingToConnected();
+
+    // Transition the active dialing call to alerting.
+    void dialingToAlerting();
+
 signals:
     // Send a response to a command.
     void send( const QString& line );
@@ -118,12 +124,6 @@ signals:
     void callStatesChanged( QList<CallInfo> *list );
 
 private slots:
-    // Transition the active dialing or alerting call to connected.
-    void dialingToConnected();
-
-    // Transition the active dialing call to alerting.
-    void dialingToAlerting();
-
     // Transition the waiting call to incoming.
     void waitingToIncoming();
 
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 4/5] control: handle call management buttons
  2011-05-11 11:46 [PATCH 0/5] Introduce call management buttons Nicolas Bertrand
                   ` (2 preceding siblings ...)
  2011-05-11 11:46 ` [PATCH 3/5] callmanager: Change call state management slots Nicolas Bertrand
@ 2011-05-11 11:46 ` Nicolas Bertrand
  2011-05-11 11:46 ` [PATCH 5/5] phonesim: connect call mangagement signals Nicolas Bertrand
  2011-05-11 19:04 ` [PATCH 0/5] Introduce call management buttons Denis Kenzior
  5 siblings, 0 replies; 7+ messages in thread
From: Nicolas Bertrand @ 2011-05-11 11:46 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1635 bytes --]

---
 src/control.cpp |   12 ++++++++++++
 src/control.h   |    2 ++
 2 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/src/control.cpp b/src/control.cpp
index de141c3..4fdba27 100644
--- a/src/control.cpp
+++ b/src/control.cpp
@@ -88,6 +88,8 @@ ControlWidget::ControlWidget(const QString &ruleFile, Control *parent)
     connect(ui->pbSendGNSSData, SIGNAL(clicked()), this, SLOT(sendGNSSData()));
     connect(ui->pbGNSSDefault, SIGNAL(clicked()), this, SLOT(setDefaultGNSSData()));
     connect(ui->pbSendNotif, SIGNAL(clicked()), this, SLOT(sendCSSN()));
+    connect(ui->pbAlerting, SIGNAL(clicked()), this, SLOT(setStateAlerting()));
+    connect(ui->pbActive, SIGNAL(clicked()), this, SLOT(setStateConnected()));
 
     QStringList headers;
     headers << "Sender" << "Priority" << "Notification Status";
@@ -168,6 +170,16 @@ void Control::callManagement( QList<CallInfo> *list )
     widget->setCssuEnabled( enableCSSU );
 }
 
+void ControlWidget::setStateConnected()
+{
+    emit p->stateChangedToConnected();
+}
+
+void ControlWidget::setStateAlerting()
+{
+    emit p->stateChangedToAlerting();
+}
+
 void ControlWidget::setCssiEnabled( bool enableCSSI )
 {
     ui->cbCSSI->setEnabled( enableCSSI );
diff --git a/src/control.h b/src/control.h
index ac39eb3..1d8f06f 100644
--- a/src/control.h
+++ b/src/control.h
@@ -104,6 +104,8 @@ private slots:
     void sendGNSSData();
     void setDefaultGNSSData();
     void sendCSSN();
+    void setStateAlerting();
+    void setStateConnected();
 
 signals:
     void unsolicitedCommand(const QString &);
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* [PATCH 5/5] phonesim: connect call mangagement signals
  2011-05-11 11:46 [PATCH 0/5] Introduce call management buttons Nicolas Bertrand
                   ` (3 preceding siblings ...)
  2011-05-11 11:46 ` [PATCH 4/5] control: handle call management buttons Nicolas Bertrand
@ 2011-05-11 11:46 ` Nicolas Bertrand
  2011-05-11 19:04 ` [PATCH 0/5] Introduce call management buttons Denis Kenzior
  5 siblings, 0 replies; 7+ messages in thread
From: Nicolas Bertrand @ 2011-05-11 11:46 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 889 bytes --]

---
 src/phonesim.cpp |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/src/phonesim.cpp b/src/phonesim.cpp
index 6b45cf6..d3bd049 100644
--- a/src/phonesim.cpp
+++ b/src/phonesim.cpp
@@ -530,6 +530,10 @@ SimRules::SimRules( int fd, QObject *p,  const QString& filename, HardwareManipu
                  _callManager, SLOT(startIncomingCall(QString,QString,QString)) );
         connect ( _callManager, SIGNAL( callStatesChanged( QList<CallInfo> * ) ),
                   machine, SLOT( callManagement( QList<CallInfo> * ) ) );
+        connect ( machine, SIGNAL( stateChangedToAlerting() ), _callManager,
+                SLOT( dialingToAlerting() ) );
+        connect ( machine, SIGNAL( stateChangedToConnected() ), _callManager,
+                SLOT( dialingToConnected() ) );
     }
 
     connect(this,SIGNAL(readyRead()),
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH 0/5] Introduce call management buttons
  2011-05-11 11:46 [PATCH 0/5] Introduce call management buttons Nicolas Bertrand
                   ` (4 preceding siblings ...)
  2011-05-11 11:46 ` [PATCH 5/5] phonesim: connect call mangagement signals Nicolas Bertrand
@ 2011-05-11 19:04 ` Denis Kenzior
  5 siblings, 0 replies; 7+ messages in thread
From: Denis Kenzior @ 2011-05-11 19:04 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1019 bytes --]

Hi Nicolas,

On 05/11/2011 06:46 AM, Nicolas Bertrand wrote:
> This patch add support of call state management.
> Buttons Alerting and Active permit to change the state of on-going call.
> 
> Nicolas Bertrand (5):
>   controlbase: Add call state management buttons
>   hardwaremanipulator: Call state changed signals
>   callmanager: Change call state management slots
>   control: handle call management buttons
>   phonesim: connect call mangagement signals
> 
>  src/callmanager.cpp       |    7 +++++++
>  src/callmanager.h         |   12 ++++++------
>  src/control.cpp           |   12 ++++++++++++
>  src/control.h             |    2 ++
>  src/controlbase.ui        |   18 ++++++++++++++++++
>  src/hardwaremanipulator.h |    2 ++
>  src/phonesim.cpp          |    4 ++++
>  7 files changed, 51 insertions(+), 6 deletions(-)
> 

I applied all patches in this series, however calls still proceed to
Alerting / Active state automagically.  Are there plans to fix that?

Regards,
-Denis

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2011-05-11 19:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-11 11:46 [PATCH 0/5] Introduce call management buttons Nicolas Bertrand
2011-05-11 11:46 ` [PATCH 1/5] controlbase: Add call state " Nicolas Bertrand
2011-05-11 11:46 ` [PATCH 2/5] hardwaremanipulator: Call state changed signals Nicolas Bertrand
2011-05-11 11:46 ` [PATCH 3/5] callmanager: Change call state management slots Nicolas Bertrand
2011-05-11 11:46 ` [PATCH 4/5] control: handle call management buttons Nicolas Bertrand
2011-05-11 11:46 ` [PATCH 5/5] phonesim: connect call mangagement signals Nicolas Bertrand
2011-05-11 19:04 ` [PATCH 0/5] Introduce call management buttons Denis Kenzior

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox