Merge lp:~phablet-team/messaging-framework/self-id into lp:messaging-framework

Proposed by Roberto Mier Escandón  on 2016-10-05
Status: Merged
Approved by: Tiago Salem Herrmann on 2016-10-14
Approved revision: 69
Merged at revision: 67
Proposed branch: lp:~phablet-team/messaging-framework/self-id
Merge into: lp:messaging-framework
Prerequisite: lp:~phablet-team/messaging-framework/enable_message_broadcast
Diff against target: 68 lines (+16/-1)
5 files modified
debian/changelog (+6/-0)
include/messaging/connection.h (+3/-0)
src/messaging/qt/tp/connection.cpp (+1/-1)
tests/mock_connection.h (+1/-0)
tests/unit/messaging/connection_test.cpp (+5/-0)
To merge this branch: bzr merge lp:~phablet-team/messaging-framework/self-id
Reviewer Review Type Date Requested Status
Tiago Salem Herrmann (community) 2016-10-05 Approve on 2016-10-14
system-apps-ci-bot continuous-integration Approve on 2016-10-05
Review via email: mp+307701@code.launchpad.net

Commit message

Added self identifier

NOTE: This branch should be landed along with https://code.launchpad.net/~ningbo-team/ningbo/self-id/+merge/307702

Description of the change

Added self identifier

NOTE: This branch should be landed along with https://code.launchpad.net/~ningbo-team/ningbo/self-id/+merge/307702

To post a comment you must log in.

PASSED: Continuous integration, rev:69
https://jenkins.canonical.com/system-apps/job/lp-messaging-framework-ci/86/
Executed test runs:
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build/1752
    SUCCESS: https://jenkins.canonical.com/system-apps/job/test-0-autopkgtest/label=phone-armhf,release=vivid+overlay,testname=default/426
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-0-fetch/1752
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1597
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=vivid+overlay/1597/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1597
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=xenial+overlay/1597/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1597
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=amd64,release=yakkety/1597/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1597
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=vivid+overlay/1597/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1597
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=xenial+overlay/1597/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1597
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=armhf,release=yakkety/1597/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1597
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=vivid+overlay/1597/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1597
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=xenial+overlay/1597/artifact/output/*zip*/output.zip
    SUCCESS: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1597
        deb: https://jenkins.canonical.com/system-apps/job/build-2-binpkg/arch=i386,release=yakkety/1597/artifact/output/*zip*/output.zip

Click here to trigger a rebuild:
https://jenkins.canonical.com/system-apps/job/lp-messaging-framework-ci/86/rebuild

review: Approve (continuous-integration)
Tiago Salem Herrmann (tiagosh) wrote :

thanks.
We are using this info in messaging-app now to display the "me" participant.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2016-10-05 11:58:12 +0000
3+++ debian/changelog 2016-10-05 11:58:12 +0000
4@@ -1,3 +1,9 @@
5+messaging-framework (0.1+16.10.20161005-1ubuntu28) vivid; urgency=medium
6+
7+ * Self identifier support
8+
9+ -- Roberto Mier Escandon <roberto.escandon@canonical.com> Wed, 05 Oct 2016 13:38:22 +0200
10+
11 messaging-framework (0.1+16.10.20160926-1ubuntu28) vivid; urgency=medium
12
13 * Bugfix: The participant who was invited back is shown as admin
14
15=== modified file 'include/messaging/connection.h'
16--- include/messaging/connection.h 2016-05-17 19:33:22 +0000
17+++ include/messaging/connection.h 2016-10-05 11:58:12 +0000
18@@ -77,6 +77,9 @@
19
20 };
21
22+ /// @brief self_identifier returns the current registered user identifier
23+ virtual std::string self_identifier() = 0;
24+
25 /// @brief presence_manager returns a shared pointer to a PresenceManager object
26 virtual std::shared_ptr<PresenceManager> presence_manager() = 0;
27
28
29=== modified file 'src/messaging/qt/tp/connection.cpp'
30--- src/messaging/qt/tp/connection.cpp 2016-10-05 11:58:12 +0000
31+++ src/messaging/qt/tp/connection.cpp 2016-10-05 11:58:12 +0000
32@@ -155,7 +155,7 @@
33 qRegisterMetaType<messaging::Recipient::shared_ptr>();
34
35 setSelfHandle(1);
36- handles_.insert(HandleIdPair(1, "my_myself_and_i"));
37+ handles_.insert(HandleIdPair(1, QString::fromStdString(connection->self_identifier())));
38
39 // Wire up the actual request for connecting.
40 setConnectCallback(Tp::memFun(this, &tp::Connection::connect));
41
42=== modified file 'tests/mock_connection.h'
43--- tests/mock_connection.h 2016-06-07 18:15:24 +0000
44+++ tests/mock_connection.h 2016-10-05 11:58:12 +0000
45@@ -45,6 +45,7 @@
46
47 void announce_status_connected();
48
49+ MOCK_METHOD0(self_identifier, std::string());
50 MOCK_METHOD0(presence_manager, std::shared_ptr<messaging::PresenceManager>());
51 MOCK_METHOD0(messenger, std::shared_ptr<messaging::Messenger>());
52 MOCK_METHOD0(group_starter, std::shared_ptr<messaging::GroupStarter>());
53
54=== modified file 'tests/unit/messaging/connection_test.cpp'
55--- tests/unit/messaging/connection_test.cpp 2016-05-19 11:56:55 +0000
56+++ tests/unit/messaging/connection_test.cpp 2016-10-05 11:58:12 +0000
57@@ -30,6 +30,11 @@
58 {
59 }
60
61+ std::string self_identifier() override
62+ {
63+ throw std::logic_error{"Not implemented"};
64+ }
65+
66 std::shared_ptr<messaging::PresenceManager> presence_manager() override
67 {
68 throw std::logic_error{"Not implemented"};

Subscribers

People subscribed via source and target branches

to all changes: