dbus 0.1.9 → 0.1.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,15 +1,11 @@
1
- begin
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
- PKGConfig.have_package('dbus-1')
9
- PKGConfig.have_package('dbus-glib-1')
10
- PKGConfig.have_package('glib-2.0')
11
- PKGConfig.have_package('gthread-2.0')
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"
@@ -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
  }
@@ -13,7 +13,7 @@ module DBus
13
13
  module BindingVersion
14
14
  VERSION_MAJOR = 0
15
15
  VERSION_MINOR = 1
16
- VERSION_PATCH = 9
16
+ VERSION_PATCH = 10
17
17
  end
18
18
 
19
19
  # Contains the string version of the D-BUS bindings
@@ -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.3
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.9
7
- date: 2004-12-28
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/gconf-proxy-client.rb
33
+ - examples/example-signal-recipient.rb
35
34
  - examples/example-client.rb
36
- - examples/gconf-proxy-service.rb
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