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

Proposed by Tiago Salem Herrmann on 2016-04-11
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 on 2016-06-14
PS Jenkins bot continuous-integration Approve on 2016-04-11
Ubuntu Phablet Team 2016-04-11 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.
172. By Tiago Salem Herrmann on 2016-05-31

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

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)

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
1=== modified file 'connection.cpp'
2--- connection.cpp 2015-10-13 19:29:54 +0000
3+++ connection.cpp 2016-05-31 18:06:31 +0000
4@@ -123,6 +123,7 @@
5 text.allowedProperties.append(TP_QT_IFACE_CHANNEL+".TargetHandle");
6 text.allowedProperties.append(TP_QT_IFACE_CHANNEL+".TargetID");
7 text.allowedProperties.append(TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE + QLatin1String(".InitialInviteeHandles"));
8+ text.allowedProperties.append(TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE + QLatin1String(".InitialInviteeIDs"));
9
10 // set requestable call channel properties
11 Tp::RequestableChannelClass call;
12@@ -676,15 +677,27 @@
13 Tp::BaseChannelPtr oFonoConnection::createTextChannel(const QVariantMap &request, Tp::DBusError *error)
14 {
15 uint targetHandle = request.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle")).toUInt();
16+ const QString targetId = request.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetID")).toString();
17
18 if (mSelfPresence.type != Tp::ConnectionPresenceTypeAvailable) {
19 error->set(TP_QT_ERROR_NETWORK_ERROR, "No network available");
20 return Tp::BaseChannelPtr();
21 }
22
23+ if (!targetId.isEmpty()) {
24+ targetHandle = ensureHandle(targetId);
25+ }
26+
27 QStringList phoneNumbers;
28 bool flash = false;
29- if (request.contains(TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE + QLatin1String(".InitialInviteeHandles"))) {
30+ if (request.contains(TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE + QLatin1String(".InitialInviteeIDs"))) {
31+ QStringList newPhoneNumbers = qdbus_cast<QStringList>(request[TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE + QLatin1String(".InitialInviteeIDs")]);
32+ Tp::UIntList handles;
33+ Q_FOREACH(const QString& number, newPhoneNumbers) {
34+ handles << ensureHandle(number);
35+ }
36+ phoneNumbers << inspectHandles(Tp::HandleTypeContact, handles, error);
37+ } else if (request.contains(TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE + QLatin1String(".InitialInviteeHandles"))) {
38 phoneNumbers << inspectHandles(Tp::HandleTypeContact, qdbus_cast<Tp::UIntList>(request[TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE + QLatin1String(".InitialInviteeHandles")]), error);
39 } else {
40 phoneNumbers << mHandles.value(targetHandle);
41@@ -725,9 +738,15 @@
42 {
43 uint targetHandle = request.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetHandle")).toUInt();
44 uint initiatorHandle = request.value(TP_QT_IFACE_CHANNEL + QLatin1String(".InitiatorHandle")).toUInt();
45+ QString newPhoneNumber = request.value(TP_QT_IFACE_CHANNEL + QLatin1String(".TargetID")).toString();
46+
47+ if (!newPhoneNumber.isEmpty()) {
48+ targetHandle = ensureHandle(newPhoneNumber);
49+ } else {
50+ newPhoneNumber = mHandles.value(targetHandle);
51+ }
52
53 bool success = true;
54- QString newPhoneNumber = mHandles.value(targetHandle);
55 bool available = (mSelfPresence.type == Tp::ConnectionPresenceTypeAvailable);
56 bool isConference = (request.contains(TP_QT_IFACE_CHANNEL_INTERFACE_CONFERENCE + QLatin1String(".InitialChannels")) &&
57 (!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