60 Commits

Author SHA1 Message Date
Stanislav Angelovič
0261d0ec60 chore: release version v2.1.0 2024-11-20 23:47:56 +01:00
Stanislav Angelovič
14942db075 feat: add macro to teach sdbus-c++ about user-defined structs (#440)
This introduces SDBUSCPP_REGISTER_STRUCT macro that helps clients conveniently, in one line, teach sdbus-c++ to recognize and accept their custom C++ struct types wherever D-Bus structs are expected in a D-Bus API.

The macro saves some boilerplate that would otherwise be needed on client side for every registered struct.
2024-05-06 20:14:32 +02:00
Stanislav Angelovič
b7d85f936d chore: release version v2.0.0 2024-04-24 21:00:02 +02:00
Stanislav Angelovič
2bc9d3ebb3 refactor: object manager API (#438)
This makes the signature of addObjectManager() function overloads consistent with common API design of the library.
2024-04-24 20:20:29 +02:00
Stanislav Angelovič
83ece48ab0 feat: add Slot-returning overloads of async method calls (#433) 2024-04-24 20:20:29 +02:00
Stanislav Angelovič
0dc0c87cc9 chore: use C++20 standard (#410)
As of now sdbus-c++ supports C++20 but does not require it, and the used C++20 features are conditionally compiled depending on whether they are available or not.
2024-04-24 20:20:29 +02:00
Stanislav Angelovič
c433d26176 chore(cmake): implement more flexible searching for sd-bus libs (#409)
A new CMake configuration variable SDBUSCPP_SDBUS_LIB has been introduced that enables clients to specify which sd-bus implementation library shall be used by sdbus-c++.
2024-04-24 20:20:29 +02:00
Stanislav Angelovič
87500ad9ad docs: add v2 migration notes to the tutorial (#407) 2024-04-24 20:20:29 +02:00
Stanislav Angelovič
9a5616a87a refactor: rename connection creation methods (#406)
This PR makes things around connection factories a little more consistent and more intuitive:

    * createConnection() has been removed. One shall call more expressive createSystemConnection() instead to get a connection to the system bus.
    * createDefaultBusConnection() has been renamed to createBusConnection(), so as not to be confused with libsystemd's default_bus, which is a different thing (a reusable thread-local bus).

Proxies still by default call createBusConnection() to get a connection when the connection is not provided explicitly by the caller, but now createBusConnection() does a different thing, so now the proxies connect to either session bus or system bus depending on the context (as opposed to always to system bus like before).

The integration tests were modified to use createBusConnection().
2024-04-24 20:20:29 +02:00
Stanislav Angelovič
4a90f80933 chore: update ChangeLog for v2.0.0 (#405) 2024-04-24 20:20:29 +02:00
Stanislav Angelovič
bdf313bc60 refactor: improve Object vtable registration (#388)
This improves the D-Bus object API registration/unregistration by making it more flexible, more dynamic, closer to sd-bus API design but still on high abstraction level, and -- most importantly -- less error-prone since no `finishRegistration()` call is needed anymore.
2024-04-24 20:20:29 +02:00
Stanislav Angelovič
20a13eeafb refactor: make Variant constructor explicit (#370)
This makes the library more robust and prone to user's errors when the user writes an extension for their custom type. In case they forget to implement a serialization function for that type and yet insert an object of that type into sdbus::Message, the current behavior is that, surprisingly, the library masks the error as it resolves the call to the Variant overload, because Variant provides an implicit template converting constructor, so the library tries to construct first the Variant object from the object of custom type, and then inserting into the message that Variant object. Variant constructor serializes the underlying object into its internal message object, which resolves to the same message insertion overload, creating an infinite recursion and ultimately the stack overflow. This is undesired and plain wrong. Marking this Variant converting constructor solves these problems, plus in overall it makes the code a little safer and more verbose. With explicit Variant constructor, when the user forgets to implement a serialization function for their type, the call of such function will fail with an expressive compilation error, and will produce no undesired, surprising results.
2024-04-24 20:20:29 +02:00
Stanislav Angelovič
6f35f00fcf refactor: let callbacks take message objects by value (#367)
Signatures of callbacks async_reply_handler, signal_handler, message_handler and property_set_callback were modified to take input message objects by value, as opposed to non-const ref.

The callee assumes ownership of the message. This API is more idiomatic, more expressive, cleaner and safer. Move semantics is used to pass messages to the callback handlers. In some cases, this also improves performance.
2024-04-24 20:20:29 +02:00
Stanislav Angelovic
3e20fc639e refactor: simplify async D-Bus connection handling 2024-04-24 20:20:29 +02:00
Stanislav Angelovič
7450515d0b chore: release version v1.6.0 2024-04-24 20:04:34 +02:00
Stanislav Angelovič
30d9f1d462 chore: release v1.5.0 2024-02-26 08:29:35 +01:00
Stanislav Angelovič
b482cd6d08 chore: version 1.4.0 2023-10-10 19:26:21 +02:00
Stanislav Angelovič
0eda855745 chore: version 1.3.0 2023-08-20 11:45:44 +02:00
Stanislav Angelovic
751c1addc4 chore: version 1.2.0 2022-08-09 09:50:33 +02:00
Stanislav Angelovic
bca8e81037 build: version 1.1.0 2021-12-22 13:17:31 +01:00
Urs Ritzmann
125cb1616c version 1.0.0 2021-10-25 09:02:37 +02:00
riuriuriu
de9cd46d8a update ChangeLog: v0.8.4 was never released 2021-10-18 14:16:30 +02:00
Stanislav Angelovič
1d930f324e update changelog: v0.9.0 2021-10-15 15:20:46 +02:00
riuriuriu
fe8cdce107 update changelog: v0.8.4 2021-04-13 15:59:35 +02:00
Stanislav Angelovic
6e8e5aadb6 Bump up to v0.8.3 2020-09-11 22:29:15 +02:00
Stanislav Angelovic
175c43ec53 Bump revision up to v0.8.2 2020-06-17 15:29:46 +02:00
sangelovic
3a4f343fb9 Provide better names to event loop-related IConnection methods 2020-02-02 22:22:26 +01:00
sangelovic
dee6adce02 Bump revision up to v0.8.1 2020-02-02 02:31:39 +01:00
sangelovic
d591b69f92 Bump revision up to 0.8.0 2020-02-01 13:56:13 +01:00
sangelovic
10977c6137 Bump revision up to 0.7.8 2020-01-25 23:38:54 +01:00
sangelovic
68b5eac9e9 Bump revision up to 0.7.7 2020-01-19 18:59:36 +01:00
sangelovic
5121d46eed Bump revision up to 0.7.6 2020-01-05 22:49:26 +01:00
sangelovic
cc495811f9 Bump revision up to 0.7.5 2019-11-10 17:43:14 +01:00
sangelovic
3a76e9c120 Bump revision up to 0.7.4 2019-11-03 20:40:13 +01:00
sangelovic
e7155c5506 Bump revision up to 0.7.3 2019-10-13 15:39:32 +02:00
Stanislav Angelovic
750dab3927 Bump revision up to 0.7.2 2019-07-08 10:01:11 +02:00
sangelovic
00177a7e4c Bump revision up to 0.7.1 2019-06-12 09:18:55 +02:00
sangelovic
07625a435b Bump revision up to 0.7.0 2019-06-04 21:39:29 +02:00
sangelovic
fbb5242729 Add emit prefix to generated signal emitting methods 2019-06-04 21:30:09 +02:00
Stanislav Angelovič
38552483ca Update ChangeLog 2019-05-29 22:41:59 +02:00
sangelovic
6ee66dfc47 Update ChangeLog for incoming new release 2019-05-26 15:37:32 +02:00
sangelovic
0cffed4574 Add option to build libsystemd automatically as integral part of sdbus-c++ 2019-04-28 17:09:37 +02:00
sangelovic
62a546c9d3 Bump revision up to 0.6.0 2019-04-15 21:05:54 +02:00
sangelovic
d3749741d1 Add preliminary ChangeLog 2019-04-13 21:38:22 +02:00
sangelovic
e7c78460cf Bump revision up to 0.5.3 2019-04-09 20:56:33 +02:00
sangelovic
a919058d13 Bump up revision to 0.5.2 2019-04-03 00:17:31 +02:00
sangelovic
b46fb170ea Bump up revision to 0.5.1 2019-03-29 22:28:58 +01:00
Stanislav Angelovic
a04ab9f445 Bump revision up to 0.5.0, a big step in maturing sdbus-c++ 2019-03-28 16:08:58 +01:00
sangelovic
004f158817 Bump up revision to 0.4.3 2019-03-24 22:18:48 +01:00
sangelovic
8c76e3ef8b Bump up revision to 0.4.2 2019-03-15 12:09:55 +01:00