All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/6] phonesim: Add call status UI
@ 2011-05-02  9:17 Nicolas Bertrand
  2011-05-02  9:17 ` [PATCH v2 1/6] callmanager: Add signal on call status change Nicolas Bertrand
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Nicolas Bertrand @ 2011-05-02  9:17 UTC (permalink / raw)
  To: ofono

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

This  patch introduce a new tab "call" in phonesim UI in order to display calls
informationsi (id, number, status, name and direction).
The interface to send CSSU and CSSI notification is now dynamic based on the
type of current calls.
Fix some coding-style violations.

Nicolas Bertrand (6):
  callmanager: Add signal on call status change
  control: Update UI using call status
  hardwaremanipulator: add callmanagement method
  phonesim: Connect call status signal
  controlbase.ui: Add call mangement tab
  control: Update call view

 src/callmanager.cpp         |   22 +++++++
 src/callmanager.h           |    3 +
 src/control.cpp             |  140 ++++++++++++++++++++++++++++++++++++++-----
 src/control.h               |    6 ++
 src/controlbase.ui          |   61 +++++++++++++++++++
 src/hardwaremanipulator.cpp |    4 +
 src/hardwaremanipulator.h   |    2 +
 src/phonesim.cpp            |    2 +
 8 files changed, 224 insertions(+), 16 deletions(-)


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

* [PATCH v2 1/6] callmanager: Add signal on call status change
  2011-05-02  9:17 [PATCH v2 0/6] phonesim: Add call status UI Nicolas Bertrand
@ 2011-05-02  9:17 ` Nicolas Bertrand
  2011-05-02  9:17 ` [PATCH v2 2/6] control: Update UI using call status Nicolas Bertrand
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Nicolas Bertrand @ 2011-05-02  9:17 UTC (permalink / raw)
  To: ofono

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

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

diff --git a/src/callmanager.cpp b/src/callmanager.cpp
index 585a3ac..0ede2ad 100644
--- a/src/callmanager.cpp
+++ b/src/callmanager.cpp
@@ -149,6 +149,8 @@ bool CallManager::command( const QString& cmd )
         info.dialBack = false;
         callList += info;
 
+        emit callStatesChanged( &callList );
+
         // Advertise the call state change and then return to command mode.
         sendState( info );
         send( "OK" );
@@ -176,6 +178,8 @@ bool CallManager::command( const QString& cmd )
                 info.dialBack = false;
                 callList += info;
 
+                emit callStatesChanged( &callList );
+
                 // Advertise the call state change and then return to command mode.
                 sendState( info );
                 send( "CONNECT 19200" );
@@ -369,6 +373,7 @@ void CallManager::startIncomingCall( const QString& number,
     callList += info;
 
     emitRing(info);
+    emit callStatesChanged( &callList );
 
     // Announce the incoming call using Ericsson-style state notifications.
     sendState( info );
@@ -395,6 +400,7 @@ void CallManager::hangupAll()
     connectTimer->stop();
     alertingTimer->stop();
     hangupTimer->stop();
+    emit callStatesChanged( &callList );
 }
 
 void CallManager::hangupConnected()
@@ -412,6 +418,8 @@ void CallManager::hangupConnected()
 
     if ( !hasCall( CallState_Held ) )
         waitingToIncoming();
+
+    emit callStatesChanged( &callList );
 }
 
 void CallManager::hangupHeld()
@@ -429,6 +437,8 @@ void CallManager::hangupHeld()
 
     if ( !hasCall( CallState_Active ) )
         waitingToIncoming();
+
+    emit callStatesChanged( &callList );
 }
 
 void CallManager::hangupConnectedAndHeld()
@@ -445,6 +455,7 @@ void CallManager::hangupConnectedAndHeld()
     }
     callList = newCallList;
     waitingToIncoming();
+    emit callStatesChanged( &callList );
 }
 
 void CallManager::hangupCall( int id )
@@ -466,11 +477,13 @@ bool CallManager::acceptCall()
         changeGroup( CallState_Active, CallState_Held );
         callList[index].state = CallState_Active;
         sendState( callList[index] );
+        emit callStatesChanged( &callList );
         return true;
     } else {
         // Only held calls, or no other calls, so just make the incoming call active.
         callList[index].state = CallState_Active;
         sendState( callList[index] );
+        emit callStatesChanged( &callList );
         return true;
     }
 }
@@ -500,6 +513,7 @@ bool CallManager::chld1()
         int index = indexForId(id);
         callList[index].state = CallState_Active;
         sendState( callList[index] );
+        emit callStatesChanged( &callList );
         return true;
     } else if ( hasCall( CallState_Held ) ) {
         // Hangup the active calls and activate the held ones.
@@ -508,6 +522,7 @@ bool CallManager::chld1()
             if ( callList[index].state == CallState_Held ) {
                 callList[index].state = CallState_Active;
                 sendState( callList[index] );
+                emit callStatesChanged( &callList );
             }
         }
         return true;
@@ -551,6 +566,7 @@ bool CallManager::chld1x( int x )
     if ( !hasCall( CallState_Active ) && !hasCall( CallState_Held ) )
         waitingToIncoming();
 
+    emit callStatesChanged( &callList );
     return found;
 }
 
@@ -570,6 +586,7 @@ bool CallManager::chld2()
         int index = indexForId( id );
         callList[index].state = CallState_Active;
         sendState( callList[index] );
+        emit callStatesChanged( &callList );
         return true;
     } else if ( hasCall( CallState_Active ) && hasCall( CallState_Held ) ) {
         // Swap the active and held calls.
@@ -620,6 +637,7 @@ bool CallManager::chld2x( int x )
             // No active calls, so make just this call active.
             callList[index].state = CallState_Active;
             sendState( callList[index] );
+            emit callStatesChanged( &callList );
         }
         return true;
     } else if ( callList[index].state == CallState_Active ) {
@@ -634,6 +652,7 @@ bool CallManager::chld2x( int x )
                     return false;
                 callList[index2].state = CallState_Held;
                 sendState( callList[index2] );
+                emit callStatesChanged( &callList );
             }
         }
         return true;
@@ -691,6 +710,7 @@ void CallManager::dialingToConnected()
     // Transition the call to its new state.
     callList[index].state = CallState_Active;
     sendState( callList[index] );
+    emit callStatesChanged( &callList );
     // If the dialed number starts with 05123, disconnect the
     // call after xx seconds, where xx is part of the dial string
     // as 05123xx
@@ -714,6 +734,7 @@ void CallManager::dialingToAlerting()
     // Transition the call to its new state.
     callList[index].state = CallState_Alerting;
     sendState( callList[index] );
+    emit callStatesChanged( &callList );
 }
 
 void CallManager::waitingToIncoming()
@@ -856,6 +877,7 @@ void CallManager::changeGroup( CallState oldState, CallState newState )
             sendState( callList[index] );
         }
     }
+    emit callStatesChanged( &callList );
 }
 
 void CallManager::sendState( const CallInfo& info )
diff --git a/src/callmanager.h b/src/callmanager.h
index 5876c87..228e26c 100644
--- a/src/callmanager.h
+++ b/src/callmanager.h
@@ -114,6 +114,9 @@ signals:
     // Send a call control event.
     void controlEvent( const QSimControlEvent& event );
 
+    // Send calls list on status change
+    void callStatesChanged( QList<CallInfo> *list );
+
 private slots:
     // Transition the active dialing or alerting call to connected.
     void dialingToConnected();
-- 
1.7.1


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

* [PATCH v2 2/6] control: Update UI using call status
  2011-05-02  9:17 [PATCH v2 0/6] phonesim: Add call status UI Nicolas Bertrand
  2011-05-02  9:17 ` [PATCH v2 1/6] callmanager: Add signal on call status change Nicolas Bertrand
@ 2011-05-02  9:17 ` Nicolas Bertrand
  2011-05-02  9:17 ` [PATCH v2 3/6] hardwaremanipulator: add callmanagement method Nicolas Bertrand
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Nicolas Bertrand @ 2011-05-02  9:17 UTC (permalink / raw)
  To: ofono

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

---
 src/control.cpp |   40 +++++++++++++++++++++++++++++++++++-----
 src/control.h   |    5 +++++
 2 files changed, 40 insertions(+), 5 deletions(-)

diff --git a/src/control.cpp b/src/control.cpp
index 645219c..1e71593 100644
--- a/src/control.cpp
+++ b/src/control.cpp
@@ -134,6 +134,32 @@ Control::~Control()
     delete widget;
 }
 
+void Control::callManagement( QList<CallInfo> *list )
+{
+    bool enableCSSU = false;
+    bool enableCSSI = false;
+
+    foreach( CallInfo i, *list ) {
+        if ( i.incoming && !enableCSSU )
+            enableCSSU = true;
+        if ( !i.incoming && !enableCSSI )
+            enableCSSI = true;
+    }
+
+    widget->setCssiEnabled( enableCSSI );
+    widget->setCssuEnabled( enableCSSU );
+}
+
+void ControlWidget::setCssiEnabled( bool enableCSSI )
+{
+    ui->cbCSSI->setEnabled( enableCSSI );
+}
+
+void ControlWidget::setCssuEnabled( bool enableCSSU )
+{
+    ui->cbCSSU->setEnabled( enableCSSU );
+}
+
 void Control::setPhoneNumber( const QString &number )
 {
     widget->setWindowTitle("Phonesim - Number: " + number);
@@ -146,6 +172,10 @@ void Control::warning( const QString &title, const QString &message )
 
 void ControlWidget::handleCSSNNotif()
 {
+
+    ui->cbCSSU->setEnabled( false );
+    ui->cbCSSI->setEnabled( false );
+
     ui->cbCSSU->insertItem(0, "");
     ui->cbCSSU->insertItem(1, "0 - forwarded", 0);
     ui->cbCSSU->insertItem(3, "2 - on hold", 2);
@@ -160,15 +190,15 @@ void ControlWidget::handleCSSNNotif()
 
 void ControlWidget::sendCSSN()
 {
-    QVariant v = ui->cbCSSU->itemData(ui->cbCSSU->currentIndex());
+    QVariant v = ui->cbCSSU->itemData( ui->cbCSSU->currentIndex() );
 
-    if (v.canConvert<int>())
-        emit unsolicitedCommand("+CSSU: "+QString::number(v.toInt()));
+    if ( v.canConvert<int>() && ui->cbCSSU->isEnabled() )
+        emit unsolicitedCommand( "+CSSU: "+QString::number( v.toInt() ) );
 
     v = ui->cbCSSI->itemData(ui->cbCSSI->currentIndex());
 
-    if (v.canConvert<int>())
-        emit unsolicitedCommand("+CSSI: "+QString::number(v.toInt()));
+    if ( v.canConvert<int>() && ui->cbCSSI->isEnabled() )
+        emit unsolicitedCommand( "+CSSI: "+QString::number( v.toInt() ) );
 }
 
 void ControlWidget::sendSQ()
diff --git a/src/control.h b/src/control.h
index c17146a..3acffc9 100644
--- a/src/control.h
+++ b/src/control.h
@@ -25,6 +25,7 @@
 #include <QtScript>
 #include "ui_controlbase.h"
 #include "attranslator.h"
+#include "callmanager.h"
 
 class Control;
 
@@ -71,6 +72,9 @@ public:
     void handleToData( const QString& );
     void handleNewApp();
     void handleCSSNNotif();
+    void setCssuEnabled( bool enableCSSU );
+    void setCssiEnabled( bool enableCSSI );
+
 
 private slots:
     void sendSQ();
@@ -146,6 +150,7 @@ public slots:
     void handleToData( const QString& );
     void setPhoneNumber( const QString& );
     void handleNewApp();
+    void callManagement( QList<CallInfo> *info );
 
 protected:
     virtual void warning( const QString&, const QString& );
-- 
1.7.1


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

* [PATCH v2 3/6] hardwaremanipulator: add callmanagement method
  2011-05-02  9:17 [PATCH v2 0/6] phonesim: Add call status UI Nicolas Bertrand
  2011-05-02  9:17 ` [PATCH v2 1/6] callmanager: Add signal on call status change Nicolas Bertrand
  2011-05-02  9:17 ` [PATCH v2 2/6] control: Update UI using call status Nicolas Bertrand
@ 2011-05-02  9:17 ` Nicolas Bertrand
  2011-05-02  9:17 ` [PATCH v2 4/6] phonesim: Connect call status signal Nicolas Bertrand
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Nicolas Bertrand @ 2011-05-02  9:17 UTC (permalink / raw)
  To: ofono

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

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

diff --git a/src/hardwaremanipulator.cpp b/src/hardwaremanipulator.cpp
index c7bbe6a..909ce2a 100644
--- a/src/hardwaremanipulator.cpp
+++ b/src/hardwaremanipulator.cpp
@@ -337,3 +337,7 @@ void HardwareManipulator::simAppAbort()
     if (app)
         return app->abort();
 }
+
+void HardwareManipulator::callManagement( QList<CallInfo> *info )
+{
+}
diff --git a/src/hardwaremanipulator.h b/src/hardwaremanipulator.h
index df8f65e..ae8e716 100644
--- a/src/hardwaremanipulator.h
+++ b/src/hardwaremanipulator.h
@@ -27,6 +27,7 @@
 class QSMSMessage;
 class QVMMessage;
 class SimRules;
+struct CallInfo;
 class HardwareManipulator : public QObject
 {
 Q_OBJECT
@@ -49,6 +50,7 @@ public slots:
     virtual void simAppStart( int appIndex );
     virtual void simAppAbort();
     virtual void handleNewApp();
+    virtual void callManagement( QList<CallInfo> *info );
 
 signals:
     void unsolicitedCommand(const QString &cmd);
-- 
1.7.1


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

* [PATCH v2 4/6] phonesim: Connect call status signal
  2011-05-02  9:17 [PATCH v2 0/6] phonesim: Add call status UI Nicolas Bertrand
                   ` (2 preceding siblings ...)
  2011-05-02  9:17 ` [PATCH v2 3/6] hardwaremanipulator: add callmanagement method Nicolas Bertrand
@ 2011-05-02  9:17 ` Nicolas Bertrand
  2011-05-02  9:17 ` [PATCH v2 5/6] controlbase.ui: Add call mangement tab Nicolas Bertrand
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Nicolas Bertrand @ 2011-05-02  9:17 UTC (permalink / raw)
  To: ofono

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

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

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


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

* [PATCH v2 5/6] controlbase.ui: Add call mangement tab
  2011-05-02  9:17 [PATCH v2 0/6] phonesim: Add call status UI Nicolas Bertrand
                   ` (3 preceding siblings ...)
  2011-05-02  9:17 ` [PATCH v2 4/6] phonesim: Connect call status signal Nicolas Bertrand
@ 2011-05-02  9:17 ` Nicolas Bertrand
  2011-05-02  9:17 ` [PATCH v2 6/6] control: Update call view Nicolas Bertrand
  2011-05-02  9:23 ` [PATCH v2 0/6] phonesim: Add call status UI Denis Kenzior
  6 siblings, 0 replies; 8+ messages in thread
From: Nicolas Bertrand @ 2011-05-02  9:17 UTC (permalink / raw)
  To: ofono

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

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

diff --git a/src/controlbase.ui b/src/controlbase.ui
index cfadfe8..41c6d12 100644
--- a/src/controlbase.ui
+++ b/src/controlbase.ui
@@ -1458,6 +1458,67 @@ p, li { white-space: pre-wrap; }
        </property>
       </widget>
      </widget>
+     <widget class="QWidget" name="tab_9">
+      <attribute name="title">
+       <string>Call</string>
+      </attribute>
+      <layout class="QVBoxLayout" name="verticalLayout_3">
+       <item>
+        <widget class="QTableWidget" name="twCallMgt">
+         <property name="columnCount">
+          <number>5</number>
+         </property>
+         <attribute name="horizontalHeaderMinimumSectionSize">
+          <number>50</number>
+         </attribute>
+         <attribute name="horizontalHeaderShowSortIndicator" stdset="0">
+          <bool>true</bool>
+         </attribute>
+         <attribute name="verticalHeaderDefaultSectionSize">
+          <number>50</number>
+         </attribute>
+         <column>
+          <property name="text">
+           <string>id</string>
+          </property>
+         </column>
+         <column>
+          <property name="text">
+           <string>number</string>
+          </property>
+         </column>
+         <column>
+          <property name="text">
+           <string>state</string>
+          </property>
+         </column>
+         <column>
+          <property name="text">
+           <string>name</string>
+          </property>
+         </column>
+         <column>
+          <property name="text">
+           <string>type</string>
+          </property>
+         </column>
+        </widget>
+       </item>
+       <item>
+        <spacer name="verticalSpacer">
+         <property name="orientation">
+          <enum>Qt::Vertical</enum>
+         </property>
+         <property name="sizeHint" stdset="0">
+          <size>
+           <width>20</width>
+           <height>40</height>
+          </size>
+         </property>
+        </spacer>
+       </item>
+      </layout>
+     </widget>
     </widget>
    </item>
    <item>
-- 
1.7.1


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

* [PATCH v2 6/6] control: Update call view
  2011-05-02  9:17 [PATCH v2 0/6] phonesim: Add call status UI Nicolas Bertrand
                   ` (4 preceding siblings ...)
  2011-05-02  9:17 ` [PATCH v2 5/6] controlbase.ui: Add call mangement tab Nicolas Bertrand
@ 2011-05-02  9:17 ` Nicolas Bertrand
  2011-05-02  9:23 ` [PATCH v2 0/6] phonesim: Add call status UI Denis Kenzior
  6 siblings, 0 replies; 8+ messages in thread
From: Nicolas Bertrand @ 2011-05-02  9:17 UTC (permalink / raw)
  To: ofono

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

---
 src/control.cpp |  100 +++++++++++++++++++++++++++++++++++++++++++++++++------
 src/control.h   |    3 +-
 2 files changed, 91 insertions(+), 12 deletions(-)

diff --git a/src/control.cpp b/src/control.cpp
index 1e71593..a9b2fd5 100644
--- a/src/control.cpp
+++ b/src/control.cpp
@@ -136,14 +136,79 @@ Control::~Control()
 
 void Control::callManagement( QList<CallInfo> *list )
 {
+    int row = 0;
     bool enableCSSU = false;
     bool enableCSSI = false;
 
+    widget->clearCallView();
+
     foreach( CallInfo i, *list ) {
+        QString param[5];
+
         if ( i.incoming && !enableCSSU )
             enableCSSU = true;
         if ( !i.incoming && !enableCSSI )
             enableCSSI = true;
+
+        param[0].setNum( i.id );
+        param[1] = i.number;
+
+        switch( i.state ) {
+
+            case CallState_Active:
+            {
+                param[2] = "Active";
+            }
+            break;
+
+            case CallState_Held:
+            {
+                param[2] = "Held";
+            }
+            break;
+
+            case CallState_Dialing:
+            {
+                param[2] = "Dialing";
+            }
+            break;
+
+            case CallState_Alerting:
+            {
+                param[2] = "Alerting";
+            }
+            break;
+
+            case CallState_Incoming:
+            {
+                param[2] = "Incoming";
+            }
+            break;
+
+            case CallState_Waiting:
+            {
+                param[2] = "Waiting";
+            }
+            break;
+
+            case CallState_Hangup:
+            {
+                param[2] = "Hangup";
+            }
+            break;
+
+            case CallState_SwapDummy:
+            {
+                param[2] = "SwapDummy";
+            }
+            break;
+        }
+
+        param[3] = i.name;
+        param[4] = i.incoming ? "incoming" : "outgoing";
+
+        widget->updateCallView( param, row );
+        row++;
     }
 
     widget->setCssiEnabled( enableCSSI );
@@ -160,6 +225,20 @@ void ControlWidget::setCssuEnabled( bool enableCSSU )
     ui->cbCSSU->setEnabled( enableCSSU );
 }
 
+void ControlWidget::clearCallView()
+{
+    ui->twCallMgt->clearContents();
+}
+
+void ControlWidget::updateCallView( QString callParameters [5], int row )
+{
+    if ( row > ui->twCallMgt->rowCount() - 1 )
+        ui->twCallMgt->insertRow( row );
+
+    for ( int i = 0; i < 5; i++ )
+        ui->twCallMgt->setItem( row, i, new QTableWidgetItem( callParameters[i] ) );
+}
+
 void Control::setPhoneNumber( const QString &number )
 {
     widget->setWindowTitle("Phonesim - Number: " + number);
@@ -172,20 +251,19 @@ void Control::warning( const QString &title, const QString &message )
 
 void ControlWidget::handleCSSNNotif()
 {
-
     ui->cbCSSU->setEnabled( false );
     ui->cbCSSI->setEnabled( false );
 
-    ui->cbCSSU->insertItem(0, "");
-    ui->cbCSSU->insertItem(1, "0 - forwarded", 0);
-    ui->cbCSSU->insertItem(3, "2 - on hold", 2);
-    ui->cbCSSU->insertItem(4, "3 - retrieved", 3);
-    ui->cbCSSU->insertItem(5, "4 - multiparty", 4);
+    ui->cbCSSU->insertItem( 0, "" );
+    ui->cbCSSU->insertItem( 1, "0 - forwarded", 0 );
+    ui->cbCSSU->insertItem( 3, "2 - on hold", 2 );
+    ui->cbCSSU->insertItem( 4, "3 - retrieved", 3 );
+    ui->cbCSSU->insertItem( 5, "4 - multiparty", 4 );
 
-    ui->cbCSSI->insertItem(0, "");
-    ui->cbCSSI->insertItem(3, "2 - forwarded", 2);
-    ui->cbCSSI->insertItem(6, "5 - outgoing barred", 5);
-    ui->cbCSSI->insertItem(7, "6 - incomming barred", 6);
+    ui->cbCSSI->insertItem( 0, "" );
+    ui->cbCSSI->insertItem( 3, "2 - forwarded", 2 );
+    ui->cbCSSI->insertItem( 6, "5 - outgoing barred", 5 );
+    ui->cbCSSI->insertItem( 7, "6 - incomming barred", 6 );
 }
 
 void ControlWidget::sendCSSN()
@@ -195,7 +273,7 @@ void ControlWidget::sendCSSN()
     if ( v.canConvert<int>() && ui->cbCSSU->isEnabled() )
         emit unsolicitedCommand( "+CSSU: "+QString::number( v.toInt() ) );
 
-    v = ui->cbCSSI->itemData(ui->cbCSSI->currentIndex());
+    v = ui->cbCSSI->itemData( ui->cbCSSI->currentIndex() );
 
     if ( v.canConvert<int>() && ui->cbCSSI->isEnabled() )
         emit unsolicitedCommand( "+CSSI: "+QString::number( v.toInt() ) );
diff --git a/src/control.h b/src/control.h
index 3acffc9..ac39eb3 100644
--- a/src/control.h
+++ b/src/control.h
@@ -74,7 +74,8 @@ public:
     void handleCSSNNotif();
     void setCssuEnabled( bool enableCSSU );
     void setCssiEnabled( bool enableCSSI );
-
+    void updateCallView( QString callParameters [5], int row );
+    void clearCallView();
 
 private slots:
     void sendSQ();
-- 
1.7.1


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

* Re: [PATCH v2 0/6] phonesim: Add call status UI
  2011-05-02  9:17 [PATCH v2 0/6] phonesim: Add call status UI Nicolas Bertrand
                   ` (5 preceding siblings ...)
  2011-05-02  9:17 ` [PATCH v2 6/6] control: Update call view Nicolas Bertrand
@ 2011-05-02  9:23 ` Denis Kenzior
  6 siblings, 0 replies; 8+ messages in thread
From: Denis Kenzior @ 2011-05-02  9:23 UTC (permalink / raw)
  To: ofono

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

Hi Nicolas,

On 05/02/2011 04:17 AM, Nicolas Bertrand wrote:
> This  patch introduce a new tab "call" in phonesim UI in order to display calls
> informationsi (id, number, status, name and direction).
> The interface to send CSSU and CSSI notification is now dynamic based on the
> type of current calls.
> Fix some coding-style violations.
> 
> Nicolas Bertrand (6):
>   callmanager: Add signal on call status change
>   control: Update UI using call status
>   hardwaremanipulator: add callmanagement method
>   phonesim: Connect call status signal
>   controlbase.ui: Add call mangement tab
>   control: Update call view
> 
>  src/callmanager.cpp         |   22 +++++++
>  src/callmanager.h           |    3 +
>  src/control.cpp             |  140 ++++++++++++++++++++++++++++++++++++++-----
>  src/control.h               |    6 ++
>  src/controlbase.ui          |   61 +++++++++++++++++++
>  src/hardwaremanipulator.cpp |    4 +
>  src/hardwaremanipulator.h   |    2 +
>  src/phonesim.cpp            |    2 +
>  8 files changed, 224 insertions(+), 16 deletions(-)

I applied all of the patches in this series, thanks.

Some general comments:

Your logic for enabling CSSI/CSSU buttons is not really correct.  CSSU
notifications (2, 3, 4) can come at any time there is an active/held
call, and not just during MT call setup.

You might also want to move the CSSI/CSSU generator UI elements into the
Call tab.  They logically belong there now.

Regards,
-Denis

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

end of thread, other threads:[~2011-05-02  9:23 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-02  9:17 [PATCH v2 0/6] phonesim: Add call status UI Nicolas Bertrand
2011-05-02  9:17 ` [PATCH v2 1/6] callmanager: Add signal on call status change Nicolas Bertrand
2011-05-02  9:17 ` [PATCH v2 2/6] control: Update UI using call status Nicolas Bertrand
2011-05-02  9:17 ` [PATCH v2 3/6] hardwaremanipulator: add callmanagement method Nicolas Bertrand
2011-05-02  9:17 ` [PATCH v2 4/6] phonesim: Connect call status signal Nicolas Bertrand
2011-05-02  9:17 ` [PATCH v2 5/6] controlbase.ui: Add call mangement tab Nicolas Bertrand
2011-05-02  9:17 ` [PATCH v2 6/6] control: Update call view Nicolas Bertrand
2011-05-02  9:23 ` [PATCH v2 0/6] phonesim: Add call status UI Denis Kenzior

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.