David Leeds
75ea127374
connection: add createDefaultBusConnection()
...
This internally calls sd_bus_open(), which automatically selects the
system or session bus connection based on the presence and
content of a DBUS_STARTER_BUS_TYPE environment variable and
whether the calling process has root privileges.
This option is very helpful when creating services and clients that will use the system bus in production, but connect to a session
for testing.
Additional changes:
* Removed assertions null-checking make_unique() return values.
make_unique() calls new, and new is expected to throw or abort
on failure, making the assertions unhelpful.
* Corrected a typo in the ClosesAndUnrefsBusWhenDestructed
unit test for the system bus (tested the wrong function).
2021-06-21 15:55:23 +02:00
Marek Blaha
118faa58f6
Add API to get message path and message destination ( #167 )
...
* Add API to get message path
* Add API to get message destination
* Handle NULL message fields interface and member
Functions sd_bus_message_get_interface() and sd_bus_message_get_member()
can return null in case the message does not use those fields or does
not have them set.
2021-05-07 15:24:21 +02:00
David Leeds
d65744b1fc
Enable default construction of PendingAsyncCall ( #180 )
...
This is helpful in use cases where a user defined class wants to
store a PendingAsyncCall as a member variable, or in a STL
container.
2021-05-07 15:22:07 +02:00
David Leeds
6df67469ad
proxy: add IProxy::getConnection() ( #179 )
...
This provides access to the proxy's bus connection so code using
the proxy does not need to store an external reference to it.
A matching function is already available in IObject.
2021-05-06 16:52:02 +02:00
Marek Blaha
5ee4c61a1b
Add API to set signal destination ( #168 )
...
With this patch it is possible to create unicast signals.
2021-04-29 17:18:04 +02:00
alivenets and Stanislav Angelovič
5e03e78451
feat: add API to get message credentials ( #151 )
...
* sdbus-cpp: Add API to get message credentials
Signed-off-by: Alexander Livenets <a.livenets@gmail.com >
* fix: add <sys/types.h> include for gid_t and other types
Co-authored-by: Stanislav Angelovič <angelovic.s@gmail.com >
2021-03-12 14:14:23 +01:00
Michael Davis
0090ca97ee
fix: missing copy assignment operator ( #120 )
...
Explicitly list default copy assignment operator otherwise it is deleted in gcc 8.3.
2021-03-12 14:03:25 +01:00
sangelovic
138a437b22
Fix #112 : Address a few inconsistencies and make code more idiomatic
2020-07-18 20:47:05 +02:00
Tomas Pecka
c1c4512f9f
Fix build with gcc8.3
...
sdbus::ObjectPath and sdbus::Signature copy constructors are implicitly
declared as deleted when compiling with Linaro's ARM toolchain [1] gcc8.3.
Explicitly listing the copy constructors for affected classes fixes the problem.
[1] https://www.linaro.org/
2020-07-16 18:53:18 +02:00
ChristianS99 and Christian Schneider
ae8849e545
Implement #104 : add getObjectPath() for classes ( #105 )
...
* Implement #104 : add getObjectPath() for classes
* Implement #104 : changes requested in review
Co-authored-by: Christian Schneider <cschneider@radiodata.biz >
2020-05-28 15:36:58 +02:00
Benjamin Kaufmann
63bbb07ef0
Fixup for 00d0837d98
...
* Add PendingAsyncCall return value to all relevant overloads of
IProxy::callMethod().
2020-04-08 16:41:29 +02:00
sangelovic
00d0837d98
Introduce support for cancellable async calls
2020-04-04 16:30:56 +02:00
sangelovic
3a4f343fb9
Provide better names to event loop-related IConnection methods
2020-02-02 22:22:26 +01:00
sangelovic
8dfd29b0f0
Fix clang-9 warnings
2020-02-01 23:26:27 +01:00
sangelovic
975f1bf07f
Switch to fully supported C++17
2020-02-01 22:58:34 +01:00
sangelovic
eade6a0e44
Add support for method and signal parameter names in introspection
2020-02-01 12:38:39 +01:00
sangelovic
1e455b8ef3
Fix inline variable since in v0.7 version line we still support gcc 6
2020-01-25 22:31:41 +01:00
sangelovic
f41d9bc395
Fix issue of event loop thread and synchronous method call thread polling on the same D-Bus connection
...
Synchronous D-Bus method calls are now done in terms of blocking asynchronous calls.
2020-01-19 18:51:19 +01:00
Stanislav Angelovic
121ed1a975
Fix clang-8 compilation errors and warnings
2020-01-05 12:52:37 +01:00
sangelovic
839bc13625
Make Connection const-correct and fix integration tests build error
2019-11-10 17:40:33 +01:00
Bruno Marchand
5fe0f503ca
Add a method to retrieve the unique name of a connection
2019-11-10 17:34:57 +01:00
sangelovic
d50a15b2a2
Move C++17 uncaught_exceptions to public API
2019-11-10 17:31:58 +01:00
Jay
099bc857ad
Add support for opening a connection to a remote system bus using ssh ( #77 )
2019-11-03 20:21:39 +01:00
lubo-svk
c139110112
Add support for custom timeout value for D-Bus method calls ( #72 )
2019-11-03 13:54:13 +01:00
hogliux
0440dcb15b
Added ability to integrate with foreign event loops
2019-10-08 22:09:05 +02:00
sangelovic
e30ce194ab
Add getSenderName method to Message
2019-10-06 11:28:16 +02:00
Stanislav Angelovič
a09362f79a
Switch from plain UnixFd to owning UnixFd ( #69 )
2019-07-08 09:53:53 +02:00
Stanislav Angelovic
9826d28f51
Add missing Factory friend to Message subclasses
2019-06-11 20:29:45 +02:00
Stanislav Angelovic
ab34b0ae50
Update header doxy comments in source files
2019-06-11 20:18:37 +02:00
sangelovic
ff944c9e95
Add protected non-virtual destructor in generated classes
2019-06-10 22:54:16 +02:00
sangelovic
7049d00a78
Remove unnecessary std::move of parameters (thanks to @ardazishvili)
...
Fixes part of #52
2019-06-10 22:03:02 +02:00
sangelovic
236c10ff56
Resolve a few clang-tidy suggestions and warnings (thanks to @ardazishvili)
...
Fixes part of #52 .
2019-06-10 21:54:02 +02:00
Stanislav Angelovič
dcad208ffe
Redesign inheritance from Message ( #62 )
...
... so that the code is more idiomatic, clear and expressive about its intended use
2019-06-10 21:38:30 +02:00
sangelovic
57c840637c
Add support for Unix fd D-Bus type
2019-06-10 21:19:56 +02:00
Stanislav Angelovic
5c0a8d5ab4
Add object manager automatically in ObjectManager_adaptor constructor
2019-06-05 12:18:04 +02:00
sangelovic
946cc8d0cd
Fix indentation of doxygen comments
2019-06-04 22:21:49 +02:00
sangelovic
38b51bddc6
Add support for ObjectManager's InterfaceAdded/Removed signals on server side
2019-06-03 23:47:27 +02:00
Stanislav Angelovič
01e2a7a570
Add support for PropertyChanged signal on server side
2019-06-03 22:02:15 +02:00
Stanislav Angelovič
91fa35140b
Add support for ObjectManager and other standard D-Bus interfaces ( #55 )
...
Fixes #50
2019-05-29 22:28:15 +02:00
Stanislav Angelovič
4b0c23204d
Add object manager support to IConnection interface ( #54 )
2019-05-27 20:51:42 +02:00
sangelovic
e3a74a3ff2
Add unregister function to IObject and IProxy API
2019-04-13 21:17:37 +02:00
sangelovic
93b6e5237a
Clean up some names (rename classes, methods, files)
...
* ConvenienceClasses.h/.inl/.cpp -> ConvenienceApiClasses.h/.inl/.cpp
* IObjectProxy class -> IProxy
* Interfaces class -> AdaptorInterfaces
* Interfaces.h -> split into AdaptorInterfaces.h and ProxyInterfaces.h
* createObjectProxy() method -> createProxy()
2019-04-09 21:28:07 +02:00
Stanislav Angelovic
94fd3c88d8
Add getConnection() method to IObject so we ask Object about its connection
2019-04-04 20:39:03 +02:00
sangelovic
08945acbc4
Simplify and unify callback design for both sync and async methods
2019-04-03 00:05:20 +02:00
sangelovic
878ce6fa5c
Update doxygen documentation as well as tutorial
2019-03-29 22:23:25 +01:00
Stanislav Angelovic
1c4abab3e4
Remove executable bit erroneously set on source files
2019-03-27 17:53:31 +01:00
Stanislav Angelovic
cbf2218301
Remove unnecessary forward declarations from Message.h
2019-03-27 14:41:30 +01:00
Stanislav Angelovič
fd7be39dd4
Re-design sdbus-c++ approach to connections ( #47 )
...
Fixes #33 , among others
2019-03-25 16:28:31 +01:00
Stanislav Angelovič
663df31398
Introduce support for asynchronous D-Bus method calls on the client side ( #42 )
...
Fixes #32
2019-03-25 14:45:48 +01:00
sangelovic
b813680192
Allow ObjectPath and Signature be created from std::string
2019-02-19 08:57:24 +01:00