Merge lp:~tiagosh/telepathy-ofono/add-targetids-initialinviteeids into lp:telepathy-ofono

Proposed by Tiago Salem Herrmann
Status: Merged
Merged at revision: 177
Proposed branch: lp:~tiagosh/telepathy-ofono/add-targetids-initialinviteeids
Merge into: lp:telepathy-ofono
Diff against target: 57 lines (+21/-2)
1 file modified
connection.cpp (+21/-2)
To merge this branch: bzr merge lp:~tiagosh/telepathy-ofono/add-targetids-initialinviteeids
Reviewer Review Type Date Requested Status
system-apps-ci-bot continuous-integration Needs Fixing
PS Jenkins bot continuous-integration Approve
Ubuntu Phablet Team Pending
Review via email: mp+291543@code.launchpad.net

Commit message

Add support for TargetID and InitialInviteeIDs.

Description of the change

Add support for TargetID and InitialInviteeIDs.

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
172. By Tiago Salem Herrmann

ensure handles also for InitialInviteeIDs. We have to make sure they are normalized

Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

FAILED: Continuous integration, rev:172
https://jenkins.canonical.com/system-apps/job/lp-telepathy-ofono-ci/1/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/system-apps/job/build/572/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/572
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=vivid+overlay/554
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=xenial/554
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/548/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial/548
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial/548/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/548
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/548/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial/548
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial/548/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/548
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/548/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial/548
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial/548/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-telepathy-ofono-ci/1/rebuild

review: Needs Fixing (continuous-integration)
Revision history for this message
system-apps-ci-bot (system-apps-ci-bot) wrote :

FAILED: Continuous integration, rev:172
https://jenkins.canonical.com/system-apps/job/lp-telepathy-ofono-ci/7/
Executed test runs:
    FAILURE: https://jenkins.canonical.com/system-apps/job/build/579/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/579
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=vivid+overlay/559
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-1-sourcepkg/release=xenial/559
    FAILURE: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/553/console
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial/553
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial/553/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/553
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/553/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial/553
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial/553/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/553
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/553/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial/553
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial/553/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-telepathy-ofono-ci/7/rebuild

review: Needs Fixing (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'connection.cpp'
--- connection.cpp 2015-10-13 19:29:54 +0000
+++ connection.cpp 2016-05-31 18:06:31 +0000
@@ -123,6 +123,7 @@
123 text.allowedProperties.append(TP_QT_IFACE_CHANNEL+".TargetHandle");123 text.allowedProperties.append(TP_QT_IFACE_CHANNEL+".TargetHandle");
124 text.allowedProperties.append(TP_QT_IFACE_CHANNEL+".TargetID");124 text.allowedProperties.append(TP_QT_IFACE_CHANNEL+".TargetID");
125 text.allowedProperties.append(TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE + QLatin1String(".InitialInviteeHandles"));125 text.allowedProperties.append(TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE + QLatin1String(".InitialInviteeHandles"));
126 text.allowedProperties.append(TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE + QLatin1String(".InitialInviteeIDs"));
126127
127 // set requestable call channel properties128 // set requestable call channel properties
128 Tp::RequestableChannelClass call;129 Tp::RequestableChannelClass call;
@@ -676,15 +677,27 @@
676Tp::BaseChannelPtr oFonoConnection::createTextChannel(const QVariantMap &request, Tp::DBusError *error)677Tp::BaseChannelPtr oFonoConnection::createTextChannel(const QVariantMap &request, Tp::DBusError *error)
677{678{
678 uint targetHandle = request.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle")).toUInt();679 uint targetHandle = request.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle")).toUInt();
680 const QString targetId = request.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetID")).toString();
679681
680 if (mSelfPresence.type != Tp::ConnectionPresenceTypeAvailable) {682 if (mSelfPresence.type != Tp::ConnectionPresenceTypeAvailable) {
681 error->set(TP_QT_ERROR_NETWORK_ERROR, "No network available");683 error->set(TP_QT_ERROR_NETWORK_ERROR, "No network available");
682 return Tp::BaseChannelPtr();684 return Tp::BaseChannelPtr();
683 }685 }
684686
687 if (!targetId.isEmpty()) {
688 targetHandle = ensureHandle(targetId);
689 }
690
685 QStringList phoneNumbers;691 QStringList phoneNumbers;
686 bool flash = false;692 bool flash = false;
687 if (request.contains(TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE + QLatin1String(".InitialInviteeHandles"))) {693 if (request.contains(TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE + QLatin1String(".InitialInviteeIDs"))) {
694 QStringList newPhoneNumbers = qdbus_cast<QStringList>(request[TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE + QLatin1String(".InitialInviteeIDs")]);
695 Tp::UIntList handles;
696 Q_FOREACH(const QString& number, newPhoneNumbers) {
697 handles << ensureHandle(number);
698 }
699 phoneNumbers << inspectHandles(Tp::HandleTypeContact, handles, error);
700 } else if (request.contains(TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE + QLatin1String(".InitialInviteeHandles"))) {
688 phoneNumbers << inspectHandles(Tp::HandleTypeContact, qdbus_cast<Tp::UIntList>(request[TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE + QLatin1String(".InitialInviteeHandles")]), error);701 phoneNumbers << inspectHandles(Tp::HandleTypeContact, qdbus_cast<Tp::UIntList>(request[TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE + QLatin1String(".InitialInviteeHandles")]), error);
689 } else {702 } else {
690 phoneNumbers << mHandles.value(targetHandle);703 phoneNumbers << mHandles.value(targetHandle);
@@ -725,9 +738,15 @@
725{738{
726 uint targetHandle = request.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle")).toUInt();739 uint targetHandle = request.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle")).toUInt();
727 uint initiatorHandle = request.value(TP_QT_IFACE_CHANNEL + QLatin1String(".InitiatorHandle")).toUInt();740 uint initiatorHandle = request.value(TP_QT_IFACE_CHANNEL + QLatin1String(".InitiatorHandle")).toUInt();
741 QString newPhoneNumber = request.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetID")).toString();
742
743 if (!newPhoneNumber.isEmpty()) {
744 targetHandle = ensureHandle(newPhoneNumber);
745 } else {
746 newPhoneNumber = mHandles.value(targetHandle);
747 }
728748
729 bool success = true;749 bool success = true;
730 QString newPhoneNumber = mHandles.value(targetHandle);
731 bool available = (mSelfPresence.type == Tp::ConnectionPresenceTypeAvailable);750 bool available = (mSelfPresence.type == Tp::ConnectionPresenceTypeAvailable);
732 bool isConference = (request.contains(TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE + QLatin1String(".InitialChannels")) &&751 bool isConference = (request.contains(TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE + QLatin1String(".InitialChannels")) &&
733 (!request.contains(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType")) || request[TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType")] == Tp::HandleTypeNone) &&752 (!request.contains(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType")) || request[TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandleType")] == Tp::HandleTypeNone) &&

Subscribers

People subscribed via source and target branches