Fcitx
|
A class that represents a connection to the Bus. More...
#include <fcitx-utils/dbus/bus.h>
Public Member Functions | |
Bus (const std::string &address) | |
Connect to given address. | |
Bus (BusType type) | |
Connect to given dbus type. | |
Bus (const Bus &other)=delete | |
Bus (Bus &&other) noexcept | |
FCITX_NODISCARD bool | isOpen () const |
Check if the connection is open. | |
void | attachEventLoop (EventLoop *loop) |
Attach this bus to an event loop. | |
void | detachEventLoop () |
Remove this bus from an event loop. | |
FCITX_NODISCARD EventLoop * | eventLoop () const |
Return the attached event loop. More... | |
FCITX_NODISCARD std::unique_ptr< Slot > | addMatch (const MatchRule &rule, MessageCallback callback) |
FCITX_NODISCARD std::unique_ptr< Slot > | addFilter (MessageCallback callback) |
FCITX_NODISCARD std::unique_ptr< Slot > | addObject (const std::string &path, MessageCallback callback) |
bool | addObjectVTable (const std::string &path, const std::string &interface, ObjectVTableBase &vtable) |
Register a new object on the dbus. More... | |
Message | createSignal (const char *path, const char *interface, const char *member) |
Create a new signal message. | |
Message | createMethodCall (const char *destination, const char *path, const char *interface, const char *member) |
Create a new method message. | |
FCITX_NODISCARD void * | nativeHandle () const |
Return the internal pointer of the implemenation. More... | |
bool | requestName (const std::string &name, Flags< RequestNameFlag > flags) |
Request the dbus name on the bus. More... | |
bool | releaseName (const std::string &name) |
Release the dbus name. | |
std::string | serviceOwner (const std::string &name, uint64_t usec) |
Helper function to query the service owner. More... | |
std::unique_ptr< Slot > | serviceOwnerAsync (const std::string &name, uint64_t usec, MessageCallback callback) |
std::string | uniqueName () |
Return the unique name of current connection. More... | |
std::string | address () |
Return the dbus address being connected to. More... | |
void | flush () |
Flush the bus immediately. | |
Static Public Member Functions | |
static const char * | impl () |
Return the name of the compiled implentation of fcitx dbus. More... | |