D-Bus is an Inter-Process Communication (IPC) and Remote Procedure Calling (RPC) mechanism originally developed for Linux to replace existing and competing IPC solutions with one unified protocol. It was also designed to allow communication between system-level processes (such as printer and hardware driver services) and normal user processes.
它使用很快的二进制消息传递协议,适于同机通信 (由于它的低延迟和低开销)。目前,其规范的定义是通过
freedesktop.org
project and is available to all parties.
Communication, in general, happens through a central server application called the "bus" (hence the name), but direct application-to-application communication is also possible. When communicating on a bus, applications can query which other applications and services are available, as well as activate one on demand.
Using a Qt module's C++ API requires linking against the module library, either directly or through other dependencies. Several build tools have dedicated support for this, including CMake and qmake .
使用
find_package()
command to locate the needed module component in the
Qt6
包:
find_package(Qt6 REQUIRED COMPONENTS DBus)
target_link_libraries(mytarget PRIVATE Qt6::DBus)
更多细节,见 构建采用 CMake 概述。
The following documents contain information about Qt's D-Bus integration features and provide details about the mechanisms used to send and receive type information over the bus:
Changes to Qt D-Bus lists important changes in the module API and functionality that were made for the Qt 6 series of Qt.
Qt D-Bus 模块在商业许可下是可用的来自 Qt 公司 . In addition, it is available under free software licenses: The GNU LGPL (次一般公共许可) 第 3 版 ,或 GNU GPL (一般公共许可) 第 2 版 。见 Qt 许可 进一步了解细节。
Furthermore, Qt D-Bus in Qt 6.5.1 may contain third party modules under the following permissive licenses:
| libdus-1 头,dbus 第 1.13.12 版 | 学术免费许可第 2.1 版,或 GNU GPL (一般公共许可) 第 2.0 版或更高版本 |