Merge lp:~thomas-voss/dbus-cpp/expose-session-and-system-bus-address-from-fixture into lp:dbus-cpp

Proposed by Thomas Voß
Status: Merged
Approved by: Manuel de la Peña
Approved revision: 97
Merged at revision: 96
Proposed branch: lp:~thomas-voss/dbus-cpp/expose-session-and-system-bus-address-from-fixture
Merge into: lp:dbus-cpp
Diff against target: 101 lines (+40/-0)
4 files modified
debian/libdbus-cpp4.symbols.32bit (+2/-0)
debian/libdbus-cpp4.symbols.64bit (+2/-0)
include/core/dbus/fixture.h (+26/-0)
src/core/dbus/fixture.cpp.in (+10/-0)
To merge this branch: bzr merge lp:~thomas-voss/dbus-cpp/expose-session-and-system-bus-address-from-fixture
Reviewer Review Type Date Requested Status
Manuel de la Peña (community) Approve
PS Jenkins bot continuous-integration Needs Fixing
Review via email: mp+258165@code.launchpad.net

Commit message

core::dbus::Fixture: Provide access to the address of the spawned session/system bus instances.

Description of the change

core::dbus::Fixture: Provide access to the address of the spawned session/system bus instances.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/libdbus-cpp4.symbols.32bit'
2--- debian/libdbus-cpp4.symbols.32bit 2014-07-30 16:12:27 +0000
3+++ debian/libdbus-cpp4.symbols.32bit 2015-05-04 11:31:53 +0000
4@@ -1,3 +1,5 @@
5+ (c++)"core::dbus::Fixture::system_bus_address()@Base" 0replaceme
6+ (c++)"core::dbus::Fixture::session_bus_address()@Base" 0replaceme
7 (c++)"core::dbus::Fixture::default_daemon_timeout()@Base" 4.0.0+14.10.20140730
8 (c++)"core::dbus::asio::make_executor(std::shared_ptr<core::dbus::Bus> const&)@Base" 2.0.0+14.04.20140310
9 (c++)"core::dbus::asio::make_executor(std::shared_ptr<core::dbus::Bus> const&, boost::asio::io_service&)@Base" 3.1.0+14.10.20140711
10
11=== modified file 'debian/libdbus-cpp4.symbols.64bit'
12--- debian/libdbus-cpp4.symbols.64bit 2014-07-30 16:12:27 +0000
13+++ debian/libdbus-cpp4.symbols.64bit 2015-05-04 11:31:53 +0000
14@@ -1,3 +1,5 @@
15+ (c++)"core::dbus::Fixture::system_bus_address()@Base" 0replaceme
16+ (c++)"core::dbus::Fixture::session_bus_address()@Base" 0replaceme
17 (c++)"core::dbus::Fixture::default_daemon_timeout()@Base" 4.0.0+14.10.20140730
18 (c++)"core::dbus::asio::make_executor(std::shared_ptr<core::dbus::Bus> const&)@Base" 2.0.0+14.04.20140310
19 (c++)"core::dbus::asio::make_executor(std::shared_ptr<core::dbus::Bus> const&, boost::asio::io_service&)@Base" 3.1.0+14.10.20140711
20
21=== modified file 'include/core/dbus/fixture.h'
22--- include/core/dbus/fixture.h 2014-06-29 05:29:15 +0000
23+++ include/core/dbus/fixture.h 2015-05-04 11:31:53 +0000
24@@ -70,11 +70,21 @@
25
26 virtual ~Fixture();
27
28+ /**
29+ * @brief session_bus_address returns the address of the private session bus instance.
30+ */
31+ std::string session_bus_address();
32+
33 /**
34 * @brief create_connection_to_session_bus creates a new connection to the testing session bus instance.
35 */
36 std::shared_ptr<Bus> create_connection_to_session_bus();
37
38+ /**
39+ * @brief session_bus_address returns the address of the private session bus instance.
40+ */
41+ std::string system_bus_address();
42+
43 /**
44 * @brief create_connection_to_system_bus creates a new connection to the testing system bus instance.
45 */
46@@ -135,6 +145,14 @@
47 {
48 }
49
50+ /**
51+ * @brief session_bus_address returns the address of the private session bus instance.
52+ */
53+ inline std::string session_bus_address()
54+ {
55+ return fixture.session_bus_address();
56+ }
57+
58 /**
59 * @brief session_bus provides access to the private session bus.
60 */
61@@ -143,6 +161,14 @@
62 return fixture.create_connection_to_session_bus();
63 }
64
65+ /**
66+ * @brief system_bus_address returns the address of the private session bus instance.
67+ */
68+ inline std::string system_bus_address()
69+ {
70+ return fixture.system_bus_address();
71+ }
72+
73 /**
74 * @brief system_bus provides access to the private system bus.
75 */
76
77=== modified file 'src/core/dbus/fixture.cpp.in'
78--- src/core/dbus/fixture.cpp.in 2015-04-14 11:20:59 +0000
79+++ src/core/dbus/fixture.cpp.in 2015-05-04 11:31:53 +0000
80@@ -226,11 +226,21 @@
81 {
82 }
83
84+std::string core::dbus::Fixture::session_bus_address()
85+{
86+ return d->session.address;
87+}
88+
89 std::shared_ptr<core::dbus::Bus> core::dbus::Fixture::create_connection_to_session_bus()
90 {
91 return std::shared_ptr<core::dbus::Bus>(new core::dbus::Bus{d->session.address});
92 }
93
94+std::string core::dbus::Fixture::system_bus_address()
95+{
96+ return d->system.address;
97+}
98+
99 std::shared_ptr<core::dbus::Bus> core::dbus::Fixture::create_connection_to_system_bus()
100 {
101 return std::shared_ptr<core::dbus::Bus>(new core::dbus::Bus{d->system.address});

Subscribers

People subscribed via source and target branches