Class | DBus::Binding::DBusPendingCall |
In: |
ruby-dbus.c
|
Parent: | Object |
A DBusPendingCall is used to retrieve asynchronous replies to method call messages.
The new method of this class is not available for invocation.
/* * call-seq: * new => self * * The new method of this class is not available for invocation. */ VALUE rdbus_private_method(VALUE klass) { rb_raise(rb_eNoMethodError, "Method is unavailable to non-native methods"); return Qnil; }
Blocks until the pending call is completed and a reply is available.
The blocking behaviour is the same as that for DBusConnection#send_with_reply_and_block.
/* * call-seq: * block => nil * * Blocks until the pending call is completed and a reply is * available. * * The blocking behaviour is the same as that for * DBusConnection#send_with_reply_and_block. */ static VALUE cDBusPendingCall_block(VALUE self) { dbus_pending_call_block(CALL_GET(self)); return Qnil; }
Cancels the pending call, any reply or error received will be ignored.
/* * call-seq: * cancel => nil * * Cancels the pending call, any reply or error received will be * ignored. */ static VALUE cDBusPendingCall_cancel(VALUE self) { dbus_pending_call_cancel(CALL_GET(self)); return Qnil; }
Returns true if the pending call has received a reply.
/* * call-seq: * get_completed => true|false * * Returns +true+ if the pending call has received a reply. */ static VALUE cDBusPendingCall_get_completed(VALUE self) { if (dbus_pending_call_get_completed(CALL_GET(self))) return Qtrue; return Qfalse; }
Returns the reply DBusMessage, or nil if no reply has been received yet.
/* * call-seq: * get_reply => message * * Returns the reply DBusMessage, or +nil+ if no reply * has been received yet. */ static VALUE cDBusPendingCall_get_reply(VALUE self) { DBusMessage *msg = NULL; msg = dbus_pending_call_get_reply(CALL_GET(self)); if (msg != NULL) return MSG_NEW(msg); return Qnil; }