[libnet-dbus-perl] 07/335: Moved from DBus to Net::DBus & Net::DBus::Binding

Intrigeri intrigeri at moszumanska.debian.org
Sat Mar 21 01:07:10 UTC 2015


This is an automated email from the git hooks/post-receive script.

intrigeri pushed a commit to branch experimental
in repository libnet-dbus-perl.

commit 405594387302520e51c0e31b5a2a7ad271d640f6
Author: Daniel P. Berrange <dan at berrange.com>
Date:   Thu Sep 30 21:54:44 2004 +0000

    Moved from DBus to Net::DBus & Net::DBus::Binding
---
 .cvsignore                                         |  6 ++
 DBus.spec.PL                                       | 77 ++++++++++++++++++++++
 DBus.xs                                            | 48 +++++++-------
 Makefile.PL                                        |  6 +-
 examples/client.pl                                 |  8 +--
 examples/hello.pl                                  |  6 +-
 examples/list-services.pl                          |  4 +-
 examples/server.pl                                 |  8 +--
 examples/service.pl                                | 16 ++---
 lib/DBus/Watch.pm                                  | 32 ---------
 lib/{ => Net}/DBus.pm                              | 32 ++++-----
 lib/{DBus => Net/DBus/Binding}/Bus.pm              | 17 +++--
 lib/{DBus => Net/DBus/Binding}/Connection.pm       | 46 ++++++-------
 lib/{DBus => Net/DBus/Binding}/Iterator.pm         | 46 ++++++-------
 lib/{DBus => Net/DBus/Binding}/Message.pm          | 58 ++++++++--------
 lib/{DBus => Net/DBus/Binding}/Message/Error.pm    | 10 +--
 .../DBus/Binding}/Message/MethodCall.pm            | 10 +--
 .../DBus/Binding}/Message/MethodReturn.pm          | 10 +--
 lib/{DBus => Net/DBus/Binding}/Message/Signal.pm   | 10 +--
 lib/{DBus => Net/DBus/Binding}/Server.pm           | 28 ++++----
 lib/Net/DBus/Binding/Watch.pm                      | 32 +++++++++
 lib/{ => Net}/DBus/Callback.pm                     |  3 +-
 lib/{ => Net}/DBus/Object.pm                       | 33 +++++-----
 lib/{ => Net}/DBus/Reactor.pm                      | 64 +++++++++---------
 lib/{ => Net}/DBus/RemoteObject.pm                 | 12 ++--
 lib/{ => Net}/DBus/RemoteService.pm                | 12 ++--
 lib/{ => Net}/DBus/Service.pm                      |  2 +-
 t/00-constants.t                                   | 18 ++---
 t/15-message.t                                     | 16 ++---
 t/20-callback.t                                    | 20 +++---
 t/25-reactor.t                                     | 18 ++---
 t/30-server.t                                      | 14 ++--
 typemap                                            | 12 ++--
 33 files changed, 407 insertions(+), 327 deletions(-)

diff --git a/.cvsignore b/.cvsignore
new file mode 100644
index 0000000..24b86e9
--- /dev/null
+++ b/.cvsignore
@@ -0,0 +1,6 @@
+DBus.bs
+DBus.c
+DBus.spec
+Makefile
+blib
+pm_to_blib
diff --git a/DBus.spec.PL b/DBus.spec.PL
new file mode 100644
index 0000000..5782b9a
--- /dev/null
+++ b/DBus.spec.PL
@@ -0,0 +1,77 @@
+# Copyright (C) 2001-2004 Daniel Berrange <dan at berrange.com>
+#
+# $Id: DBus.spec.PL,v 1.1 2004/09/30 22:54:44 dan Exp $
+
+use strict;
+
+die unless (scalar @ARGV == 1);
+
+open SRC, "lib/Net/DBus.pm"
+    or die "lib/Net/DBus.pm: $!";
+
+our $VERSION;
+while (<SRC>) {
+    if (/$VERSION\s*=\s*'(.*)'/) {
+	$VERSION=$1;
+    }
+}
+close SRC;
+
+		
+local $/ = undef;
+$_ = <DATA>;
+s/\@VERSION\@/$VERSION/g;
+
+open SPEC, ">$ARGV[0]" or die "$!";
+print SPEC $_;
+close SPEC;
+__DATA__
+# Automatically generated by DBus.spec.PL
+
+%define perlsitearch %(perl -e 'use Config; print $Config{installsitearch}')
+%define perlsitelib %(perl -e 'use Config; print $Config{installsitelib}')
+%define perlsiteprefix %(perl -e 'use Config; print $Config{siteprefix}')
+%define perlsiteman3 %{perlsiteprefix}/share/man/man3
+%define perlversion %(perl -e 'use Config; print $Config{version}')
+
+%define appname Net-DBus
+
+Summary: Perl API to the DBus message system
+Name: perl-%{appname}
+Version: @VERSION@
+Release: 1
+Copyright: GPL/Artistic
+Group: Applications/Internet
+Source: %{appname}-%{version}.tar.gz
+BuildRoot: /var/tmp/%{appname}-%{version}-root
+BuildArchitectures: noarch
+Requires: perl = %{perlversion}
+Requires: dbus = 0.21
+
+%description
+Provides a Perl API to the DBus message system
+ 
+%prep
+%setup -q -n %{appname}-%{version}
+
+
+%build
+perl Makefile.PL PREFIX=$RPM_BUILD_ROOT/usr INSTALLDIRS=vendor
+make
+
+
+%install
+rm -rf $RPM_BUILD_ROOT
+make install INSTALLSITEMAN3DIR=$RPM_BUILD_ROOT%{perlsiteman3}
+find $RPM_BUILD_ROOT%{perlsitearch} -name perllocal.pod -exec rm -f {} \;
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+
+%files
+%defattr(-,root,root)
+%doc README
+%{perlsiteman3}/*
+%{perlsitelib}/Net/DBus/
+%{perlsitearch}/auto/Net-DBus
diff --git a/DBus.xs b/DBus.xs
index 523cc06..eb0bbbe 100644
--- a/DBus.xs
+++ b/DBus.xs
@@ -58,7 +58,7 @@ _watch_generic(DBusWatch *watch, void *data, char *key, dbus_bool_t server) {
     PUSHMARK(SP);
     XPUSHs(selfref);
     h_sv2 = sv_newmortal();
-    sv_setref_pv(h_sv2, "DBus::C::Watch", (void*)watch);
+    sv_setref_pv(h_sv2, "Net::DBus::Binding::C::Watch", (void*)watch);
     XPUSHs(h_sv2);
     PUTBACK;
 
@@ -124,7 +124,7 @@ _timeout_generic(DBusTimeout *timeout, void *data, char *key, dbus_bool_t server
     PUSHMARK(SP);
     XPUSHs((SV*)selfref);
     h_sv2 = sv_newmortal();
-    sv_setref_pv(h_sv2, "DBus::C::Timeout", (void*)timeout);
+    sv_setref_pv(h_sv2, "Net::DBus::Binding::C::Timeout", (void*)timeout);
     XPUSHs(h_sv2);
     PUTBACK;
 
@@ -185,7 +185,7 @@ _connection_callback (DBusServer *server,
     dbus_connection_ref(new_connection);
 
     value = sv_newmortal();
-    sv_setref_pv(value, "DBus::C::Connection", (void*)new_connection);
+    sv_setref_pv(value, "Net::DBus::Binding::C::Connection", (void*)new_connection);
 
     ENTER;
     SAVETMPS;
@@ -224,7 +224,7 @@ _message_filter(DBusConnection *con,
     /* Will be de-refed in the DESTROY method */
     dbus_message_ref(msg);
     value = sv_newmortal();
-    sv_setref_pv(value, "DBus::C::Message", (void*)msg);
+    sv_setref_pv(value, "Net::DBus::Binding::C::Message", (void*)msg);
 
     ENTER;
     SAVETMPS;
@@ -277,7 +277,7 @@ _path_message_callback(DBusConnection *con,
     /* Will be de-refed in the DESTROY method */
     dbus_message_ref(msg);
     value = sv_newmortal();
-    sv_setref_pv(value, "DBus::C::Message", (void*)msg);
+    sv_setref_pv(value, "Net::DBus::Binding::C::Message", (void*)msg);
 
     ENTER;
     SAVETMPS;
@@ -310,7 +310,7 @@ _populate_constant(HV *href, char *name, int val)
 
 #define REGISTER_CONSTANT(name, key) _populate_constant(constants, #key, name)
 
-MODULE = DBus		PACKAGE = DBus		
+MODULE = Net::DBus		PACKAGE = Net::DBus		
 
 PROTOTYPES: ENABLE
 BOOT:
@@ -319,12 +319,12 @@ BOOT:
 
         /* not the 'standard' way of doing perl constants, but a lot easier to maintain */
 
-        constants = perl_get_hv("DBus::Bus::_constants", TRUE);
+        constants = perl_get_hv("Net::DBus::Binding::Bus::_constants", TRUE);
         REGISTER_CONSTANT(DBUS_BUS_SYSTEM, SYSTEM);
         REGISTER_CONSTANT(DBUS_BUS_SESSION, SESSION);
         REGISTER_CONSTANT(DBUS_BUS_ACTIVATION, ACTIVATION);
 
-        constants = perl_get_hv("DBus::Message::_constants", TRUE);
+        constants = perl_get_hv("Net::DBus::Binding::Message::_constants", TRUE);
         REGISTER_CONSTANT(DBUS_TYPE_ARRAY, TYPE_ARRAY);
         REGISTER_CONSTANT(DBUS_TYPE_BOOLEAN, TYPE_BOOLEAN);
         REGISTER_CONSTANT(DBUS_TYPE_BYTE, TYPE_BYTE);
@@ -346,7 +346,7 @@ BOOT:
 	REGISTER_CONSTANT(DBUS_MESSAGE_TYPE_SIGNAL, MESSAGE_TYPE_SIGNAL);
 	REGISTER_CONSTANT(DBUS_MESSAGE_TYPE_INVALID, MESSAGE_TYPE_INVALID);
 	
-        constants = perl_get_hv("DBus::Watch::_constants", TRUE);
+        constants = perl_get_hv("Net::DBus::Binding::Watch::_constants", TRUE);
         REGISTER_CONSTANT(DBUS_WATCH_READABLE, READABLE);
         REGISTER_CONSTANT(DBUS_WATCH_WRITABLE, WRITABLE);
         REGISTER_CONSTANT(DBUS_WATCH_ERROR, ERROR);
@@ -357,7 +357,7 @@ BOOT:
     }
 
 
-MODULE = DBus::Connection		PACKAGE = DBus::Connection
+MODULE = Net::DBus::Binding::Connection		PACKAGE = Net::DBus::Binding::Connection
 
 PROTOTYPES: ENABLE
 
@@ -380,7 +380,7 @@ _open(address)
     OUTPUT:
         RETVAL
 
-MODULE = DBus::C::Connection		PACKAGE = DBus::C::Connection
+MODULE = Net::DBus::Binding::C::Connection		PACKAGE = Net::DBus::Binding::C::Connection
 
 void
 _set_owner(con, owner)
@@ -535,7 +535,7 @@ DESTROY(con)
         dbus_connection_unref(con);
 
 
-MODULE = DBus::Server		PACKAGE = DBus::Server
+MODULE = Net::DBus::Binding::Server		PACKAGE = Net::DBus::Binding::Server
 
 PROTOTYPES: ENABLE
 
@@ -563,7 +563,7 @@ _open(address)
         RETVAL
 
 
-MODULE = DBus::C::Server		PACKAGE = DBus::C::Server
+MODULE = Net::DBus::Binding::C::Server		PACKAGE = Net::DBus::Binding::C::Server
 
 void
 _set_owner(server, owner)
@@ -623,7 +623,7 @@ DESTROY(server)
         dbus_server_unref(server);
 
 
-MODULE = DBus::Bus		PACKAGE = DBus::Bus
+MODULE = Net::DBus::Binding::Bus		PACKAGE = Net::DBus::Binding::Bus
 
 PROTOTYPES: ENABLE
 
@@ -646,7 +646,7 @@ _open(type)
     OUTPUT:
         RETVAL
 
-MODULE = DBus::Message		PACKAGE = DBus::Message
+MODULE = Net::DBus::Binding::Message		PACKAGE = Net::DBus::Binding::Message
 
 PROTOTYPES: ENABLE
 
@@ -697,7 +697,7 @@ _iterator(msg)
         RETVAL
 
 
-MODULE = DBus::C::Message		PACKAGE = DBus::C::Message
+MODULE = Net::DBus::Binding::C::Message		PACKAGE = Net::DBus::Binding::C::Message
 
 void
 DESTROY(msg)
@@ -734,7 +734,7 @@ const char *
 dbus_message_get_member(msg)
 	DBusMessage *msg;
 
-MODULE = DBus::Message::Signal		PACKAGE = DBus::Message::Signal
+MODULE = Net::DBus::Binding::Message::Signal		PACKAGE = Net::DBus::Binding::Message::Signal
 
 PROTOTYPES: ENABLE
 
@@ -760,7 +760,7 @@ _create(path, interface, name)
     OUTPUT:
         RETVAL
 
-MODULE = DBus::Message::MethodCall		PACKAGE = DBus::Message::MethodCall
+MODULE = Net::DBus::Binding::Message::MethodCall		PACKAGE = Net::DBus::Binding::Message::MethodCall
 
 PROTOTYPES: ENABLE
 
@@ -787,7 +787,7 @@ _create(service, path, interface, method)
     OUTPUT:
         RETVAL
 
-MODULE = DBus::Message::MethodReturn		PACKAGE = DBus::Message::MethodReturn
+MODULE = Net::DBus::Binding::Message::MethodReturn		PACKAGE = Net::DBus::Binding::Message::MethodReturn
 
 PROTOTYPES: ENABLE
 
@@ -811,7 +811,7 @@ _create(call)
     OUTPUT:
         RETVAL
 
-MODULE = DBus::Message::Error		PACKAGE = DBus::Message::Error
+MODULE = Net::DBus::Binding::Message::Error		PACKAGE = Net::DBus::Binding::Message::Error
 
 PROTOTYPES: ENABLE
 
@@ -838,7 +838,7 @@ _create(replyto, name, message)
         RETVAL
 
 
-MODULE = DBus::C::Watch			PACKAGE = DBus::C::Watch
+MODULE = Net::DBus::Binding::C::Watch			PACKAGE = Net::DBus::Binding::C::Watch
 
 int
 get_fileno(watch)
@@ -889,7 +889,7 @@ set_data(watch, data)
         dbus_watch_set_data(watch, data, NULL);
 
 
-MODULE = DBus::C::Timeout			PACKAGE = DBus::C::Timeout
+MODULE = Net::DBus::Binding::C::Timeout			PACKAGE = Net::DBus::Binding::C::Timeout
 
 int
 get_interval(timeout)
@@ -929,7 +929,7 @@ set_data(timeout, data)
     CODE:
         dbus_timeout_set_data(timeout, data, NULL);
 
-MODULE = DBus::Iterator PACKAGE = DBus::Iterator
+MODULE = Net::DBus::Binding::Iterator PACKAGE = Net::DBus::Binding::Iterator
 
 int
 get_arg_type(iter)
@@ -1126,4 +1126,4 @@ DESTROY(iter)
         PD_DEBUG("Destroying iterator %x\n", iter);
         dbus_free(iter);
 
-MODULE = DBus		PACKAGE = DBus		
+MODULE = Net::DBus		PACKAGE = Net::DBus
diff --git a/Makefile.PL b/Makefile.PL
index 9a3ac7b..7218f72 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -22,13 +22,13 @@ foreach (@ARGV) {
 }
 
 WriteMakefile(
-    'NAME' => 'DBus',
-    'VERSION_FROM' => 'lib/DBus.pm',
+    'NAME' => 'Net::DBus',
+    'VERSION_FROM' => 'lib/Net/DBus.pm',
     'PREREQ_PM' => {
         'Test::More'  => 0,
         'Time::HiRes' => 0,
     },
-    'ABSTRACT_FROM' => 'lib/DBus.pm',
+    'ABSTRACT_FROM' => 'lib/Net/DBus.pm',
     'AUTHOR' => 'Daniel Berrange <dan at berrange.com>',
     'LIBS' => ["-L$DBUS_HOME/lib -ldbus-1"], 
     'DEFINE' => "-DDBUS_API_SUBJECT_TO_CHANGE $PD_DEBUG",
diff --git a/examples/client.pl b/examples/client.pl
index 63c7564..571c9a8 100644
--- a/examples/client.pl
+++ b/examples/client.pl
@@ -4,11 +4,11 @@ use strict;
 
 $ENV{DBUS_VERBOSE} = 1;
 
-use DBus::Connection;
-use DBus::Reactor;
+use Net::DBus::Binding::Connection;
+use Net::DBus::Reactor;
 
-my $con = DBus::Connection->new(address => "unix:path=/tmp/dbus-perl-test");
-my $reactor = DBus::Reactor->new();
+my $con = Net::DBus::Binding::Connection->new(address => "unix:path=/tmp/dbus-perl-test");
+my $reactor = Net::DBus::Reactor->new();
 $reactor->manage($con);
 $reactor->run();
 
diff --git a/examples/hello.pl b/examples/hello.pl
index 56e494c..7893a3c 100644
--- a/examples/hello.pl
+++ b/examples/hello.pl
@@ -1,10 +1,8 @@
 #/usr/bin/perl
 
+use Net::DBus;
 
-use DBus;
-
-
-my $bus = DBus->new($DBus::TYPE_SESSION);
+my $bus = Net::DBus->new($Net::DBus::TYPE_SESSION);
 
 my $service = $bus->get_service("org.example.MyService",
 				$bus);
diff --git a/examples/list-services.pl b/examples/list-services.pl
index 7e9562c..2acc2d7 100644
--- a/examples/list-services.pl
+++ b/examples/list-services.pl
@@ -1,9 +1,9 @@
 #!/usr/bin/perl
 
-use DBus;
+use Net::DBus;
 
 # Connect to the system bus
-my $bus = DBus->new($DBus::TYPE_SESSION);
+my $bus = Net::DBus->new($Net::DBus::TYPE_SESSION);
 
 # Get the service provided by the dbus-daemon named org.freedesktop.DBus
 my $service = $bus->get_service("org.freedesktop.DBus");
diff --git a/examples/server.pl b/examples/server.pl
index ed620d8..736f4ba 100644
--- a/examples/server.pl
+++ b/examples/server.pl
@@ -4,14 +4,14 @@ use strict;
 
 $ENV{DBUS_VERBOSE} = 1;
 
-use DBus::Server;
-use DBus::Reactor;
+use Net::DBus::Binding::Server;
+use Net::DBus::Reactor;
 
-my $server = DBus::Server->new(address => "unix:path=/tmp/dbus-perl-test");
+my $server = Net::DBus::Binding::Server->new(address => "unix:path=/tmp/dbus-perl-test");
 
 $server->set_connection_callback(\&new_con);
 
-my $reactor = DBus::Reactor->new();
+my $reactor = Net::DBus::Reactor->new();
 $reactor->manage($server);
 
 $reactor->run();
diff --git a/examples/service.pl b/examples/service.pl
index 7c4c88e..948fe41 100644
--- a/examples/service.pl
+++ b/examples/service.pl
@@ -1,22 +1,22 @@
 #!/usr/bin/perl
 
 use Carp qw(confess cluck);
-use DBus;
-use DBus::Service;
-use DBus::Reactor;
+use Net::DBus;
+use Net::DBus::Service;
+use Net::DBus::Reactor;
 
 #$SIG{__WARN__} = sub { cluck $_[0] };
 #$SIG{__DIE__} = sub { confess $_[0] };
 
-my $bus = DBus->new($DBus::TYPE_SESSION);
+my $bus = Net::DBus->new($Net::DBus::TYPE_SYSTEM);
 
-my $service = DBus::Service->new("org.example.MyService", 
-				 $bus);
+my $service = Net::DBus::Service->new("org.example.MyService", 
+				      $bus);
 
 my $object = MyObject->new($service);
 
 
-my $reactor = DBus::Reactor->new();
+my $reactor = Net::DBus::Reactor->new();
 print "Con ", $bus->{connection}, "\n";
 $reactor->manage($bus->{connection});
 
@@ -26,7 +26,7 @@ print "All done\n";
 
 package MyObject;
 
-use base qw(DBus::Object);
+use base qw(Net::DBus::Object);
 
 sub new {
     my $class = shift;
diff --git a/lib/DBus/Watch.pm b/lib/DBus/Watch.pm
deleted file mode 100644
index 27db551..0000000
--- a/lib/DBus/Watch.pm
+++ /dev/null
@@ -1,32 +0,0 @@
-package DBus::Watch;
-
-use 5.006;
-use strict;
-use warnings;
-use Carp;
-
-use DBus;
-
-sub AUTOLOAD {
-    # This AUTOLOAD is used to 'autoload' constants from the constant()
-    # XS function.
-
-    my $constname;
-    our $AUTOLOAD;
-    ($constname = $AUTOLOAD) =~ s/.*:://;
-
-    croak "&DBus::Watch::constant not defined" if $constname eq '_constant';
-
-    if (!exists $DBus::Watch::_constants{$constname}) {
-        croak "no such constant \$DBus::Watch::$constname";
-    }
-
-    {
-	no strict 'refs';
-	*$AUTOLOAD = sub { $DBus::Watch::_constants{$constname} };
-    }
-    goto &$AUTOLOAD;
-}
-
-1;
-__END__
diff --git a/lib/DBus.pm b/lib/Net/DBus.pm
similarity index 79%
rename from lib/DBus.pm
rename to lib/Net/DBus.pm
index a737757..ffcd50b 100644
--- a/lib/DBus.pm
+++ b/lib/Net/DBus.pm
@@ -1,29 +1,29 @@
-package DBus;
+package Net::DBus;
 
 use 5.006;
 use strict;
 use warnings;
 use Carp;
 
-use DBus::Bus;
-use DBus::RemoteService;
+use Net::DBus::Binding::Bus;
+use Net::DBus::RemoteService;
 
 our $VERSION = '0.0.1';
 
 require XSLoader;
-XSLoader::load('DBus', $VERSION);
+XSLoader::load('Net::DBus', $VERSION);
 
 use vars qw($TYPE_SESSION $TYPE_SYSTEM);
 
-$TYPE_SESSION = &DBus::Bus::SESSION;
-$TYPE_SYSTEM = &DBus::Bus::SYSTEM;
+$TYPE_SESSION = &Net::DBus::Binding::Bus::SESSION;
+$TYPE_SYSTEM = &Net::DBus::Binding::Bus::SYSTEM;
 
 sub new {
     my $class = shift;
     my $self = {};
     my $type = shift;
 
-    $self->{connection} = DBus::Bus->new(type => $type);
+    $self->{connection} = Net::DBus::Binding::Bus->new(type => $type);
     $self->{signals} = {};
     
     bless $self, $class;
@@ -38,7 +38,7 @@ sub get_service {
     my $self = shift;
     my $name = @_ ? shift : "org.freedesktop.Broadcast";
     
-    return DBus::RemoteService->new($self->{connection}, $name);
+    return Net::DBus::RemoteService->new($self->{connection}, $name);
 }
 
 sub add_signal_receiver {
@@ -93,7 +93,7 @@ sub _signal_func {
     my $connection = shift;
     my $message = shift;
 
-    return 0 unless $message->isa("DBus::Message::Signal");
+    return 0 unless $message->isa("Net::DBus::Message::Signal");
     
     my $interface = $message->get_interface;
     my $service = $message->get_sender;
@@ -121,8 +121,8 @@ DBus - Perl extension for the DBus message system
 
 =head1 SYNOPSIS
 
-  use DBus::Connection;
-  use DBus::Server;
+  use Net::DBus::Connection;
+  use Net::DBus::Server;
 
 =head1 ABSTRACT
 
@@ -132,18 +132,18 @@ DBus provides a Perl API for the DBus message system.
 
 DBus provides a Perl API for the DBus message system.
 There is no need to access this module directly. It is
-used by other DBus::* module to trigger the autoloading
+used by other Net::DBus::* module to trigger the autoloading
 of the XS module containing the interface to the DBus
 API. The DBus Perl interface was written against version 
 0.21 of dbus, and has had rudimentary testing against the 
 development branch that will become 0.22. The two modules
-of main interest will be L<DBus::Connection> and 
-L<DBus::Server>.
+of main interest will be L<Net::DBus::Connection> and 
+L<Net::DBus::Server>.
 
 =head1 SEE ALSO
 
-L<DBus::Connection>, L<DBus::Server>, L<DBus::Message>, L<DBus::Reactor>,
-L<DBus::Bus>, L<DBus::Watch>, L<DBus::Iterator>,
+L<Net::DBus::Connection>, L<Net::DBus::Server>, L<Net::DBus::Message>, L<Net::DBus::Reactor>,
+L<Net::DBus::Bus>, L<Net::DBus::Watch>, L<Net::DBus::Iterator>,
 L<dbus-monitor(1)>, L<dbus-daemon-1(1)>, L<dbus-send(1)>, L<http://dbus.freedesktop.org>,
 
 =head1 AUTHOR
diff --git a/lib/DBus/Bus.pm b/lib/Net/DBus/Binding/Bus.pm
similarity index 57%
rename from lib/DBus/Bus.pm
rename to lib/Net/DBus/Binding/Bus.pm
index 3b95c31..83b06c8 100644
--- a/lib/DBus/Bus.pm
+++ b/lib/Net/DBus/Binding/Bus.pm
@@ -1,14 +1,13 @@
-package DBus::Bus;
+package Net::DBus::Binding::Bus;
 
 use 5.006;
 use strict;
 use warnings;
 use Carp;
 
-use DBus;
-use DBus::Connection;
+use Net::DBus;
 
-our @ISA = qw(DBus::Connection);
+use base qw(Net::DBus::Binding::Connection);
 
 our $VERSION = '0.0.1';
 
@@ -17,7 +16,7 @@ sub new {
     my $class = ref($proto) || $proto;
     my %params = @_;
 
-    my $connection = DBus::Bus::_open(defined $params{type} ? $params{type} : confess "type parameter is required");
+    my $connection = Net::DBus::Binding::Bus::_open(defined $params{type} ? $params{type} : confess "type parameter is required");
 
     my $self = $class->SUPER::new(%params, connection => $connection);
 
@@ -42,15 +41,15 @@ sub AUTOLOAD {
     our $AUTOLOAD;
     ($constname = $AUTOLOAD) =~ s/.*:://;
 
-    croak "&DBus::Bus::constant not defined" if $constname eq '_constant';
+    croak "&Net::DBus::Binding::Bus::constant not defined" if $constname eq '_constant';
 
-    if (!exists $DBus::Bus::_constants{$constname}) {
-        croak "no such constant \$DBus::Bus::$constname";
+    if (!exists $Net::DBus::Binding::Bus::_constants{$constname}) {
+        croak "no such constant \$Net::DBus::Binding::Bus::$constname";
     }
 
     {
 	no strict 'refs';
-	*$AUTOLOAD = sub { $DBus::Bus::_constants{$constname} };
+	*$AUTOLOAD = sub { $Net::DBus::Binding::Bus::_constants{$constname} };
     }
     goto &$AUTOLOAD;
 }
diff --git a/lib/DBus/Connection.pm b/lib/Net/DBus/Binding/Connection.pm
similarity index 85%
rename from lib/DBus/Connection.pm
rename to lib/Net/DBus/Binding/Connection.pm
index 02da67f..6347a51 100644
--- a/lib/DBus/Connection.pm
+++ b/lib/Net/DBus/Binding/Connection.pm
@@ -2,15 +2,15 @@
 
 =head1 NAME
 
-DBus::Connection - A connection between client and server
+Net::DBus::Binding::Connection - A connection between client and server
 
 =head1 SYNOPSIS
 
 Creating a connection to a server and sending a message
 
-  use DBus::Connection;
+  use Net::DBus::Binding::Connection;
 
-  my $con = DBus::Connection->new(address => "unix:path=/path/to/socket");
+  my $con = Net::DBus::Binding::Connection->new(address => "unix:path=/path/to/socket");
 
   $con->send($message);
 
@@ -29,7 +29,7 @@ Registering message handlers
 
 Hooking up to an event loop:
 
-  my $reactor = DBus::Reactor->new();
+  my $reactor = Net::DBus::Binding::Reactor->new();
 
   $reactor->manage($con);
 
@@ -49,21 +49,21 @@ may be of use.
 
 =cut
 
-package DBus::Connection;
+package Net::DBus::Binding::Connection;
 
 use 5.006;
 use strict;
 use warnings;
 use Carp;
 
-use DBus;
-use DBus::Message::MethodReturn;
+use Net::DBus;
+use Net::DBus::Binding::Message::MethodReturn;
 
 our $VERSION = '0.0.1';
 
 =pod
 
-=item my $con = DBus::Connection->new(address => "unix:path=/path/to/socket");
+=item my $con = Net::DBus::Binding::Connection->new(address => "unix:path=/path/to/socket");
 
 Creates a new connection to the remove server specified by
 the parameter C<address>. 
@@ -77,7 +77,7 @@ sub new {
     my $self = {};
 
     $self->{address} = exists $params{address} ? $params{address} : (exists $params{connection} ? "" : confess "address parameter is required");
-    $self->{connection} = exists $params{connection} ? $params{connection} : DBus::Connection::_open($self->{address});
+    $self->{connection} = exists $params{connection} ? $params{connection} : Net::DBus::Binding::Connection::_open($self->{address});
 
     bless $self, $class;
 
@@ -182,7 +182,7 @@ sub send {
 Queues a message up for sending to the remote host
 and blocks until it has been sent, and a corresponding
 reply received. The return value of this method will
-be a C<DBus::Message::MethodReturn> or C<DBus::Message::Error>
+be a C<Net::DBus::Binding::Message::MethodReturn> or C<Net::DBus::Binding::Message::Error>
 object.
 
 =cut
@@ -195,11 +195,11 @@ sub send_with_reply_and_block {
     my $reply = $self->{connection}->_send_with_reply_and_block($msg->{message}, $timeout);
 
     my $type = $reply->dbus_message_get_type;
-    if ($type == &DBus::Message::MESSAGE_TYPE_ERROR) {
-	return DBus::Message::Error->new(replyto => $msg,
+    if ($type == &Net::DBus::Binding::Message::MESSAGE_TYPE_ERROR) {
+	return Net::DBus::Binding::Message::Error->new(replyto => $msg,
 					 message => $reply);
-    } elsif ($type == &DBus::Message::MESSAGE_TYPE_METHOD_RETURN) {
-	return DBus::Message::MethodReturn->new(call => $msg,
+    } elsif ($type == &Net::DBus::Binding::Message::MESSAGE_TYPE_METHOD_RETURN) {
+	return Net::DBus::Binding::Message::MethodReturn->new(call => $msg,
 						message => $reply);
     } else {
 	confess "unknown method reply type $type";
@@ -242,7 +242,7 @@ sub borrow_message {
     my $self = shift;
     
     my $msg = $self->{connection}->dbus_connection_borrow_message();
-    return DBus::Message->new(message => $msg);
+    return Net::DBus::Binding::Message->new(message => $msg);
 }
 
 =pod
@@ -287,7 +287,7 @@ sub steal_message {
 Permanently removes the first message on the incoming
 message queue, without running any registered message
 handlers. If you have hooked the connection up to an
-event loop (C<DBus::Reactor> for example), you probably
+event loop (C<Net::DBus::Binding::Reactor> for example), you probably
 don't want to be calling this method.
 
 =cut
@@ -296,7 +296,7 @@ sub pop_message {
     my $self = shift;
     
     my $msg = $self->{connection}->dbus_connection_pop_message();
-    return DBus::Message->new(message => $msg);
+    return Net::DBus::Binding::Message->new(message => $msg);
 }
 
 =pod
@@ -307,7 +307,7 @@ Register a set of callbacks for adding, removing & updating
 watches in the application's event loop. Each parameter
 should be a code reference, which on each invocation, will be
 supplied with two parameters, the connection object and the
-watch object. If you are using a C<DBus::Reactor> object
+watch object. If you are using a C<Net::DBus::Binding::Reactor> object
 as the application event loop, then the 'manage' method on
 that object will call this on your behalf.
 
@@ -334,7 +334,7 @@ Register a set of callbacks for adding, removing & updating
 timeouts in the application's event loop. Each parameter
 should be a code reference, which on each invocation, will be
 supplied with two parameters, the connection object and the
-timeout object. If you are using a C<DBus::Reactor> object
+timeout object. If you are using a C<Net::DBus::Binding::Reactor> object
 as the application event loop, then the 'manage' method on
 that object will call this on your behalf.
 
@@ -362,7 +362,7 @@ that specified in the C<$path> parameter. The supplied
 code reference will be invoked with two parameters, the
 connection object on which the message was received,
 and the message to be processed (an instance of the
-C<DBus::Message> class).
+C<Net::DBus::Binding::Message> class).
 
 =cut
 
@@ -375,7 +375,7 @@ sub register_object_path {
 	my $con = shift;
 	my $msg = shift;
 
-	&$code($con, DBus::Message->new(message => $msg));
+	&$code($con, Net::DBus::Binding::Message->new(message => $msg));
     };
 
     $self->{connection}->_register_object_path($path, $callback);
@@ -465,7 +465,7 @@ sub _message_filter {
     my $rawmsg = shift;
     my $code = shift;
     
-    my $msg = DBus::Message->new(message => $rawmsg);
+    my $msg = Net::DBus::Binding::Message->new(message => $rawmsg);
     return &$code($self, $msg);
 }
 
@@ -477,7 +477,7 @@ sub _message_filter {
 
 =head1 SEE ALSO
 
-L<DBus::Server>, L<DBus::Bus>, L<DBus::Message::Signal>, L<DBus::Message::MethodCall>, L<DBus::Message::MethodReturn>, L<DBus::Message::Error>
+L<Net::DBus::Binding::Server>, L<Net::DBus::Binding::Bus>, L<Net::DBus::Binding::Message::Signal>, L<Net::DBus::Binding::Message::MethodCall>, L<Net::DBus::Binding::Message::MethodReturn>, L<Net::DBus::Binding::Message::Error>
 
 =head1 AUTHOR
 
diff --git a/lib/DBus/Iterator.pm b/lib/Net/DBus/Binding/Iterator.pm
similarity index 75%
rename from lib/DBus/Iterator.pm
rename to lib/Net/DBus/Binding/Iterator.pm
index 90905a6..e185960 100644
--- a/lib/DBus/Iterator.pm
+++ b/lib/Net/DBus/Binding/Iterator.pm
@@ -2,13 +2,13 @@
 
 =head1 NAME
 
-DBus::Iterator - Reading and writing message parameters
+Net::DBus::Binding::Iterator - Reading and writing message parameters
 
 =head1 SYNOPSIS
 
 Creating a new message
 
-  my $msg = new DBus::Message::Signal;
+  my $msg = new Net::DBus::Binding::Message::Signal;
   my $iterator = $msg->iterator;
 
   $iterator->append_boolean(1);
@@ -45,7 +45,7 @@ are bugs in the Quad support (ie it always returns -1!).
 
 =cut
 
-package DBus::Iterator;
+package Net::DBus::Binding::Iterator;
 
 
 use 5.006;
@@ -53,7 +53,7 @@ use strict;
 use warnings;
 use Carp qw(confess);
 
-use DBus;
+use Net::DBus;
 
 our $VERSION = '0.0.1';
 
@@ -170,39 +170,39 @@ sub get {
     
     my $type = $self->get_arg_type;
     
-    if ($type == &DBus::Message::TYPE_STRING) {
+    if ($type == &Net::DBus::Binding::Message::TYPE_STRING) {
 	return $self->get_string;
-    } elsif ($type == &DBus::Message::TYPE_INT32) {
+    } elsif ($type == &Net::DBus::Binding::Message::TYPE_INT32) {
 	return $self->get_int32;
-    } elsif ($type == &DBus::Message::TYPE_UINT32) {
+    } elsif ($type == &Net::DBus::Binding::Message::TYPE_UINT32) {
 	return $self->get_uint32;
-    } elsif ($type == &DBus::Message::TYPE_INT64) {
+    } elsif ($type == &Net::DBus::Binding::Message::TYPE_INT64) {
 	return $self->get_int64;
-    } elsif ($type == &DBus::Message::TYPE_UINT64) {
+    } elsif ($type == &Net::DBus::Binding::Message::TYPE_UINT64) {
 	return $self->get_uint64;
-    } elsif ($type == &DBus::Message::TYPE_ARRAY) {
+    } elsif ($type == &Net::DBus::Binding::Message::TYPE_ARRAY) {
 	my $iter = $self->get_array_iter();
 	my @value;
 	do {
 	    push @value, $iter->get();
 	} while ($iter->next());
 	return @value;
-    } elsif ($type == &DBus::Message::TYPE_BOOLEAN) {
+    } elsif ($type == &Net::DBus::Binding::Message::TYPE_BOOLEAN) {
 	return $self->get_boolean;
-    } elsif ($type == &DBus::Message::TYPE_BYTE) {
+    } elsif ($type == &Net::DBus::Binding::Message::TYPE_BYTE) {
 	return $self->get_byte;
-    } elsif ($type == &DBus::Message::TYPE_CUSTOM) {
-	confess "cannot handle DBus::Message::TYPE_CUSTOM";
-    } elsif ($type == &DBus::Message::TYPE_DICT) {
-	confess "cannot handle DBus::Message::TYPE_DICT";
-    } elsif ($type == &DBus::Message::TYPE_DOUBLE) {
+    } elsif ($type == &Net::DBus::Binding::Message::TYPE_CUSTOM) {
+	confess "cannot handle Net::DBus::Binding::Message::TYPE_CUSTOM";
+    } elsif ($type == &Net::DBus::Binding::Message::TYPE_DICT) {
+	confess "cannot handle Net::DBus::Binding::Message::TYPE_DICT";
+    } elsif ($type == &Net::DBus::Binding::Message::TYPE_DOUBLE) {
 	return $self->get_double;
-    } elsif ($type == &DBus::Message::TYPE_INVALID) {
-	confess "cannot handle DBus::Message::TYPE_INVALID";
-    } elsif ($type == &DBus::Message::TYPE_NIL) {
+    } elsif ($type == &Net::DBus::Binding::Message::TYPE_INVALID) {
+	confess "cannot handle Net::DBus::Binding::Message::TYPE_INVALID";
+    } elsif ($type == &Net::DBus::Binding::Message::TYPE_NIL) {
 	return undef;
-    } elsif ($type == &DBus::Message::TYPE_OBJECT_PATH) {
-	confess "cannot handle DBus::Message::TYPE_OBJECT_PATH";
+    } elsif ($type == &Net::DBus::Binding::Message::TYPE_OBJECT_PATH) {
+	confess "cannot handle Net::DBus::Binding::Message::TYPE_OBJECT_PATH";
     }
 }
 
@@ -235,7 +235,7 @@ sub append {
 
 =head1 SEE ALSO
 
-L<DBus::Message>
+L<Net::DBus::Binding::Message>
 
 =head1 AUTHOR
 
diff --git a/lib/DBus/Message.pm b/lib/Net/DBus/Binding/Message.pm
similarity index 54%
rename from lib/DBus/Message.pm
rename to lib/Net/DBus/Binding/Message.pm
index 88618cc..65df7a7 100644
--- a/lib/DBus/Message.pm
+++ b/lib/Net/DBus/Binding/Message.pm
@@ -2,13 +2,13 @@
 
 =head1 NAME
 
-DBus::Message - Base class for messages
+Net::DBus::Binding::Message - Base class for messages
 
 =head1 SYNOPSIS
 
 Sending a message
 
-  my $msg = new DBus::Message::Signal;
+  my $msg = new Net::DBus::Binding::Message::Signal;
   my $iterator = $msg->iterator;
 
   $iterator->append_byte(132);
@@ -21,9 +21,9 @@ Sending a message
 Provides a base class for the different kinds of
 message that can be sent/received. Instances of
 this class are never instantiated directly, rather
-one of the four sub-types L<DBus::Message::Signal>,
-L<DBus::Message::MethodCall>, L<DBus::Message::MethodReturn>,
-L<DBus::Message::Error> should be used.
+one of the four sub-types L<Net::DBus::Binding::Message::Signal>,
+L<Net::DBus::Binding::Message::MethodCall>, L<Net::DBus::Binding::Message::MethodReturn>,
+L<Net::DBus::Binding::Message::Error> should be used.
 
 =head1 METHODS
 
@@ -31,19 +31,19 @@ L<DBus::Message::Error> should be used.
 
 =cut
 
-package DBus::Message;
+package Net::DBus::Binding::Message;
 
 use 5.006;
 use strict;
 use warnings;
 use Carp;
 
-use DBus;
-use DBus::Iterator;
-use DBus::Message::Signal;
-use DBus::Message::MethodCall;
-use DBus::Message::MethodReturn;
-use DBus::Message::Error;
+use Net::DBus;
+use Net::DBus::Binding::Iterator;
+use Net::DBus::Binding::Message::Signal;
+use Net::DBus::Binding::Message::MethodCall;
+use Net::DBus::Binding::Message::MethodReturn;
+use Net::DBus::Binding::Message::Error;
 
 our $VERSION = '0.0.1';
 
@@ -54,11 +54,11 @@ sub new {
     my $self = {};
 
     $self->{message} = exists $params{message} ? $params{message} : 
-	(DBus::Message::_create(exists $params{type} ? $params{type} : confess "type parameter is required"));
+	(Net::DBus::Binding::Message::_create(exists $params{type} ? $params{type} : confess "type parameter is required"));
 
     bless $self, $class;
     
-    if ($class eq "DBus::Message") {
+    if ($class eq "Net::DBus::Binding::Message") {
 	$self->_specialize;
     }
 
@@ -69,14 +69,14 @@ sub _specialize {
     my $self = shift;
     
     my $type = $self->get_type;
-    if ($type == &DBus::Message::MESSAGE_TYPE_METHOD_CALL) {
-	bless $self, "DBus::Message::MethodCall";
-    } elsif ($type == &DBus::Message::MESSAGE_TYPE_METHOD_RETURN) {
-	bless $self, "DBus::Message::MethodReturn";
-    } elsif ($type == &DBus::Message::MESSAGE_TYPE_ERROR) {
-	bless $self, "DBus::Message::Error";
-    } elsif ($type == &DBus::Message::MESSAGE_TYPE_SIGNAL) {
-	bless $self, "DBus::Message::Signal";
+    if ($type == &Net::DBus::Binding::Message::MESSAGE_TYPE_METHOD_CALL) {
+	bless $self, "Net::DBus::Binding::Message::MethodCall";
+    } elsif ($type == &Net::DBus::Binding::Message::MESSAGE_TYPE_METHOD_RETURN) {
+	bless $self, "Net::DBus::Binding::Message::MethodReturn";
+    } elsif ($type == &Net::DBus::Binding::Message::MESSAGE_TYPE_ERROR) {
+	bless $self, "Net::DBus::Binding::Message::Error";
+    } elsif ($type == &Net::DBus::Binding::Message::MESSAGE_TYPE_SIGNAL) {
+	bless $self, "Net::DBus::Binding::Message::Signal";
     } else {
 	warn "Unknown message type $type\n";
     }
@@ -125,14 +125,14 @@ sub get_member {
 
 Retrieves an iterator which can be used for reading or
 writing fields of the message. The returned object is
-an instance of the C<DBus::Iterator> class.
+an instance of the C<Net::DBus::Binding::Iterator> class.
 
 =cut
 
 sub iterator {
     my $self = shift;
     
-    return DBus::Message::_iterator($self->{message});
+    return Net::DBus::Binding::Message::_iterator($self->{message});
 }
 
 
@@ -157,15 +157,15 @@ sub AUTOLOAD {
     our $AUTOLOAD;
     ($constname = $AUTOLOAD) =~ s/.*:://;
 
-    croak "&DBus::Message::constant not defined" if $constname eq '_constant';
+    croak "&Net::DBus::Binding::Message::constant not defined" if $constname eq '_constant';
 
-    if (!exists $DBus::Message::_constants{$constname}) {
-        croak "no such constant \$DBus::Message::$constname";
+    if (!exists $Net::DBus::Binding::Message::_constants{$constname}) {
+        croak "no such constant \$Net::DBus::Binding::Message::$constname";
     }
 
     {
 	no strict 'refs';
-	*$AUTOLOAD = sub { $DBus::Message::_constants{$constname} };
+	*$AUTOLOAD = sub { $Net::DBus::Binding::Message::_constants{$constname} };
     }
     goto &$AUTOLOAD;
 }
@@ -178,7 +178,7 @@ sub AUTOLOAD {
 
 =head1 SEE ALSO
 
-L<DBus::Server>, L<DBus::Connection>, L<DBus::Message::Signal>, L<DBus::Message::MethodCall>, L<DBus::Message::MethodReturn>, L<DBus::Message::Error>
+L<Net::DBus::Binding::Server>, L<Net::DBus::Binding::Connection>, L<Net::DBus::Binding::Message::Signal>, L<Net::DBus::Binding::Message::MethodCall>, L<Net::DBus::Binding::Message::MethodReturn>, L<Net::DBus::Binding::Message::Error>
 
 =head1 AUTHOR
 
diff --git a/lib/DBus/Message/Error.pm b/lib/Net/DBus/Binding/Message/Error.pm
similarity index 77%
rename from lib/DBus/Message/Error.pm
rename to lib/Net/DBus/Binding/Message/Error.pm
index 29639ef..699cca3 100644
--- a/lib/DBus/Message/Error.pm
+++ b/lib/Net/DBus/Binding/Message/Error.pm
@@ -1,14 +1,14 @@
-package DBus::Message::Error;
+package Net::DBus::Binding::Message::Error;
 
 use 5.006;
 use strict;
 use warnings;
 use Carp;
 
-use DBus;
-use DBus::Message;
+use Net::DBus;
+use Net::DBus::Binding::Message;
 
-our @ISA = qw(DBus::Message);
+our @ISA = qw(Net::DBus::Binding::Message);
 
 our $VERSION = '0.0.1';
 
@@ -20,7 +20,7 @@ sub new {
     my $replyto = exists $params{replyto} ? $params{replyto} : confess "replyto parameter is required";
 
     my $msg = exists $params{message} ? $params{message} : 
-	DBus::Message::Error::_create
+	Net::DBus::Binding::Message::Error::_create
 	(
 	 $replyto->{message},
 	 ($params{name} ? $params{name} : confess "name parameter is required"),
diff --git a/lib/DBus/Message/MethodCall.pm b/lib/Net/DBus/Binding/Message/MethodCall.pm
similarity index 78%
rename from lib/DBus/Message/MethodCall.pm
rename to lib/Net/DBus/Binding/Message/MethodCall.pm
index 7294084..0da99c9 100644
--- a/lib/DBus/Message/MethodCall.pm
+++ b/lib/Net/DBus/Binding/Message/MethodCall.pm
@@ -1,14 +1,14 @@
-package DBus::Message::MethodCall;
+package Net::DBus::Binding::Message::MethodCall;
 
 use 5.006;
 use strict;
 use warnings;
 use Carp;
 
-use DBus;
-use DBus::Message;
+use Net::DBus;
+use Net::DBus::Binding::Message;
 
-our @ISA = qw(Exporter DBus::Message);
+our @ISA = qw(Exporter Net::DBus::Binding::Message);
 
 our $VERSION = '0.0.1';
 
@@ -18,7 +18,7 @@ sub new {
     my %params = @_;
 
     my $msg = exists $params{message} ? $params{message} :
-	DBus::Message::MethodCall::_create
+	Net::DBus::Binding::Message::MethodCall::_create
 	(
 	 ($params{service_name} ? $params{service_name} : confess "service_name parameter is required"),
 	 ($params{object_path} ? $params{object_path} : confess "object_path parameter is required"),
diff --git a/lib/DBus/Message/MethodReturn.pm b/lib/Net/DBus/Binding/Message/MethodReturn.pm
similarity index 66%
rename from lib/DBus/Message/MethodReturn.pm
rename to lib/Net/DBus/Binding/Message/MethodReturn.pm
index bd5cc0f..bc770fb 100644
--- a/lib/DBus/Message/MethodReturn.pm
+++ b/lib/Net/DBus/Binding/Message/MethodReturn.pm
@@ -1,14 +1,14 @@
-package DBus::Message::MethodReturn;
+package Net::DBus::Binding::Message::MethodReturn;
 
 use 5.006;
 use strict;
 use warnings;
 use Carp;
 
-use DBus;
-use DBus::Message;
+use Net::DBus;
+use Net::DBus::Binding::Message;
 
-our @ISA = qw(Exporter DBus::Message);
+our @ISA = qw(Exporter Net::DBus::Binding::Message);
 
 our $VERSION = '0.0.1';
 
@@ -20,7 +20,7 @@ sub new {
     my $call = exists $params{call} ? $params{call} : confess "call parameter is required";
     
     my $msg = exists $params{message} ? $params{message} : 
-	DBus::Message::MethodReturn::_create($call->{message});
+	Net::DBus::Binding::Message::MethodReturn::_create($call->{message});
 
     my $self = $class->SUPER::new(message => $msg);
 
diff --git a/lib/DBus/Message/Signal.pm b/lib/Net/DBus/Binding/Message/Signal.pm
similarity index 75%
rename from lib/DBus/Message/Signal.pm
rename to lib/Net/DBus/Binding/Message/Signal.pm
index 5259260..67bd3ee 100644
--- a/lib/DBus/Message/Signal.pm
+++ b/lib/Net/DBus/Binding/Message/Signal.pm
@@ -1,14 +1,14 @@
-package DBus::Message::Signal;
+package Net::DBus::Binding::Message::Signal;
 
 use 5.006;
 use strict;
 use warnings;
 use Carp;
 
-use DBus;
-use DBus::Message;
+use Net::DBus;
+use Net::DBus::Binding::Message;
 
-our @ISA = qw(Exporter DBus::Message);
+our @ISA = qw(Exporter Net::DBus::Binding::Message);
 
 our $VERSION = '0.0.1';
 
@@ -18,7 +18,7 @@ sub new {
     my %params = @_;
 
     my $msg = exists $params{message} ? $params{message} :
-	DBus::Message::Signal::_create
+	Net::DBus::Binding::Message::Signal::_create
 	(
 	 ($params{path} ? $params{path} : confess "path parameter is required"),
 	 ($params{interface} ? $params{interface} : confess "interface parameter is required"),
diff --git a/lib/DBus/Server.pm b/lib/Net/DBus/Binding/Server.pm
similarity index 80%
rename from lib/DBus/Server.pm
rename to lib/Net/DBus/Binding/Server.pm
index c27480a..f770e55 100644
--- a/lib/DBus/Server.pm
+++ b/lib/Net/DBus/Binding/Server.pm
@@ -2,15 +2,15 @@
 
 =head1 NAME
 
-DBus::Server - A server to accept incoming connections
+Net::DBus::Binding::Server - A server to accept incoming connections
 
 =head1 SYNOPSIS
 
 Creating a new server and accepting client connections
 
-  use DBus::Server;
+  use Net::DBus::Binding::Server;
 
-  my $server = DBus::Server->new(address => "unix:path=/path/to/socket");
+  my $server = Net::DBus::Binding::Server->new(address => "unix:path=/path/to/socket");
 
   $server->connection_callback(\&new_connection);
 
@@ -22,7 +22,7 @@ Creating a new server and accepting client connections
 
 Managing the server and new connections in an event loop
 
-  my $reactor = DBus::Reactor->new();
+  my $reactor = Net::DBus::Binding::Reactor->new();
 
   $reactor->manage($server);
   $reactor->run();
@@ -48,21 +48,21 @@ may be of use.
 
 =cut
 
-package DBus::Server;
+package Net::DBus::Binding::Server;
 
 use 5.006;
 use strict;
 use warnings;
 use Carp;
 
-use DBus;
-use DBus::Connection;
+use Net::DBus;
+use Net::DBus::Binding::Connection;
 
 our $VERSION = '0.0.1';
 
 =pod
 
-=item my $server = DBus::Server->new(address => "unix:path=/path/to/socket");
+=item my $server = Net::DBus::Binding::Server->new(address => "unix:path=/path/to/socket");
 
 Creates a new server binding it to the socket specified by the
 C<address> parameter.
@@ -76,7 +76,7 @@ sub new {
     my $self = {};
 
     $self->{address} = exists $params{address} ? $params{address} : confess "address parameter is required";
-    $self->{server} = DBus::Server::_open($self->{address});
+    $self->{server} = Net::DBus::Binding::Server::_open($self->{address});
 
     bless $self, $class;
 
@@ -85,7 +85,7 @@ sub new {
     $self->{_callback} = sub {
 	my $server = shift;
 	my $rawcon = shift;
-	my $con = DBus::Connection->new(connection => $rawcon);
+	my $con = Net::DBus::Binding::Connection->new(connection => $rawcon);
 
 	if ($server->{connection_callback}) {
 	    &{$server->{connection_callback}}($server, $con);
@@ -137,7 +137,7 @@ Register a set of callbacks for adding, removing & updating
 watches in the application's event loop. Each parameter
 should be a code reference, which on each invocation, will be
 supplied with two parameters, the server object and the
-watch object. If you are using a C<DBus::Reactor> object
+watch object. If you are using a C<Net::DBus::Binding::Reactor> object
 as the application event loop, then the 'manage' method on
 that object will call this on your behalf.
 
@@ -165,7 +165,7 @@ Register a set of callbacks for adding, removing & updating
 timeouts in the application's event loop. Each parameter
 should be a code reference, which on each invocation, will be
 supplied with two parameters, the server object and the
-timeout object. If you are using a C<DBus::Reactor> object
+timeout object. If you are using a C<Net::DBus::Binding::Reactor> object
 as the application event loop, then the 'manage' method on
 that object will call this on your behalf.
 
@@ -192,7 +192,7 @@ Registers the handler to use for dealing with
 new incoming connections from clients. The code
 reference will be invoked each time a new client
 connects and supplied with a single parameter
-which is the C<DBus::Connection> object representing
+which is the C<Net::DBus::Binding::Connection> object representing
 the client.
 
 =cut
@@ -216,7 +216,7 @@ sub set_connection_callback {
 
 =head1 SEE ALSO
 
-L<DBus::Connection>, L<DBus::Bus>, L<DBus::Message::Signal>, L<DBus::Message::MethodCall>, L<DBus::Message::MethodReturn>, L<DBus::Message::Error>
+L<Net::DBus::Binding::Connection>, L<Net::DBus::Binding::Bus>, L<Net::DBus::Binding::Message::Signal>, L<Net::DBus::Binding::Message::MethodCall>, L<Net::DBus::Binding::Message::MethodReturn>, L<Net::DBus::Binding::Message::Error>
 
 =head1 AUTHOR
 
diff --git a/lib/Net/DBus/Binding/Watch.pm b/lib/Net/DBus/Binding/Watch.pm
new file mode 100644
index 0000000..da5a5c3
--- /dev/null
+++ b/lib/Net/DBus/Binding/Watch.pm
@@ -0,0 +1,32 @@
+package Net::DBus::Binding::Watch;
+
+use 5.006;
+use strict;
+use warnings;
+use Carp;
+
+use Net::DBus;
+
+sub AUTOLOAD {
+    # This AUTOLOAD is used to 'autoload' constants from the constant()
+    # XS function.
+
+    my $constname;
+    our $AUTOLOAD;
+    ($constname = $AUTOLOAD) =~ s/.*:://;
+
+    croak "&Net::DBus::Binding::Watch::constant not defined" if $constname eq '_constant';
+
+    if (!exists $Net::DBus::Binding::Watch::_constants{$constname}) {
+        croak "no such constant \$Net::DBus::Binding::Watch::$constname";
+    }
+
+    {
+	no strict 'refs';
+	*$AUTOLOAD = sub { $Net::DBus::Binding::Watch::_constants{$constname} };
+    }
+    goto &$AUTOLOAD;
+}
+
+1;
+__END__
diff --git a/lib/DBus/Callback.pm b/lib/Net/DBus/Callback.pm
similarity index 94%
rename from lib/DBus/Callback.pm
rename to lib/Net/DBus/Callback.pm
index d49a4e4..56a243a 100644
--- a/lib/DBus/Callback.pm
+++ b/lib/Net/DBus/Callback.pm
@@ -1,10 +1,9 @@
-package DBus::Callback;
+package Net::DBus::Callback;
 
 use 5.006;
 use strict;
 use warnings;
 use Carp qw(confess);
-use DBus::Watch;
 
 our $VERSION = '0.0.1';
 
diff --git a/lib/DBus/Object.pm b/lib/Net/DBus/Object.pm
similarity index 57%
rename from lib/DBus/Object.pm
rename to lib/Net/DBus/Object.pm
index 755d7c5..a7843e6 100644
--- a/lib/DBus/Object.pm
+++ b/lib/Net/DBus/Object.pm
@@ -1,15 +1,13 @@
-package DBus::Object;
+package Net::DBus::Object;
 
 use 5.006;
 use strict;
 use warnings;
 use Carp;
 
-use AutoLoader;
-
 our $VERSION = '0.0.1';
 
-use DBus::RemoteObject;
+use Net::DBus::RemoteObject;
 
 sub new {
     my $class = shift;
@@ -49,25 +47,28 @@ sub _dispatch {
 	    $self->$method_name(@args);
 	};
 	if ($@) {
-	    $reply = DBus::Message::Error->new(replyto => $message,
-					       name => "org.freedesktop.DBus.Error.Failed",
-					       description => $@);
+	    $reply = Net::DBus::Message::Error->new(replyto => $message,
+						    name => "org.freedesktop.DBus.Error.Failed",
+						    description => $@);
 	} else {
-	    $reply = DBus::Message::MethodReturn->new(call => $message);
-	    my $iter = $reply->iterator;
-	    foreach my $ret (@ret) {
-		$iter->append($ret);
+	    $reply = Net::DBus::Message::MethodReturn->new(call => $message);
+	    if (@ret == 1) {
+		my $iter = $reply->iterator;
+		$iter->append(shift @ret);
+	    } elsif (@ret > 1) {
+		my $iter = $reply->iterator;
+		foreach my $ret (@ret) {
+		    $iter->append($ret);
+		}
 	    }
 	}
     } else {
-	$reply = DBus::Message::Error->new(replyto => $message,
-					   name => "org.freedesktop.DBus.Error.Failed",
-					   description => "No such method " . ref($self) . "->" . $method_name);
+	$reply = Net::DBus::Message::Error->new(replyto => $message,
+						name => "org.freedesktop.DBus.Error.Failed",
+						description => "No such method " . ref($self) . "->" . $method_name);
     }
     
     $self->{service}->{bus}->{connection}->send($reply);
 }
 
 1;
-
-__END__
diff --git a/lib/DBus/Reactor.pm b/lib/Net/DBus/Reactor.pm
similarity index 89%
rename from lib/DBus/Reactor.pm
rename to lib/Net/DBus/Reactor.pm
index 4dd773f..183ee71 100644
--- a/lib/DBus/Reactor.pm
+++ b/lib/Net/DBus/Reactor.pm
@@ -2,27 +2,27 @@
 
 =head1 NAME
 
-DBus::Reactor - application event loop 
+Net::DBus::Reactor - application event loop 
 
 =head1 SYNOPSIS
 
 Create and run an event loop:
 
-   use DBus::Reactor;
-   my $reactor = DBus::Reactor->new();
+   use Net::DBus::Reactor;
+   my $reactor = Net::DBus::Reactor->new();
 
    $reactor->run();
 
 Manage some file handlers
 
    $reactor->add_read($fd, 
-                      DBus::Callback->new(method => sub {
+                      Net::DBus::Callback->new(method => sub {
                          my $fd = shift;
                          ...read some data...
                       }, args => [$fd]);
 
    $reactor->add_write($fd, 
-                      DBus::Callback->new(method => sub {
+                      Net::DBus::Callback->new(method => sub {
                          my $fd = shift;
                          ...write some data...
                       }, args => [$fd]);
@@ -41,7 +41,7 @@ Permanently remove a handle
 Manage a regular timeout every 100 milliseconds
 
    my $timer = $reactor->add_timeout(100,
-                                     DBus::Callback->new(
+                                     Net::DBus::Callback->new(
               method => sub {
                  ...process the alarm...
               }));
@@ -59,7 +59,7 @@ Permanently remove a timer
 
 Add a post-dispatch hook
 
-   my $hook = $reactor->add_hook(DBus::Callback->new(
+   my $hook = $reactor->add_hook(Net::DBus::Callback->new(
          method => sub {
             ... do some work...
          }));
@@ -93,21 +93,21 @@ system call returning).
 
 =cut
 
-package DBus::Reactor;
+package Net::DBus::Reactor;
 
 use 5.006;
 use strict;
 use warnings;
 use Carp;
-use DBus::Watch;
-use DBus::Callback;
+use Net::DBus::Binding::Watch;
+use Net::DBus::Callback;
 use Time::HiRes qw(gettimeofday);
 
 our $VERSION = '0.0.1';
 
 =pod
 
-=item my $reactor = DBus::Reactor->new();
+=item my $reactor = Net::DBus::Reactor->new();
 
 Creates a new event loop ready for monitoring file
 handles, or generating timeouts.
@@ -139,7 +139,7 @@ sub new {
 
 =item $reactor->manage($server);
 
-Registeres a C<DBus::Connection> or C<DBus::Server> object
+Registeres a C<Net::DBus::Connection> or C<Net::DBus::Server> object
 for management by the event loop. This basically involves
 hooking up the watch & timeout callbacks to the event loop.
 For connections it will also register a hook to invoke the
@@ -176,7 +176,7 @@ sub manage {
 	    my $timeout = shift;
 	    
 	    my $key = $self->add_timeout($timeout->get_interval,
-					 DBus::Callback->new(object => $timeout,
+					 Net::DBus::Callback->new(object => $timeout,
 							     method => "handle",
 							     args => []),
 					 $timeout->is_enabled);
@@ -199,7 +199,7 @@ sub manage {
     }
     
     if ($object->can("dispatch")) {
-	$self->add_hook(DBus::Callback->new(object => $object, 
+	$self->add_hook(Net::DBus::Callback->new(object => $object, 
 					    method => "dispatch", 
 					    args => []), 
 			1);
@@ -213,24 +213,24 @@ sub _manage_watch_on {
     my $watch = shift;
     my $flags = $watch->get_flags;
 
-    if ($flags & &DBus::Watch::READABLE) {
+    if ($flags & &Net::DBus::Binding::Watch::READABLE) {
 	$self->add_read($watch->get_fileno, 
-			DBus::Callback->new(object => $watch, 
+			Net::DBus::Callback->new(object => $watch, 
 					    method => "handle", 
-					    args => [&DBus::Watch::READABLE]), 
+					    args => [&Net::DBus::Binding::Watch::READABLE]), 
 			$watch->is_enabled);
     }
-    if ($flags & &DBus::Watch::WRITABLE) {
+    if ($flags & &Net::DBus::Binding::Watch::WRITABLE) {
 	$self->add_write($watch->get_fileno, 
-			 DBus::Callback->new(object => $watch, 
+			 Net::DBus::Callback->new(object => $watch, 
 					     method => "handle", 
-					     args => [&DBus::Watch::WRITABLE]), 
+					     args => [&Net::DBus::Binding::Watch::WRITABLE]), 
 			 $watch->is_enabled);
     }
 #    $self->add_exception($watch->get_fileno, $watch, 
-#			 DBus::Callback->new(object => $watch, 
+#			 Net::DBus::Callback->new(object => $watch, 
 #					     method => "handle", 
-#					     args => [&DBus::Watch::ERROR]), 
+#					     args => [&Net::DBus::Binding::Watch::ERROR]), 
 #			 $watch->is_enabled);
     
 }
@@ -241,10 +241,10 @@ sub _manage_watch_off {
     my $watch = shift;
     my $flags = $watch->get_flags;
     
-    if ($flags & &DBus::Watch::READABLE) {
+    if ($flags & &Net::DBus::Binding::Watch::READABLE) {
 	$self->remove_read($watch->get_fileno);
     }
-    if ($flags & &DBus::Watch::WRITABLE) {
+    if ($flags & &Net::DBus::Binding::Watch::WRITABLE) {
 	$self->remove_write($watch->get_fileno);
     }
 #    $self->remove_exception($watch->get_fileno);
@@ -256,10 +256,10 @@ sub _manage_watch_toggle {
     my $watch = shift;
     my $flags = $watch->get_flags;
     
-    if ($flags & &DBus::Watch::READABLE) {
+    if ($flags & &Net::DBus::Binding::Watch::READABLE) {
 	$self->toggle_read($watch->get_fileno, $watch->is_enabled);
     }
-    if ($flags & &DBus::Watch::WRITABLE) {
+    if ($flags & &Net::DBus::Binding::Watch::WRITABLE) {
 	$self->toggle_write($watch->get_fileno, $watch->is_enabled);
     }
     $self->toggle_exception($watch->get_fileno, $watch->is_enabled);
@@ -445,7 +445,7 @@ sub _dispatch_hook {
 
 Registers a file handle for monitoring of read
 events. The C<$callback> parameter specifies an
-instance of the C<DBus::Callback> object to invoke
+instance of the C<Net::DBus::Callback> object to invoke
 each time an event occurs. The optional C<$status>
 parameter is a boolean value to specify whether the
 watch is initially enabled.
@@ -463,7 +463,7 @@ sub add_read {
 
 Registers a file handle for monitoring of write
 events. The C<$callback> parameter specifies an
-instance of the C<DBus::Callback> object to invoke
+instance of the C<Net::DBus::Callback> object to invoke
 each time an event occurs. The optional C<$status>
 parameter is a boolean value to specify whether the
 watch is initially enabled.
@@ -481,7 +481,7 @@ sub add_write {
 
 Registers a file handle for monitoring of exception
 events. The C<$callback> parameter specifies an
-instance of the C<DBus::Callback> object to invoke
+instance of the C<Net::DBus::Callback> object to invoke
 each time an event occurs. The optional C<$status>
 parameter is a boolean value to specify whether the
 watch is initially enabled.
@@ -499,7 +499,7 @@ sub add_exception {
 
 Registers a new timeout to expire every C<$interval>
 milliseconds. The C<$callback> parameter specifies an
-instance of the C<DBus::Callback> object to invoke
+instance of the C<Net::DBus::Callback> object to invoke
 each time the timeout expires. The optional C<$status>
 parameter is a boolean value to specify whether the
 timeout is initially enabled. The return parameter is
@@ -575,7 +575,7 @@ sub toggle_timeout {
 
 Registers a new hook to be fired on each iteration
 of the event loop. The C<$callback> parameter
-specifies an instance of the C<DBus::Callback>
+specifies an instance of the C<Net::DBus::Callback>
 class to invoke. The C<$status> parameter determines
 whether the hook is initially enabled, or disabled.
 The return parameter is a unique id which should
@@ -735,7 +735,7 @@ sub _toggle {
 
 =head1 SEE ALSO
 
-L<DBus::Callback>, L<DBus::Connection>, L<DBus::Server>
+L<Net::DBus::Callback>, L<Net::DBus::Connection>, L<Net::DBus::Server>
 
 =head1 AUTHOR
 
diff --git a/lib/DBus/RemoteObject.pm b/lib/Net/DBus/RemoteObject.pm
similarity index 71%
rename from lib/DBus/RemoteObject.pm
rename to lib/Net/DBus/RemoteObject.pm
index 8a95b7d..e3d3a99 100644
--- a/lib/DBus/RemoteObject.pm
+++ b/lib/Net/DBus/RemoteObject.pm
@@ -1,4 +1,4 @@
-package DBus::RemoteObject;
+package Net::DBus::RemoteObject;
 
 use 5.006;
 use strict;
@@ -8,7 +8,7 @@ use Carp;
 our $VERSION = '0.0.1';
 our $AUTOLOAD;
 
-use DBus::Message::MethodCall;
+use Net::DBus::Binding::Message::MethodCall;
 
 sub new {
     my $class = shift;
@@ -34,10 +34,10 @@ sub AUTOLOAD {
     my $sub = $AUTOLOAD;
     
     (my $method = $AUTOLOAD) =~ s/.*:://;
-    my $call = DBus::Message::MethodCall->new(service_name => $self->{service_name},
-					      object_path => $self->{object_path},
-					      method_name => $method,
-					      interface => $self->{interface});
+    my $call = Net::DBus::Binding::Message::MethodCall->new(service_name => $self->{service_name},
+							    object_path => $self->{object_path},
+							    method_name => $method,
+							    interface => $self->{interface});
     
     my $iter = $call->iterator;
     foreach my $arg (@_) {
diff --git a/lib/DBus/RemoteService.pm b/lib/Net/DBus/RemoteService.pm
similarity index 65%
rename from lib/DBus/RemoteService.pm
rename to lib/Net/DBus/RemoteService.pm
index b419fb2..0b65924 100644
--- a/lib/DBus/RemoteService.pm
+++ b/lib/Net/DBus/RemoteService.pm
@@ -1,4 +1,4 @@
-package DBus::RemoteService;
+package Net::DBus::RemoteService;
 
 use 5.006;
 use strict;
@@ -7,7 +7,7 @@ use Carp;
 
 our $VERSION = '0.0.1';
 
-use DBus::RemoteObject;
+use Net::DBus::RemoteObject;
 
 
 sub new {
@@ -27,10 +27,10 @@ sub get_object {
     my $object_path = shift;
     my $interface = shift;
     
-    return DBus::RemoteObject->new($self->{connection}, 
-				   $self->{service_name},
-				   $object_path,
-				   $interface);
+    return Net::DBus::RemoteObject->new($self->{connection}, 
+					$self->{service_name},
+					$object_path,
+					$interface);
 }
 
 1;
diff --git a/lib/DBus/Service.pm b/lib/Net/DBus/Service.pm
similarity index 92%
rename from lib/DBus/Service.pm
rename to lib/Net/DBus/Service.pm
index 4cae186..8334e96 100644
--- a/lib/DBus/Service.pm
+++ b/lib/Net/DBus/Service.pm
@@ -1,4 +1,4 @@
-package DBus::Service;
+package Net::DBus::Service;
 
 
 sub new {
diff --git a/t/00-constants.t b/t/00-constants.t
index c41863d..2baaa2e 100644
--- a/t/00-constants.t
+++ b/t/00-constants.t
@@ -1,19 +1,19 @@
 use Test::More tests => 6;
 BEGIN { 
-	use_ok('DBus::Watch');
-	use_ok('DBus::Message');
-	use_ok('DBus::Bus');
+	use_ok('Net::DBus::Binding::Watch');
+	use_ok('Net::DBus::Binding::Message');
+	use_ok('Net::DBus::Binding::Bus');
 	 };
 
 
 my $fail = 0;
 foreach my $constname (qw(
         SYSTEM SESSION ACTIVATION)) {
-  next if (eval "my \$a = &DBus::Bus::$constname; 1");
+  next if (eval "my \$a = &Net::DBus::Binding::Bus::$constname; 1");
   print "# fail: $@";
   $fail = 1;
 }
-ok( $fail == 0 , 'DBus::Bus Constants' );
+ok( $fail == 0 , 'Net::DBus::Binding::Bus Constants' );
 
 $fail = 0;
 foreach my $constname (qw(
@@ -22,19 +22,19 @@ foreach my $constname (qw(
 	TYPE_DOUBLE TYPE_INT32 TYPE_INT64
 	TYPE_INVALID TYPE_NIL TYPE_OBJECT_PATH
 	TYPE_STRING TYPE_UINT32 TYPE_UINT64)) {
-  next if (eval "my \$a = &DBus::Message::$constname; 1");
+  next if (eval "my \$a = &Net::DBus::Binding::Message::$constname; 1");
   print "# fail: $@";
   $fail = 1;
 }
-ok( $fail == 0 , 'DBus::Message Constants' );
+ok( $fail == 0 , 'Net::DBus::Binding::Message Constants' );
 
 $fail = 0;
 foreach my $constname (qw(
         READABLE WRITABLE
         ERROR HANGUP)) {
-  next if (eval "my \$a = &DBus::Watch::$constname; 1");
+  next if (eval "my \$a = &Net::DBus::Binding::Watch::$constname; 1");
   print "# fail: $@";
   $fail = 1;
 }
 
-ok( $fail == 0 , 'DBus::Watch Constants' );
+ok( $fail == 0 , 'Net::DBus::Binding::Watch Constants' );
diff --git a/t/15-message.t b/t/15-message.t
index 623d2fb..8167439 100644
--- a/t/15-message.t
+++ b/t/15-message.t
@@ -1,14 +1,14 @@
 use Test::More tests => 21;
 BEGIN { 
-        use_ok('DBus::Iterator');
-        use_ok('DBus::Message::Signal');
-        use_ok('DBus::Message::MethodCall');
-        use_ok('DBus::Message::MethodReturn');
-        use_ok('DBus::Message::Error');
+        use_ok('Net::DBus::Binding::Iterator');
+        use_ok('Net::DBus::Binding::Message::Signal');
+        use_ok('Net::DBus::Binding::Message::MethodCall');
+        use_ok('Net::DBus::Binding::Message::MethodReturn');
+        use_ok('Net::DBus::Binding::Message::Error');
 	};
 
 
-my $msg = DBus::Message::Signal->new(path => "/foo/bar/Wizz",	
+my $msg = Net::DBus::Binding::Message::Signal->new(path => "/foo/bar/Wizz",	
 	interface => "com.blah.Example",
         name => "Eeek");
 
@@ -17,7 +17,7 @@ $iter->append_boolean(1);
 $iter->append_byte(43);
 $iter->append_int32(123);
 $iter->append_uint32(456);
-if ($DBus::Iterator::have_quads) {
+if ($Net::DBus::Binding::Iterator::have_quads) {
   $iter->append_int64(12345645645);
   $iter->append_uint64(12312312312);
 } else {
@@ -38,7 +38,7 @@ ok($iter->next(), "next");
 ok($iter->get_uint32() == 456, "uint32");
 ok($iter->next(), "next");
 
-if (!$DBus::Iterator::have_quads) {
+if (!$Net::DBus::Binding::Iterator::have_quads) {
   ok(1, "int64 skipped");
   ok($iter->next(), "next");
   ok(1, "uint64 skipped");
diff --git a/t/20-callback.t b/t/20-callback.t
index 3fefa8e..5b0f7f3 100644
--- a/t/20-callback.t
+++ b/t/20-callback.t
@@ -1,18 +1,18 @@
 use Test::More tests => 5;
 
 BEGIN {
-    use_ok('DBus::Callback');
+    use_ok('Net::DBus::Callback');
 };
 
 my $doneit = 0;
 
 my $doer = Doer->new;
 
-my $callback = DBus::Callback->new(
-				   object => $doer,
-				   method => "doit",
-				   args => [4, 3, 5]
-				   );
+my $callback = Net::DBus::Callback->new(
+					object => $doer,
+					method => "doit",
+					args => [4, 3, 5]
+					);
 
 $callback->invoke();
 ok($doer->doneit == 12, "object callback");
@@ -20,10 +20,10 @@ ok($doer->doneit == 12, "object callback");
 $callback->invoke();
 ok($doer->doneit == 24, "object callback");
 
-$callback = DBus::Callback->new(
-				method => \&doit,
-				args => [5,1,2]
-				);
+$callback = Net::DBus::Callback->new(
+				     method => \&doit,
+				     args => [5,1,2]
+				     );
 
 $callback->invoke();
 ok($doneit == 8, "subroutine callback");
diff --git a/t/25-reactor.t b/t/25-reactor.t
index 53369e5..832cf60 100644
--- a/t/25-reactor.t
+++ b/t/25-reactor.t
@@ -7,19 +7,19 @@ use warnings;
 # reliably on unloaded machine
 
 BEGIN {
-    use_ok('DBus::Reactor');
-    use_ok('DBus::Callback');
+    use_ok('Net::DBus::Reactor');
+    use_ok('Net::DBus::Callback');
 };
 
 
-my $reactor = DBus::Reactor->new();
+my $reactor = Net::DBus::Reactor->new();
 
 my $started = $reactor->_now;
 my $fired;
 my $alarmed;
 
 my $tid = $reactor->add_timeout(2000,
-				DBus::Callback->new(method => \&timeout, args => []),
+				Net::DBus::Callback->new(method => \&timeout, args => []),
 				1);
 
 $SIG{ALRM} = sub { $alarmed = 1 };
@@ -52,17 +52,17 @@ my ($r1c, $w1c, $r2c, $w2c) = (0,0,0,0);
 my $hookc = 0;
 
 $reactor->add_read($r1, 
-		   DBus::Callback->new(method => \&do_r1));
+		   Net::DBus::Callback->new(method => \&do_r1));
 $reactor->add_write($w1, 
-		    DBus::Callback->new(method => \&do_w1),
+		    Net::DBus::Callback->new(method => \&do_w1),
 		    0);
 $reactor->add_read($r2, 
-		   DBus::Callback->new(method => \&do_r2));
+		   Net::DBus::Callback->new(method => \&do_r2));
 $reactor->add_write($w2, 
-		    DBus::Callback->new(method => \&do_w2),
+		    Net::DBus::Callback->new(method => \&do_w2),
 		    0);
 
-$reactor->add_hook(DBus::Callback->new(method => \&hook));
+$reactor->add_hook(Net::DBus::Callback->new(method => \&hook));
 
 $reactor->step;
 
diff --git a/t/30-server.t b/t/30-server.t
index 5969068..d3c7c17 100644
--- a/t/30-server.t
+++ b/t/30-server.t
@@ -1,16 +1,16 @@
 use Test::More tests => 11;
 BEGIN { 
-        use_ok('DBus::Server');
-        use_ok('DBus::Connection');
-        use_ok('DBus::Reactor');
-        use_ok('DBus::Message::Signal');
+        use_ok('Net::DBus::Binding::Server');
+        use_ok('Net::DBus::Binding::Connection');
+        use_ok('Net::DBus::Reactor');
+        use_ok('Net::DBus::Binding::Message::Signal');
 }
 
 
-my $server = DBus::Server->new(address => "unix:path=/tmp/dbus-perl-test-$$");
+my $server = Net::DBus::Binding::Server->new(address => "unix:path=/tmp/dbus-perl-test-$$");
 ok ($server->is_connected, "server connected");
 
-my $reactor = DBus::Reactor->new();
+my $reactor = Net::DBus::Reactor->new();
 $reactor->manage($server);
 
 my $incoming;
@@ -18,7 +18,7 @@ $server->set_connection_callback(sub {
   $incoming = shift;
 });
 
-my $client = DBus::Connection->new(address => "unix:path=/tmp/dbus-perl-test-$$");
+my $client = Net::DBus::Binding::Connection->new(address => "unix:path=/tmp/dbus-perl-test-$$");
 ok ($client->is_connected, "client connected");
 $reactor->manage($client);
 
diff --git a/typemap b/typemap
index d4ce9fc..79e1d71 100644
--- a/typemap
+++ b/typemap
@@ -23,7 +23,7 @@ O_OBJECT_connection
 
 OUTPUT
 O_OBJECT_connection
-        sv_setref_pv( $arg, "DBus::C::Connection", (void*)$var );
+        sv_setref_pv( $arg, "Net::DBus::Binding::C::Connection", (void*)$var );
 
 INPUT
 O_OBJECT_server
@@ -36,7 +36,7 @@ O_OBJECT_server
 
 OUTPUT
 O_OBJECT_server
-        sv_setref_pv( $arg, "DBus::C::Server", (void*)$var );
+        sv_setref_pv( $arg, "Net::DBus::Binding::C::Server", (void*)$var );
 
 INPUT
 O_OBJECT_message
@@ -49,7 +49,7 @@ O_OBJECT_message
 
 OUTPUT
 O_OBJECT_message
-        sv_setref_pv( $arg, "DBus::C::Message", (void*)$var );
+        sv_setref_pv( $arg, "Net::DBus::Binding::C::Message", (void*)$var );
 
 
 INPUT
@@ -63,7 +63,7 @@ O_OBJECT_watch
 
 OUTPUT
 O_OBJECT_watch
-        sv_setref_pv( $arg, "DBus::C::Watch", (void*)$var );
+        sv_setref_pv( $arg, "Net::DBus::Binding::C::Watch", (void*)$var );
 
 INPUT
 O_OBJECT_timeout
@@ -76,7 +76,7 @@ O_OBJECT_timeout
 
 OUTPUT
 O_OBJECT_timeout
-        sv_setref_pv( $arg, "DBus::C::Timeout", (void*)$var );
+        sv_setref_pv( $arg, "Net::DBus::Binding::C::Timeout", (void*)$var );
 
 INPUT
 O_OBJECT_messageiter
@@ -89,4 +89,4 @@ O_OBJECT_messageiter
 
 OUTPUT
 O_OBJECT_messageiter
-        sv_setref_pv( $arg, "DBus::Iterator", (void*)$var );
+        sv_setref_pv( $arg, "Net::DBus::Binding::Iterator", (void*)$var );

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libnet-dbus-perl.git



More information about the Pkg-perl-cvs-commits mailing list