summaryrefslogtreecommitdiffstats
path: root/qt/connection.cpp
diff options
context:
space:
mode:
authorZack Rusin <zack@kde.org>2004-01-26 07:46:55 +0000
committerZack Rusin <zack@kde.org>2004-01-26 07:46:55 +0000
commitd138ac8d1f41699ce9d4156e0a479d4d708240e7 (patch)
tree0e20be97115299a938e1ccfcc89049e0e159d1fa /qt/connection.cpp
parentf02a9001f27ef47f70373aaf426d976ae5187f9e (diff)
Slightily modified patch from Alex (blarf). I'll have to rething the access
to dbus internals from the wrappers.
Diffstat (limited to 'qt/connection.cpp')
-rw-r--r--qt/connection.cpp22
1 files changed, 21 insertions, 1 deletions
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"