Bric::Util::Trans::JabUser3Contributed Perl DocumBric::Util::Trans::Jabber(3p)



NAME
       Bric::Util::Trans::Jabber - Utility class for sending instant messages.

VERSION
       $LastChangedRevision$

DATE
       $LastChangedDate: 2006-03-18 01:26:34 +0100 (Sat, 18 Mar 2006) $

SYNOPSIS
         use Bric::Util::Trans::Jabber;
         my $j = Bric::Util::Trans::Jabber->new(
           { to      => ['jchaddickerson@aol.jabber.org'],
             subject => 'Greetings',
             message => 'This is an instant message sent via Bric::Util::Trans::Jabber'
            });
         $j->send;

DESCRIPTION
       This class provides a thin abstraction to the Net::Jabber module. Use
       it to send instant messages from within Bricolage applications.

INTERFACE
   Constructors
       my $j = Bric::Util::Trans::Jabber->new($init)
           Instantiates a Bric::Util::Trans::Jabber object. An anonymous of
           initial values may be passed. The supported intial value keys are:

           o   to - Anonymous array of instant message addresses to send mail
               to. Be sure to include a full address and server name in email
               address style, as this is what jabber uses to send the message
               to the proper network. For example,
               'jchaddickerson@aol.jabber.org'.

           o   subject - The subject of the message.

           o   message - The message to be sent.

           Throws:

           o   Incorrect number of args to Bric::_set().

           o   Bric::set() - Problems setting fields.

           Side Effects: NONE.

           Notes: NONE.

   Destructors
       $org->DESTROY
           Dummy method to prevent wasting time trying to AUTOLOAD DESTROY.

           Throws: NONE.

           Side Effects: NONE.

           Notes: NONE.

   Public Class Methods
       NONE.

   Public Instance Methods
       my $to_aref = $j->get_to
           Returns an anonymous array of addresses to which to send the
           instant message.

           Throws:

           o   Bad AUTOLOAD method format.

           o   Cannot AUTOLOAD private methods.

           o   Access denied: READ access for field '' required.

           o   No AUTOLOAD method.

           Side Effects: NONE.

           Notes: NONE.

       $self = $j->set_to($to_aref)
           Sets the list of addresses to which to send the instant message.
           Pass in the list as an anonymous array.

           Throws:

           o   Bad AUTOLOAD method format.

           o   Cannot AUTOLOAD private methods.

           o   Access denied: WRITE access for field 'to' required.

           o   No AUTOLOAD method.

           Side Effects: NONE.

           Notes: NONE.

       my $sub = $j->get_subject
           Returns the subject of the instant message.

           Throws:

           o   Bad AUTOLOAD method format.

           o   Cannot AUTOLOAD private methods.

           o   Access denied: READ access for field 'subject' required.

           o   No AUTOLOAD method.

           Side Effects: NONE.

           Notes: NONE.

       $self = $j->set_subject($sub)
           Sets subject of the instant message.

           Throws:

           o   Bad AUTOLOAD method format.

           o   Cannot AUTOLOAD private methods.

           o   Access denied: WRITE access for field 'subject' required.

           o   No AUTOLOAD method.

           Side Effects: NONE.

           Notes: NONE.

       my $msg = $j->get_message
           Returns the message (body) of the instant message.

           Throws:

           o   Bad AUTOLOAD method format.

           o   Cannot AUTOLOAD private methods.

           o   Access denied: READ access for field 'message' required.

           o   No AUTOLOAD method.

           Side Effects: NONE.

           Notes: NONE.

       $self = $j->set_message($msg)
           Sets message (body) of the instant message.

           Throws:

           o   Bad AUTOLOAD method format.

           o   Cannot AUTOLOAD private methods.

           o   Access denied: WRITE access for field 'message' required.

           o   No AUTOLOAD method.

           Side Effects: NONE.

           Notes: NONE.

       $self = $j->send
           Sends the instant message to the addresses stored in to.

           Throws:

           o   Unable to send instant message.

           Side Effects: NONE.

           Notes: NONE.

PRIVATE
   Private Class Methods
       NONE.

   Private Instance Methods
       NONE.

   Private Functions
       NONE.

NOTES
       NONE.

AUTHOR
       David Wheeler <david@justatheory.com>

SEE ALSO
       Bric, Net::Jabber



perl v5.12.2                      2006-03-17     Bric::Util::Trans::Jabber(3p)
