Commit Graph

40 Commits

Author SHA1 Message Date
Stanislav Angelovic
e07c1f3981 chore: update doxygen header info 2022-07-05 18:10:05 +02:00
Stanislav Angelovic
5ec6027d5f feat: add support for match rules 2022-06-27 12:14:57 +02:00
Stanislav Angelovic
7f437a6e06 fix(tests): printer for std::chrono in googletest v1.11.0 2022-02-09 11:43:12 +01:00
Stanislav Angelovic
23fdd0ce8f fix: use non-mutating find in signal unregistration 2021-12-20 10:05:24 +01:00
Benjamin Kaufmann
bb0f3f0242 Fix #88: Timeout handling. (#91)
fix timeout handling

* Despite what is documented in sd_bus_get_timeout(3), the timeout
  returned is actually an absolute time point of Linux's CLOCK_MONOTONIC
  clock. Hence, we first have to subtract the current time from the
  timeout in order to get a relative time that can be passed to poll.

* For async call timeouts to reliably work, we need a way to notify the
  event loop of a connection that is currently blocked waiting in poll.
  I.e. assume the event loop thread entered poll with a timeout set to
  T1. Afterwards, the main thread starts an async call C with a timeout
  T2 < T1. In order for C to be canceled after its timeout T1 has
  elapsed, we have to be able to notify the event loop so that it can
  update its poll data.

Co-authored-by: Urs Ritzmann <ursritzmann@protonmail.ch>
Co-authored-by: Lukasz Marcul <lukasz.marcul@onemeter.com>
2021-12-20 10:00:29 +01:00
Stanislav Angelovic
9b8a15339e test: delete forgotten file 2021-12-14 21:59:46 +01:00
Osama Ghanem
41d33117cc Fix #214: Add means to unregister signal handler 2021-12-14 16:48:50 +01:00
riuriuriu
ca05b1541f fix non-virtual-dtor warning 2021-10-18 11:58:07 +02:00
Urs Ritzmann
35176c4988 integrationtests: differentiate BUS_NAME from INTERFACE_NAME
Even though they have the same value, they are something fundamentally different.
Therefore it is extremely confusing if the constant INTERFACE_NAME is passed
where actually a well-known BUS_NAME (destination) should go.
2021-10-18 11:58:07 +02:00
Urs Ritzmann
4e908612ed introduce new ObjectManager API on generated stubs layer
ATTENTION: Breaking Change!
2021-10-18 11:58:07 +02:00
Stanislav Angelovic
e16ffb1288 Provide access to D-Bus message in high-level API 2021-06-22 11:31:08 +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
Stanislav Angelovič
bbffcbf49e fix: minor documentation and test improvements (#166)
* fix: minor documentation and test improvements

* doc: add link to tests in standard interfaces tutorial secion

* Update README.md

Co-authored-by: Urs Ritzmann <urs.ritzmann@kistler.com>

* Update docs/using-sdbus-c++.md

Co-authored-by: Urs Ritzmann <urs.ritzmann@kistler.com>

* Use cmake instead of make in build instructions

Co-authored-by: Stanislav Angelovic <stanislav.angelovic@siemens.com>
Co-authored-by: Urs Ritzmann <urs.ritzmann@kistler.com>
2021-04-28 12:05:14 +02:00
Urs Ritzmann
b9723850b8 add integrationtest for issue 145 2021-04-13 15:59:35 +02:00
sangelovic
cc8d88cc64 Fix GetObjectPath() in integration tests 2020-07-18 20:30:51 +02:00
sangelovic
bded067496 Fix #43: Clean up integration tests 2020-07-18 20:21:47 +02:00
Stanislav Angelovic
a0dadcc6fe Fix integration tests after getObjectPath() introduction failed them 2020-06-16 17:25:01 +02:00
sangelovic
fb35a9a196 Fix integration test cases failing in specific situations 2020-05-17 15:06:29 +02:00
Viliam Lejcik
9af20af001 Fixed integration tests for libsystemd older than 242 2020-05-09 22:02:57 +02:00
sangelovic
00d0837d98 Introduce support for cancellable async calls 2020-04-04 16:30:56 +02:00
Oliver Tappe
dc66efbbcb Fix #93: Get signals working for multiple proxies.
* Proxy::sdbus_signal_handler() needs to return 0 instead of 1 in
  order to allow multiple proxies listening to a signal all being
  triggered.
* Add test for emitting a signal to multiple proxies on same
  connection.
2020-03-26 21:19:18 +01: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
eade6a0e44 Add support for method and signal parameter names in introspection 2020-02-01 12:38:39 +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
lubo-svk
c139110112 Add support for custom timeout value for D-Bus method calls (#72) 2019-11-03 13:54:13 +01:00
sangelovic
c6d4d2710f Skip GetMachineId test when /etc/machine-id is not available 2019-10-11 15:56:00 +02:00
Stanislav Angelovic
bf35157a4a Comment out unused parameter 2019-07-08 09:58:22 +02:00
Stanislav Angelovič
a09362f79a Switch from plain UnixFd to owning UnixFd (#69) 2019-07-08 09:53:53 +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
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
b2b0bddf02 Fix Variant signal test in integration tests 2019-06-04 23:45:45 +02:00
sangelovic
11f0edf7b8 Fix fragile time-based waiting in integration tests 2019-06-04 22:48:54 +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
sangelovic
36269897fd Remove unwanted sdbus-c++-internal includes from integration tests 2019-04-28 15:59:29 +02:00
sangelovic
1b02c604d8 Rename test subdirectory to tests for higher consistency with OSS standards 2019-04-25 23:54:51 +02:00