Commit Graph

14 Commits

Author SHA1 Message Date
Stanislav Angelovič
42f0bd07c0 refactor: add strong types to public API (#414)
This introduces strong types for `std::string`-based D-Bus types. This facilitates safer, less error-prone and more expressive API.

What previously was `auto proxy = createProxy("org.sdbuscpp.concatenator", "/org/sdbuscpp/concatenator");` is now written like `auto proxy = createProxy(ServiceName{"org.sdbuscpp.concatenator"}, ObjectPath{"/org/sdbuscpp/concatenator"});`.

These types are:
  * `ObjectPath` type for the object path (the type has been around already but now is also used consistently in sdbus-c++ API for object path strings),
  * `InterfaceName` type for D-Bus interface names,
  * `BusName` (and its aliases `ServiceName` and `ConnectionName`) type for bus/service/connection names,
  * `MemberName` (and its aliases `MethodName`, `SignalName` and `PropertyName`) type for D-Bus method, signal and property names,
  * `Signature` type for the D-Bus signature (the type has been around already but now is also used consistently in sdbus-c++ API for signature strings),
  * `Error::Name` type for D-Bus error names.
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č
c769637f3b chore: update years in header comments 2024-04-16 22:48:34 +02:00
Stanislav Angelovič
3717e63c64 feat: support std::future-based async methods in codegen tool (#353) 2023-08-19 20:57:32 +02:00
Stanislav Angelovic
aeae79003a refactor: support move semantics in generated adaptor and proxy classes 2022-09-20 17:05:59 +02:00
Stanislav Angelovic
e07c1f3981 chore: update doxygen header info 2022-07-05 18:10:05 +02:00
ChristianS99
fb0a70a831 Fix #101: sanitize names of namespaces/methods/signals/properties/arguments (#102)
- add a list of c++ keywords and common defines
- sanitize names so that there are no functions/args with names that are reserved in c++

Co-authored-by: Christian Schneider <cschneider@radiodata.biz>
2020-05-16 22:57:37 +02:00
sangelovic
eade6a0e44 Add support for method and signal parameter names in introspection 2020-02-01 12:38: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
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
fbb5242729 Add emit prefix to generated signal emitting methods 2019-06-04 21:30:09 +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
sangelovic
1b1b9ae8ae Move code generator to tools subdirectory for higher consistency with OSS standards 2019-04-26 00:03:46 +02:00