7 #ifndef _FCITX_UTILS_DBUS_SERVICEWATCHER_H_ 8 #define _FCITX_UTILS_DBUS_SERVICEWATCHER_H_ 14 #include <fcitx-utils/fcitxutils_export.h> 15 #include <fcitx-utils/handlertable.h> 16 #include <fcitx-utils/macros.h> 25 using ServiceWatcherCallback = std::function<void(
26 const std::string &,
const std::string &,
const std::string &)>;
27 using ServiceWatcherEntry = HandlerTableEntry<ServiceWatcherCallback>;
29 class ServiceWatcherPrivate;
43 FCITX_NODISCARD std::unique_ptr<ServiceWatcherEntry>
44 watchService(
const std::string &name, ServiceWatcherCallback callback);
47 std::unique_ptr<ServiceWatcherPrivate> d_ptr;
52 #endif // _FCITX_UTILS_DBUS_SERVICEWATCHER_H_
A class that represents a connection to the Bus.
A class to be used to monitor the services registered on the Bus.