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 版或更高版本 |