3 # Copyright (C) 2004-2011 Daniel P. Berrange
5 # This program is free software; You can redistribute it and/or modify
6 # it under the same terms as Perl itself. Either:
8 # a) the GNU General Public License as published by the Free
9 # Software Foundation; either version 2, or (at your option) any
14 # b) the "Artistic License"
16 # The file "COPYING" distributed along with this file provides full
17 # details of the terms and conditions of the two licenses.
23 Net::DBus::Binding::Message::Signal - a message encoding a signal
27 use Net::DBus::Binding::Message::Signal;
29 my $signal = Net::DBus::Binding::Message::Signal->new(
30 object_path => "/org/example/myobject",
31 interface => "org.example.myobject",
32 signal_name => "foo_changed");
34 $connection->send($signal);
38 This module is part of the low-level DBus binding APIs, and
39 should not be used by application code. No guarentees are made
40 about APIs under the C<Net::DBus::Binding::> namespace being
41 stable across releases.
43 This module provides a convenience constructor for creating
44 a message representing a signal.
52 package Net::DBus::Binding::Message::Signal;
59 use base qw(Net::DBus::Binding::Message);
62 =item my $signal = Net::DBus::Binding::Message::Signal->new(
63 object_path => $path, interface => $interface, signal_name => $name);
65 Creates a new message, representing a signal [to be] emitted by
66 the object located under the path given by the C<object_path>
67 parameter. The name of the signal is given by the C<signal_name>
68 parameter, and is scoped to the interface given by the
69 C<interface> parameter.
75 my $class = ref($proto) || $proto;
78 my $msg = exists $params{message} ? $params{message} :
79 Net::DBus::Binding::Message::Signal::_create
81 ($params{object_path} ? $params{object_path} : die "object_path parameter is required"),
82 ($params{interface} ? $params{interface} : die "interface parameter is required"),
83 ($params{signal_name} ? $params{signal_name} : die "signal_name parameter is required"));
85 my $self = $class->SUPER::new(message => $msg);
105 Copyright (C) 2004-2009 Daniel P. Berrange
109 L<Net::DBus::Binding::Message>