AnyEvent-XMPP
view release on metacpan or search on metacpan
and the other way around too in Net::XMPP2::Error::Stanza
- fallback namespace function for simxml() is now enabled all the time,
now default namespaces are nearly always generated an the namespace of a
node fallsback to the parent node if none was supplied.
- increased test timeout to 20 secs and offered an environment variable
to override it.
- the XML writer doesn't write a encoding declaration anymore, for the sake
of XMPP.
0.06 Wed Aug 1 15:53:56 CEST 2007
- reply_iq_result and reply_iq_error now attach a from attribute themselves.
- added general instructions for the test suite which also seems to be
useful to test servers :-)
- implemented XEP-0092
- reviewed the message API a bit, take care
- started implementation of MUC (XEP-0045).
- added support for:
- XEP-0082 - XMPP Date and Time Profiles
- XEP-0091 - Delayed Delivery (legacy)
- XEP-0203 - Delayed Delivery (new)
- reworked subscription system a bit, now you have to subscribe
lib/AnyEvent/XMPP/Component.pm view on Meta::CPAN
."AnyEvent::XMPP::Component why this is an error!"
}
=back
=head1 EVENTS
These additional events can be registered on with C<reg_cb>:
NOTE: The event C<stream_pre_authentication> should _not_ be handled
and just ignored. Don't attach callbacks to it!
=over 4
=item session_ready
This event indicates that the component has connected successfully
and can now be used to transmit stanzas.
=back
lib/AnyEvent/XMPP/Connection.pm view on Meta::CPAN
}
});
}
=item B<send_presence ($type, $create_cb, %attrs)>
This method sends a presence stanza, for the meanings
of C<$type>, C<$create_cb> and C<%attrs> please take a look
at the documentation for C<send_presence> method of L<AnyEvent::XMPP::Writer>.
This methods does attach an id attribute to the presence stanza and
will return the id that was used (so you can react on possible replies).
=cut
sub send_presence {
my ($self, $type, $create_cb, %attrs) = @_;
my $id = $self->{iq_id}++;
$self->{writer}->send_presence ($id, $type, $create_cb, %attrs);
$id
}
=item B<send_message ($to, $type, $create_cb, %attrs)>
This method sends a message stanza, for the meanings
of C<$to>, C<$type>, C<$create_cb> and C<%attrs> please take a look
at the documentation for C<send_message> method of L<AnyEvent::XMPP::Writer>.
This methods does attach an id attribute to the message stanza and
will return the id that was used (so you can react on possible replies).
=cut
sub send_message {
my ($self, $to, $type, $create_cb, %attrs) = @_;
my $id = delete $attrs{id} || $self->{iq_id}++;
$self->{writer}->send_message ($id, $to, $type, $create_cb, %attrs);
$id
}
lib/AnyEvent/XMPP/IM/Message.pm view on Meta::CPAN
used by the C<make_reply> method.
=item lang => $lang
This is the default language that will be used to tag the values
passed in the C<body> and C<subject> argument to C<new>.
=item body => $body
This is the text C<$body> of the message either with the language
tag from the C<lang> attached or without any language tag.
If you want to attach multiple bodies with different languages use the C<add_body>
method.
=item subject => $subject
This is the C<$subject> of the message either with the language
tag from the C<lang> attached or without any language tag.
If you want to attach the subject with a different language use the C<add_subject>
method.
=item type => $type
This field sets the type of the message. See also the L<type> method below.
The default value for C<$type> is 'normal'.
=back
lib/AnyEvent/XMPP/IM/Message.pm view on Meta::CPAN
}
$self
}
=item B<subjects>
This method returns a list of key value pairs
with the language tag as key and the subject as value.
The subject which has the empty string as key has no
language attached.
=cut
sub subjects {
%{$_[0]->{subjects} || {}}
}
=item B<body ([$lang])>
This method returns the body of this message.
lib/AnyEvent/XMPP/IM/Message.pm view on Meta::CPAN
}
$self
}
=item B<bodies>
This method returns a list of key value pairs
with the language tag as key and the body as value.
The body which has the empty string as key has no
language attached.
=cut
sub bodies {
%{$_[0]->{bodies} || {}}
}
=item B<append_creation ($create_cb)>
This method allows the user to append custom XML stuff to the message
lib/AnyEvent/XMPP/Parser.pm view on Meta::CPAN
return;
}
=item B<nseq ($namespace, $tagname, $cmptag)>
This method checks whether the C<$cmptag> matches the C<$tagname>
in the C<$namespace>.
C<$cmptag> needs to come from the XML::Parser::Expat as it has
some magic attached that stores the namespace.
=cut
sub nseq {
my ($self, $ns, $name, $tag) = @_;
unless (exists $self->{nso}->{$ns}->{$name}) {
$self->{nso}->{$ns}->{$name} =
$self->{parser}->generate_ns_name ($name, $ns);
}
( run in 1.349 second using v1.01-cache-2.11-cpan-e1769b4cff6 )