From d138ac8d1f41699ce9d4156e0a479d4d708240e7 Mon Sep 17 00:00:00 2001 From: Zack Rusin Date: Mon, 26 Jan 2004 07:46:55 +0000 Subject: Slightily modified patch from Alex (blarf). I'll have to rething the access to dbus internals from the wrappers. --- qt/connection.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) (limited to 'qt/connection.cpp') diff --git a/qt/connection.cpp b/qt/connection.cpp index 0dc7e33b..58bfeb75 100644 --- a/qt/connection.cpp +++ b/qt/connection.cpp @@ -33,9 +33,11 @@ struct Connection::Private int connectionSlot; DBusError error; Integrator *integrator; + int timeout; }; -Connection::Connection( const QString& host ) +Connection::Connection( const QString& host, QObject *parent ) + : QObject( parent ) { d = new Private; @@ -46,6 +48,7 @@ Connection::Connection( const QString& host ) void Connection::init( const QString& host ) { dbus_error_init( &d->error ); + d->timeout = -1; d->connection = dbus_connection_open( host.ascii(), &d->error ); d->integrator = new Integrator( d->connection, this ); connect( d->integrator, SIGNAL(readReady()), @@ -94,12 +97,29 @@ Connection::Connection( DBusConnection *connection, QObject *parent ) : QObject( parent ) { d = new Private; + dbus_error_init( &d->error ); + d->timeout = -1; d->connection = connection; d->integrator = new Integrator( d->connection, this ); connect( d->integrator, SIGNAL(readReady()), SLOT(dispatchRead()) ); } +void Connection::send( const Message& ) +{ +} + +void Connection::sendWithReply( const Message& ) +{ +} + +Message Connection::sendWithReplyAndBlock( const Message &m ) +{ + DBusMessage *reply; + reply = dbus_connection_send_with_reply_and_block( d->connection, m.message(), d->timeout, &d->error ); + return Message( reply ); +} + ///////////////////////////////////////////////////////// #include "connection.moc" -- cgit