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()

を破壊する。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()も参照

© 2025 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.