dbus 0.1.9 → 0.1.10
Sign up to get free protection for your applications and to get access to all the features.
- data/ext/extconf.rb +9 -10
- data/ext/ruby-dbus-connection.c +23 -0
- data/lib/dbus/version.rb +1 -1
- data/test/tc_connection.rb +1 -0
- metadata +6 -6
data/ext/extconf.rb
CHANGED
@@ -1,15 +1,11 @@
|
|
1
|
-
|
2
|
-
require 'mkmf-gnome2'
|
3
|
-
rescue
|
4
|
-
$stderr.puts "ERROR: you do not have the Ruby Glib2 bindings installed"
|
5
|
-
exit 1
|
6
|
-
end
|
1
|
+
require 'mkmf'
|
7
2
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
3
|
+
pkg_config('dbus-1')
|
4
|
+
pkg_config('dbus-glib-1')
|
5
|
+
pkg_config('glib-2.0')
|
6
|
+
pkg_config('gthread-2.0')
|
12
7
|
|
8
|
+
# must-have API
|
13
9
|
%w[dbus_connection_setup_with_g_main dbus_server_setup_with_g_main dbus_bus_get].each do |f|
|
14
10
|
unless have_func(f)
|
15
11
|
$stderr.puts "\nERROR: missing function #{f}, aborting."
|
@@ -17,6 +13,9 @@ PKGConfig.have_package('gthread-2.0')
|
|
17
13
|
end
|
18
14
|
end
|
19
15
|
|
16
|
+
# new (optional) API
|
17
|
+
have_func('dbus_connection_has_messages_to_send')
|
18
|
+
|
20
19
|
debug = ARGV.shift
|
21
20
|
if debug == "--debug"
|
22
21
|
$CPPFLAGS << " -DRDBUS_DEBUG"
|
data/ext/ruby-dbus-connection.c
CHANGED
@@ -701,6 +701,25 @@ cDBusConnection_list_registered(VALUE self, VALUE parent_path)
|
|
701
701
|
return ret;
|
702
702
|
}
|
703
703
|
|
704
|
+
/*
|
705
|
+
* call-seq:
|
706
|
+
* has_messages_to_send => true|false
|
707
|
+
*
|
708
|
+
* Checks whether there are messages in the outgoing message queue.
|
709
|
+
*
|
710
|
+
* Since D-BUS 0.23, DBus/Ruby 0.1.10.
|
711
|
+
*
|
712
|
+
*/
|
713
|
+
#ifdef HAVE_DBUS_CONNECTION_HAS_MESSAGES_TO_SEND
|
714
|
+
static VALUE
|
715
|
+
cDBusConnection_has_messages_to_send(VALUE self)
|
716
|
+
{
|
717
|
+
if (dbus_connection_has_messages_to_send(CONN_GET(self)))
|
718
|
+
return Qtrue;
|
719
|
+
return Qfalse;
|
720
|
+
}
|
721
|
+
#endif
|
722
|
+
|
704
723
|
/*
|
705
724
|
* Document-module: DBus::Binding
|
706
725
|
*
|
@@ -761,4 +780,8 @@ Init_dbus_connection()
|
|
761
780
|
rb_define_method(cDBusConnection, "register_object_path", cDBusConnection_register_object_path, 3);
|
762
781
|
rb_define_method(cDBusConnection, "register_fallback", cDBusConnection_register_fallback, 3);
|
763
782
|
rb_define_method(cDBusConnection, "list_registered", cDBusConnection_list_registered, 1);
|
783
|
+
|
784
|
+
#ifdef HAVE_DBUS_CONNECTION_HAS_MESSAGES_TO_SEND
|
785
|
+
rb_define_method(cDBusConnection, "has_messages_to_send", cDBusConnection_has_messages_to_send, 0);
|
786
|
+
#endif
|
764
787
|
}
|
data/lib/dbus/version.rb
CHANGED
data/test/tc_connection.rb
CHANGED
@@ -40,6 +40,7 @@ class TC_DBusConnection < Test::Unit::TestCase
|
|
40
40
|
|
41
41
|
def test_attr
|
42
42
|
conn = DBus::Binding::bus_get(DBus::BUS_SYSTEM)
|
43
|
+
assert(conn.has_messages_to_send == false) if conn.respond_to?(:has_messages_to_send)
|
43
44
|
assert(conn.get_max_message_size.is_a?(Numeric))
|
44
45
|
conn.set_max_message_size(5)
|
45
46
|
assert(conn.get_max_message_size == 5)
|
metadata
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
|
-
rubygems_version: 0.8.
|
2
|
+
rubygems_version: 0.8.4
|
3
3
|
specification_version: 1
|
4
4
|
name: dbus
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.1.
|
7
|
-
date:
|
6
|
+
version: 0.1.10
|
7
|
+
date: 2005-01-24
|
8
8
|
summary: Ruby bindings for D-BUS.
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -29,12 +29,12 @@ authors:
|
|
29
29
|
files:
|
30
30
|
- examples/example-signal-emitter.rb
|
31
31
|
- examples/list-session-services.rb
|
32
|
-
- examples/example-signal-recipient.rb
|
33
32
|
- examples/list-system-services.rb
|
34
|
-
- examples/
|
33
|
+
- examples/example-signal-recipient.rb
|
35
34
|
- examples/example-client.rb
|
36
|
-
- examples/gconf-proxy-
|
35
|
+
- examples/gconf-proxy-client.rb
|
37
36
|
- examples/example-service.rb
|
37
|
+
- examples/gconf-proxy-service.rb
|
38
38
|
- examples/volumed.rb
|
39
39
|
- ext/ruby-dbus-message-iter.c
|
40
40
|
- ext/ruby-dbus-message.c
|