QDBusServer 類

The QDBusServer class provides peer-to-peer communication between processes on the same computer. 更多...

頭: #include <QDBusServer>
qmake: QT += dbus
繼承: QObject

公共函數

QDBusServer (const QString & address , QObject * parent = nullptr)
QDBusServer (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 )

靜態公共成員

const QMetaObject staticMetaObject

額外繼承成員

詳細描述

The QDBusServer class provides peer-to-peer communication between processes on the same computer.

成員函數文檔編製

QDBusServer:: QDBusServer (const QString & address , QObject * parent = nullptr)

構造 QDBusServer 采用給定 address ,和給定 parent .

QDBusServer:: QDBusServer ( QObject * parent = nullptr)

構造 QDBusServer 采用給定 parent 。服務器將監聽連接在 /tmp (在 Unix 係統) 或在綁定到本地主機 (其它地方) 的 TCP 端口。

[虛擬] QDBusServer:: ~QDBusServer ()

銷毀 QDBusServer

QString QDBusServer:: address () const

返迴此服務器關聯的地址。

bool QDBusServer:: isAnonymousAuthenticationAllowed () const

返迴 true 若允許匿名身份驗證。

該函數在 Qt 5.3 引入。

另請參閱 setAnonymousAuthenticationAllowed ().

bool QDBusServer:: isConnected () const

返迴 true 若此 QDBusServer 對象被連接。

若未連接,需要再次調用構造函數。

QDBusError QDBusServer:: lastError () const

返迴此服務器最後發生的錯誤。

此函數是為低級代碼提供的。

[signal] void QDBusServer:: newConnection (const QDBusConnection & connection )

此信號發射,當新的客戶端連接 connection 到服務器已建立。

void QDBusServer:: setAnonymousAuthenticationAllowed ( bool value )

value 被設為 true,傳入連接可以繼續進行,即使作為用戶連接客戶端未通過身份驗證。

默認情況下,此值為 false。

該函數在 Qt 5.3 引入。

另請參閱 isAnonymousAuthenticationAllowed ().