I have made the following changes intended for :
  CE:Apps / voicecall

Please review and accept or decline.
BOSS has already run some checks on this request.
See the "Messages from BOSS" section below.

https://build.pub.meego.com//request/show/7381

Thank You,
tswindell

[This message was auto-generated]

---

Request # 7381:

Messages from BOSS:

State: review at 2012-11-14T12:39:11 by bossbot

Reviews:
       accepted by bossbot : Prechecks succeeded.
       new for CE-maintainers : Please replace this text with a review and 
approve/reject the review (not the SR). BOSS will take care of the rest

Changes:
  submit: home:tswindell:CE:Apps / voicecall -> CE:Apps / voicecall
  
changes files:
--------------
--- voicecall.changes
+++ voicecall.changes
@@ -0,0 +1,4 @@
+* Wed Nov 14 2012 Tom Swindell <[email protected]> - 0.2.4
+- Updated DTMF handling for call channels
+- Minor improvements to ringtone handling
+

old:
----
  voicecall-0.2.3.tar.gz

new:
----
  voicecall-0.2.4.tar.gz

spec files:
-----------
--- voicecall.spec
+++ voicecall.spec
@@ -1,6 +1,6 @@
 Name:       voicecall
 Summary:    Voice Call Suite
-Version:    0.2.3
+Version:    0.2.4
 Release:    1
 Group:      Communications/Telephony and IM
 License:    Apache License, Version 2.0

other changes:
--------------

++++++ voicecall-0.2.3.tar.gz -> voicecall-0.2.4.tar.gz
--- lib/src/abstractvoicecallhandler.h
+++ lib/src/abstractvoicecallhandler.h
@@ -80,6 +80,7 @@
     virtual void answer() = 0;
     virtual void hangup() = 0;
     virtual void deflect(const QString &target) = 0;
+    virtual void sendDtmf(const QString &tones) = 0;
 };
 
 Q_DECLARE_INTERFACE(AbstractVoiceCallHandler, 
"stage.rubyx.voicecall.VoiceCall/1.0")
--- lib/src/dbus/voicecallhandlerdbusadapter.cpp
+++ lib/src/dbus/voicecallhandlerdbusadapter.cpp
@@ -194,3 +194,10 @@
     d->handler->deflect(target);
     return true;
 }
+
+void VoiceCallHandlerDBusAdapter::sendDtmf(const QString &tones)
+{
+    TRACE
+    Q_D(VoiceCallHandlerDBusAdapter);
+    d->handler->sendDtmf(tones);
+}
--- lib/src/dbus/voicecallhandlerdbusadapter.h
+++ lib/src/dbus/voicecallhandlerdbusadapter.h
@@ -67,6 +67,7 @@
     bool answer();
     bool hangup();
     bool deflect(const QString &target);
+    void sendDtmf(const QString &tones);
 
 protected:
     VoiceCallHandlerDBusAdapter(class VoiceCallHandlerDBusAdapterPrivate &d, 
AbstractVoiceCallHandler *parent = 0)
--- lib/src/dbus/voicecallmanagerdbusadapter.cpp
+++ lib/src/dbus/voicecallmanagerdbusadapter.cpp
@@ -223,6 +223,16 @@
 }
 
 /*!
+  Stops the playing ringtone for an incoming call.
+ */
+void VoiceCallManagerDBusAdapter::silenceRingtone()
+{
+    TRACE
+    Q_D(VoiceCallManagerDBusAdapter);
+    d->manager->silenceRingtone();
+}
+
+/*!
   Initiates sending of DTMF tones, where tone may be: 0-9, +, *, #, A-D.
 */
 bool VoiceCallManagerDBusAdapter::startDtmfTone(const QString &tone)
--- lib/src/dbus/voicecallmanagerdbusadapter.h
+++ lib/src/dbus/voicecallmanagerdbusadapter.h
@@ -75,6 +75,8 @@
 public Q_SLOTS:
     bool dial(const QString &provider, const QString &msisdn);
 
+    void silenceRingtone();
+
     bool setAudioMode(const QString &mode);
     bool setAudioRouted(bool on = true);
 
--- lib/src/voicecallmanagerinterface.h
+++ lib/src/voicecallmanagerinterface.h
@@ -91,6 +91,8 @@
     void microphoneMutedChanged();
     void speakerMutedChanged();
 
+    void silenceRingtoneRequested();
+
     void setAudioModeRequested(const QString &mode);
     void setAudioRoutedRequested(bool on);
 
@@ -111,6 +113,8 @@
 
     virtual bool dial(const QString &providerId, const QString &msisdn) = 0;
 
+    virtual void silenceRingtone() = 0;
+
     virtual void setAudioMode(const QString &mode) = 0;
     virtual void setAudioRouted(bool on = true) = 0;
 
--- plugins/declarative/src/voicecallhandler.cpp
+++ plugins/declarative/src/voicecallhandler.cpp
@@ -206,6 +206,16 @@
     QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), 
SLOT(onPendingCallFinished(QDBusPendingCallWatcher*)));
 }
 
+void VoiceCallHandler::sendDtmf(const QString &tones)
+{
+    TRACE
+    Q_D(VoiceCallHandler);
+    QDBusPendingCall call = d->interface->asyncCall("sendDtmf", tones);
+
+    QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(call, this);
+    QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), 
SLOT(onPendingCallFinished(QDBusPendingCallWatcher*)));
+}
+
 void VoiceCallHandler::onPendingCallFinished(QDBusPendingCallWatcher *watcher)
 {
     TRACE
--- plugins/declarative/src/voicecallhandler.h
+++ plugins/declarative/src/voicecallhandler.h
@@ -59,6 +59,7 @@
     void answer();
     void hangup();
     void deflect(const QString &target);
+    void sendDtmf(const QString &tones);
 
 protected Q_SLOTS:
     void initialize(bool notifyError = false);
--- plugins/declarative/src/voicecallmanager.cpp
+++ plugins/declarative/src/voicecallmanager.cpp
@@ -164,6 +164,15 @@
     QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), 
SLOT(onPendingCallFinished(QDBusPendingCallWatcher*)));
 }
 
+void VoiceCallManager::silenceRingtone()
+{
+    TRACE
+    Q_D(const VoiceCallManager);
+    QDBusPendingCall call = d->interface->asyncCall("silenceRingtone");
+    QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(call, this);
+    QObject::connect(watcher, SIGNAL(finished(QDBusPendingCallWatcher*)), 
SLOT(onPendingCallFinished(QDBusPendingCallWatcher*)));
+}
+
 /*
   - Use of method calls instead of property setters to allow status checking.
  */
@@ -203,6 +212,13 @@
 {
     TRACE
     Q_D(VoiceCallManager);
+
+    if(d->activeVoiceCall)
+    {
+        d->activeVoiceCall->sendDtmf(tone);
+    }
+
+    /*
     bool ok = true;
     unsigned int toneId = tone.toInt(&ok);
 
@@ -218,6 +234,8 @@
     }
 
     d->tonegend->call("StartEventTone", toneId, 0, (unsigned int)0);
+    */
+
     return true;
 }
 
--- plugins/declarative/src/voicecallmanager.h
+++ plugins/declarative/src/voicecallmanager.h
@@ -66,6 +66,8 @@
 public Q_SLOTS:
     void dial(const QString &providerId, const QString &msisdn);
 
+    void silenceRingtone();
+
     bool setAudioMode(const QString &mode);
     bool setAudioRouted(bool on);
     bool setMuteMicrophone(bool on = true);
--- plugins/ofono/src/ofonovoicecallhandler.cpp
+++ plugins/ofono/src/ofonovoicecallhandler.cpp
@@ -178,6 +178,12 @@
     d->ofonoVoiceCall->deflect(target);
 }
 
+void OfonoVoiceCallHandler::sendDtmf(const QString &tones)
+{
+    TRACE
+    Q_UNUSED(tones)
+}
+
 void OfonoVoiceCallHandler::timerEvent(QTimerEvent *event)
 {
     TRACE
--- plugins/ofono/src/ofonovoicecallhandler.h
+++ plugins/ofono/src/ofonovoicecallhandler.h
@@ -53,6 +53,7 @@
     void answer();
     void hangup();
     void deflect(const QString &target);
+    void sendDtmf(const QString &tones);
 
 protected Q_SLOTS:
     void onStatusChanged();
--- plugins/telepathy/src/telepathyhandler.cpp
+++ plugins/telepathy/src/telepathyhandler.cpp
@@ -238,6 +238,14 @@
     emit this->error("NOT IMPLEMENTED YET!");
 }
 
+void TelepathyHandler::sendDtmf(const QString &tones)
+{
+    TRACE
+    Q_D(TelepathyHandler);
+    Tp::Client::ChannelInterfaceDTMFInterface *dtmfIface = new 
Tp::Client::ChannelInterfaceDTMFInterface(d->channel.data(), this);
+    dtmfIface->MultipleTones(tones);
+}
+
 void TelepathyHandler::onCallChannelChannelReady(Tp::PendingOperation *op)
 {
     TRACE
--- plugins/telepathy/src/telepathyhandler.h
+++ plugins/telepathy/src/telepathyhandler.h
@@ -42,6 +42,8 @@
     void hangup();
     void deflect(const QString &target);
 
+    void sendDtmf(const QString &tones);
+
 protected Q_SLOTS:
     // TODO: Remove when tp-ring updated to call channel interface.
     // StreamedMediaChannel Interface Handling
--- src/audiocallpolicyproxy.cpp
+++ src/audiocallpolicyproxy.cpp
@@ -126,6 +126,12 @@
     d->subject->deflect(target);
 }
 
+void AudioCallPolicyProxy::sendDtmf(const QString &tones)
+{
+    TRACE
+    Q_D(AudioCallPolicyProxy);
+    d->subject->sendDtmf(tones);
+}
 
 void AudioCallPolicyProxy::invokeWithResources(QObject *receiver, const 
QString &method)
 {
--- src/audiocallpolicyproxy.h
+++ src/audiocallpolicyproxy.h
@@ -28,6 +28,7 @@
     void answer();
     void hangup();
     void deflect(const QString &target);
+    void sendDtmf(const QString &tones);
 
 protected Q_SLOTS:
     void invokeWithResources(QObject *receiver, const QString &method);
--- src/basicringtonenotificationprovider.cpp
+++ src/basicringtonenotificationprovider.cpp
@@ -103,7 +103,7 @@
 
     d->manager = manager;
     QObject::connect(manager, 
SIGNAL(voiceCallAdded(AbstractVoiceCallHandler*)), 
SLOT(onVoiceCallAdded(AbstractVoiceCallHandler*)));
-    QObject::connect(manager, SIGNAL(silenceRingtoneNotification()), 
d->player, SLOT(stop()));
+    QObject::connect(manager, SIGNAL(silenceRingtoneRequested()), d->player, 
SLOT(stop()));
 
     
d->player->setMedia(QMediaContent(QUrl::fromLocalFile("/usr/share/voicecall/sounds/ring-1.wav")));
     d->player->setVolume(100);
@@ -142,12 +142,6 @@
 
     QObject::connect(handler, SIGNAL(statusChanged()), 
SLOT(onVoiceCallStatusChanged()));
     d->currentCall = handler;
-
-    if(d->player->state() != QMediaPlayer::PlayingState)
-    {
-        d->player->setPosition(0);
-        d->player->play();
-    }
 }
 
 void BasicRingtoneNotificationProvider::onVoiceCallStatusChanged()
--- src/voicecallmanager.cpp
+++ src/voicecallmanager.cpp
@@ -255,6 +255,12 @@
     return true;
 }
 
+void VoiceCallManager::silenceRingtone()
+{
+    TRACE
+    emit this->silenceRingtoneRequested();
+}
+
 void VoiceCallManager::startEventTone(ToneType type, int volume)
 {
     TRACE
--- src/voicecallmanager.h
+++ src/voicecallmanager.h
@@ -55,6 +55,8 @@
 
     bool dial(const QString &providerId, const QString &msisdn);
 
+    void silenceRingtone();
+
     void setAudioMode(const QString &mode);
     void setAudioRouted(bool on);
     void setMuteMicrophone(bool on);
--- voicecall-manager.service
+++ voicecall-manager.service
@@ -1,7 +1,7 @@
 [Unit]
 Description=Voicecall manager
 After=xorg.target
-Requires=dbus.socket xorg.target 
+Requires=dbus.socket xorg.target tone-generator.service 
 
 [Service]
 ExecStart=/usr/bin/voicecall-manager



Reply via email to