QDBusServer Class
QDBusServer クラスは、同じコンピュータ上のプロセス間でピアツーピア通信を実現します。詳細...
| ヘッダー: | #include <QDBusServer> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS DBus) target_link_libraries(mytarget PRIVATE Qt6::DBus) |
| qmake: | QT += dbus |
| 継承元: | QObject |
パブリック関数
| QDBusServer(QObject *parent = nullptr) | |
| QDBusServer(const QString &address, QObject *parent = nullptr) | |
| virtual | ~QDBusServer() |
| QString | address() const |
| bool | isAnonymousAuthenticationAllowed() const |
| bool | isConnected() const |
| QDBusError | lastError() const |
| void | setAnonymousAuthenticationAllowed(bool value) |
シグナル
| void | newConnection(const QDBusConnection &connection) |
メンバー関数のドキュメント
[explicit] QDBusServer::QDBusServer(QObject *parent = nullptr)
指定されたparent を使用して、QDBusServerを構築します。このサーバーは、/tmp (Unixシステムの場合)またはlocalhostにバインドされたTCPポート(それ以外の場合)で接続を待機します。
[explicit] QDBusServer::QDBusServer(const QString &address, QObject *parent = nullptr)
指定されたaddress とparent を使用して、QDBusServerを構築します。
[virtual noexcept] QDBusServer::~QDBusServer()
aを破壊するQDBusServer
QString QDBusServer::address() const
このサーバーに関連付けられているアドレスを返します。
bool QDBusServer::isAnonymousAuthenticationAllowed() const
匿名認証が許可されている場合、true を返します。
setAnonymousAuthenticationAllowed()も参照してください 。
bool QDBusServer::isConnected() const
このQDBusServer オブジェクトが接続されている場合、true を返します。
接続されていない場合は、コンストラクタを再度呼び出す必要があります。
QDBusError QDBusServer::lastError() const
このサーバーで発生した直近のエラーを返します。
この関数は、低レベルのコード向けに提供されています。
[signal] void QDBusServer::newConnection(const QDBusConnection &connection)
このシグナルは、サーバーへの新しいクライアント接続connection が確立されたときに発生します。
void QDBusServer::setAnonymousAuthenticationAllowed(bool value)
value が true に設定されている場合、接続元のクライアントがユーザーとして認証されていなくても、着信接続を続行することができます。
デフォルトでは、この値は false です。
isAnonymousAuthenticationAllowed()も参照してください 。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.