=head1 NAME

Net::Jabber::Loudmouth::Connection -  Jabber connection

=cut

=head1 HIERARCHY

  Glib::Boxed
  +----Net::Jabber::Loudmouth::Connection



=cut

=for object Net::Jabber::Loudmouth::Connection Jabber connection

=cut




=head1 METHODS

=head2 connection = Net::Jabber::Loudmouth::Connection-E<gt>B<new> ($server)

=over

=item * $server (string) 

=back

=head2 connection = Net::Jabber::Loudmouth::Connection-E<gt>B<new_with_context> ($server, $context)

=over

=item * $server (string) 

=item * $context (Glib::MainContext thingamabob) 

=back

=head2 boolean = $connection-E<gt>B<authenticate> ($username, $password, $resource, $auth_cb, $user_data=undef)

=over

=item * $username (string) 

=item * $password (string) 

=item * $resource (string) 

=item * $auth_cb (scalar) 

=item * $user_data (scalar) 

=back

=head2 boolean = $connection-E<gt>B<authenticate_and_block> ($username, $password, $resource)

=over

=item * $username (string) 

=item * $password (string) 

=item * $resource (string) 

=back

=head2 $connection-E<gt>B<cancel_open> 

=head2 boolean = $connection-E<gt>B<close> 

=head2 $connection-E<gt>B<set_disconnect_function> ($disconnect_cb, $user_data=undef)

=over

=item * $disconnect_cb (scalar) 

=item * $user_data (scalar) 

=back

=head2 boolean = $connection-E<gt>B<is_authenticated> 

=head2 boolean = $connection-E<gt>B<is_open> 

=head2 string = $connection-E<gt>B<get_jid> 

=head2 $connection-E<gt>B<set_jid> ($jid)

=over

=item * $jid (string) 

=back

=head2 $connection-E<gt>B<set_keep_alive_rate> ($rate)

=over

=item * $rate (integer) 

=back

=head2 boolean = $connection-E<gt>B<open> ($result_cb, $user_data=undef)

=over

=item * $result_cb (scalar) 

=item * $user_data (scalar) 

=back

=head2 boolean = $connection-E<gt>B<open_and_block> 

=head2 integer = $connection-E<gt>B<get_port> 

=head2 $connection-E<gt>B<set_port> ($port)

=over

=item * $port (integer) 

=back

=head2 proxy = $connection-E<gt>B<get_proxy> 

=head2 $connection-E<gt>B<set_proxy> ($proxy)

=over

=item * $proxy (Net::Jabber::Loudmouth::Proxy or undef) 

=back

=head2 messagehandler = $connection-E<gt>B<register_message_handler> ($type, $priority, $handler_cb, $user_data=undef)

=over

=item * $type (Net::Jabber::Loudmouth::MessageType) 

=item * $priority (Net::Jabber::Loudmouth::HandlerPriority) 

=item * $handler_cb (scalar) 

=item * $user_data (scalar) 

=back

=head2 boolean = $connection-E<gt>B<send> ($message)

=over

=item * $message (Net::Jabber::Loudmouth::Message) 

=back

=head2 boolean = $connection-E<gt>B<send_raw> ($str)

=over

=item * $str (string) 

=back

=head2 boolean = $connection-E<gt>B<send_with_reply> ($message, $handler)

=over

=item * $message (Net::Jabber::Loudmouth::Message) 

=item * $handler (Net::Jabber::Loudmouth::MessageHandler) 

=back

=head2 message = $connection-E<gt>B<send_with_reply_and_block> ($message)

=over

=item * $message (Net::Jabber::Loudmouth::Message) 

=back

=head2 string = $connection-E<gt>B<get_server> 

=head2 $connection-E<gt>B<set_server> ($server)

=over

=item * $server (string) 

=back

=head2 ssl = $connection-E<gt>B<get_ssl> 

=head2 $connection-E<gt>B<set_ssl> ($ssl)

=over

=item * $ssl (Net::Jabber::Loudmouth::SSL or undef) 

=back

=head2 connectionstate = $connection-E<gt>B<get_state> 

=head2 $connection-E<gt>B<unregister_message_handler> ($type, $handler)

=over

=item * $type (Net::Jabber::Loudmouth::MessageType) 

=item * $handler (Net::Jabber::Loudmouth::MessageHandler) 

=back



=cut


=head1 ENUMS AND FLAGS

=head2 enum Net::Jabber::Loudmouth::ConnectionState

=over

=item * 'closed' / 'LM_CONNECTION_STATE_CLOSED'

=item * 'opening' / 'LM_CONNECTION_STATE_OPENING'

=item * 'open' / 'LM_CONNECTION_STATE_OPEN'

=item * 'authenticating' / 'LM_CONNECTION_STATE_AUTHENTICATING'

=item * 'authenticated' / 'LM_CONNECTION_STATE_AUTHENTICATED'

=back


=head2 enum Net::Jabber::Loudmouth::HandlerPriority

=over

=item * 'last' / 'LM_HANDLER_PRIORITY_LAST'

=item * 'normal' / 'LM_HANDLER_PRIORITY_NORMAL'

=item * 'first' / 'LM_HANDLER_PRIORITY_FIRST'

=back


=head2 enum Net::Jabber::Loudmouth::MessageType

=over

=item * 'message' / 'LM_MESSAGE_TYPE_MESSAGE'

=item * 'presence' / 'LM_MESSAGE_TYPE_PRESENCE'

=item * 'iq' / 'LM_MESSAGE_TYPE_IQ'

=item * 'stream' / 'LM_MESSAGE_TYPE_STREAM'

=item * 'stream-error' / 'LM_MESSAGE_TYPE_STREAM_ERROR'

=item * 'stream-features' / 'LM_MESSAGE_TYPE_STREAM_FEATURES'

=item * 'auth' / 'LM_MESSAGE_TYPE_AUTH'

=item * 'challenge' / 'LM_MESSAGE_TYPE_CHALLENGE'

=item * 'response' / 'LM_MESSAGE_TYPE_RESPONSE'

=item * 'success' / 'LM_MESSAGE_TYPE_SUCCESS'

=item * 'failure' / 'LM_MESSAGE_TYPE_FAILURE'

=item * 'proceed' / 'LM_MESSAGE_TYPE_PROCEED'

=item * 'starttls' / 'LM_MESSAGE_TYPE_STARTTLS'

=item * 'unknown' / 'LM_MESSAGE_TYPE_UNKNOWN'

=back




=cut


=head1 SEE ALSO

L<Net::Jabber::Loudmouth>, L<Glib::Boxed>


=cut


=head1 COPYRIGHT

Copyright (C) 2005 by Florian Ragwitz

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.7 or, at your option, any later version of Perl 5 you may have available.


=cut

