package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gio/Ocgtk_gio/Gio/Wrappers/Test_d_bus/index.html
Module Wrappers.Test_d_bus
type t = [ `test_d_bus | `object_ ] Gobject.objval new_ : Gio_enums.testdbusflags -> tCreate a new TestDBus
val up : t -> unitStart a dbus-daemon instance and set DBUS_SESSION_BUS_ADDRESS. After this call, it is safe for unit tests to start sending messages on the session bus.
If this function is called from setup callback of g_test_add(), g_test_dbus_down() must be called in its teardown callback.
If this function is called from unit test's main(), then g_test_dbus_down() must be called after g_test_run().
val stop : t -> unitStop the session bus started by g_test_dbus_up().
Unlike g_test_dbus_down(), this won't verify the #GDBusConnection singleton returned by g_bus_get() or g_bus_get_sync() is destroyed. Unit tests wanting to verify behaviour after the session bus has been stopped can use this function but should still call g_test_dbus_down() when done.
val get_flags : t -> Gio_enums.testdbusflagsGet the flags of the #GTestDBus object.
val get_bus_address : t -> string optionGet the address on which dbus-daemon is running. If g_test_dbus_up() has not been called yet, %NULL is returned. This can be used with g_dbus_connection_new_for_address().
val down : t -> unitStop the session bus started by g_test_dbus_up().
This will wait for the singleton returned by g_bus_get() or g_bus_get_sync() to be destroyed. This is done to ensure that the next unit test won't get a leaked singleton from this test.
val add_service_dir : t -> string -> unitAdd a path where dbus-daemon will look up .service files. This can't be called after g_test_dbus_up().