QDBusServer 类

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 = Q_NULLPTR)
QDBusServer (QObject * parent = Q_NULLPTR)
virtual ~QDBusServer ()
QString address () const
bool isAnonymousAuthenticationAllowed () const
bool isConnected () const
QDBusError lastError () const
void setAnonymousAuthenticationAllowed (bool value )

信号

void newConnection (const QDBusConnection & connection )

额外继承成员

详细描述

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

成员函数文档编制

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

构造 QDBusServer 采用给定 address ,和给定 parent .

QDBusServer:: QDBusServer ( QObject * parent = Q_NULLPTR)

构造 QDBusServer 采用给定 parent 。服务器将监听连接在 /tmp (在 Unix 系统) 或在绑定到本地主机 (其它地方) 的 TCP 端口。

[virtual] 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 ().