1package Protocol::XMPP::Element::Bind;
2$Protocol::XMPP::Element::Bind::VERSION = '0.006';
3use strict;
4use warnings;
5use parent qw(Protocol::XMPP::ElementBase);
6
7=head1 NAME
8
9Protocol::XMPP::Bind - register ability to deal with a specific feature
10
11=head1 VERSION
12
13Version 0.006
14
15=head1 SYNOPSIS
16
17=head1 DESCRIPTION
18
19=head1 METHODS
20
21=cut
22
23=head2 end_element
24
25=cut
26
27sub end_element {
28	my $self = shift;
29	return unless $self->parent->isa('Protocol::XMPP::Element::Features');
30
31	$self->debug("Had bind request");
32	$self->parent->push_pending(my $f = $self->stream->new_future);
33	my $id = $self->next_id;
34	$self->stream->pending_iq($id => $f);
35	$self->write_xml([
36		'iq',
37		'type' => 'set',
38		id => $id,
39		_content => [[
40			'bind',
41			'_ns' => 'xmpp-bind'
42		]]
43	]);
44}
45
461;
47
48__END__
49
50=head1 AUTHOR
51
52Tom Molesworth <cpan@entitymodel.com>
53
54=head1 LICENSE
55
56Copyright Tom Molesworth 2010-2014. Licensed under the same terms as Perl itself.
57