summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2005-06-30 08:20:44 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2005-06-30 08:20:44 +0000
commitf0f0b6d37e864f7ea0b9a589a3056ebe773144db (patch)
tree49f6c6c64eef29b3b6725c19d14fc7a921f4efe0
parentf960ad1a1cc5fdba40cfbc547dfce52496b271a8 (diff)
downloaddrakx-f0f0b6d37e864f7ea0b9a589a3056ebe773144db.tar
drakx-f0f0b6d37e864f7ea0b9a589a3056ebe773144db.tar.gz
drakx-f0f0b6d37e864f7ea0b9a589a3056ebe773144db.tar.bz2
drakx-f0f0b6d37e864f7ea0b9a589a3056ebe773144db.tar.xz
drakx-f0f0b6d37e864f7ea0b9a589a3056ebe773144db.zip
load bloaty DBus binding on demand (since we don't actually use it for now)
-rw-r--r--perl-install/network/activefw.pm9
1 files changed, 7 insertions, 2 deletions
diff --git a/perl-install/network/activefw.pm b/perl-install/network/activefw.pm
index f8a9d1d6a..2b4392271 100644
--- a/perl-install/network/activefw.pm
+++ b/perl-install/network/activefw.pm
@@ -1,13 +1,12 @@
package network::activefw;
-use Net::DBus;
-use Net::DBus::Binding::Watch;
use Gtk2::Helper;
use Socket;
sub new {
my ($type, $filter) = @_;
+ require Net::DBus;
my $bus = Net::DBus->system;
my $con = $bus->{connection};
@@ -38,6 +37,7 @@ sub set_DBus_watch {
$con->set_watch_callbacks(sub {
my ($con, $watch) = @_;
my $flags = $watch->get_flags;
+ require Net::DBus::Binding::Watch;
if ($flags & &Net::DBus::Binding::Watch::READABLE) {
Gtk2::Helper->add_watch($watch->get_fileno, 'in', sub {
$watch->handle(&Net::DBus::Binding::Watch::READABLE);
@@ -70,6 +70,7 @@ sub call_method {
sub blacklist {
my ($o, $seq, $blacklist) = @_;
+ require Net::DBus::Binding::Watch;
$o->call_method('Blacklist',
Net::DBus::Binding::Value->new(&Net::DBus::Binding::Message::TYPE_UINT32, $seq),
Net::DBus::Binding::Value->new(&Net::DBus::Binding::Message::TYPE_UINT32, $blacklist));
@@ -77,18 +78,21 @@ sub blacklist {
sub unblacklist {
my ($o, $addr) = @_;
+ require Net::DBus::Binding::Watch;
$o->call_method('UnBlacklist',
Net::DBus::Binding::Value->new(&Net::DBus::Binding::Message::TYPE_UINT32, $addr));
}
sub whitelist {
my ($o, $addr) = @_;
+ require Net::DBus::Binding::Watch;
$o->call_method('Whitelist',
Net::DBus::Binding::Value->new(&Net::DBus::Binding::Message::TYPE_UINT32, $addr));
}
sub unwhitelist {
my ($o, $addr) = @_;
+ require Net::DBus::Binding::Watch;
$o->call_method('UnWhitelist',
Net::DBus::Binding::Value->new(&Net::DBus::Binding::Message::TYPE_UINT32, $addr));
}
@@ -100,6 +104,7 @@ sub get_interactive {
sub set_interactive {
my ($o, $mode) = @_;
+ require Net::DBus::Binding::Watch;
$o->call_method('SetMode',
Net::DBus::Binding::Value->new(&Net::DBus::Binding::Message::TYPE_UINT32, $mode));
}