NAME

Net::AIM::TOC::Message - AIM Message object

DESCRIPTION

The Net::AIM::TOC::Message object is returned by the Net::AIM::TOC::recv_from_aol method. It provides a simple means of interrogating a received message to find out if it is an incoming instant message, error message, etc.

It should never be necessary to create this object.

SYNOPSIS

use Error qw( :try );
use Net::AIM::TOC;

try {
  my $aim = Net::AIM::TOC->new;
  $aim->sign_on( $screenname, $password );

  ...

  my $msgObj = $aim->recv_from_aol;
  if( $msgObj->getType eq 'IM_IN' ) {
    print $msgObj->getMsg, "\n";

  ...

CLASS INTERFACE

OBJECT METHODS

getType ()

Returns the type of the message. The type can be one of the following (see the Toc PROTOCOL document for a full explanation):

-IM_IN
-ERROR
-UPDATE_BUDDY
-NICK
getMsg ()

Returns the content of the message (only available to IM_IN and ERROR messages).

getRawData ()

Returns the raw message as it was received.

getTocType ()

Returns the type of TOC of the message. The type returned is an integer which can be one of the following:

-1 (SIGNON) 
-2 (DATA)
-5 (KEEPALIVE)
getSender ()

Returns sender of the instant message (only available to IM_IN messages).

isAutoResponse ()

Returns true if the message was an auto-generated response (only available to IM_IN messages).

getBuddy ()

Returns the buddy name (only available to UPDATE_BUDDY messages).

getOnlineStatus ()

Returns the online status of the buddy (only available to UPDATE_BUDDY messages).

getEvilAmount ()

Returns the evil amount of the buddy (only available to UPDATE_BUDDY messages).

getSignonTime ()

Returns the time (in epoch) at which the buddy signed on (only available to UPDATE_BUDDY messages).

getIdleTime ()

Returns the idle time (in minutes) of the buddy (only available to UPDATE_BUDDY messages).

getUserClass ()

Returns the user class of the buddy (only available to UPDATE_BUDDY messages).

KNOWN BUGS

None, but that does not mean there are not any.

SEE ALSO

Net::AIM::TOC

AUTHOR

Alistair Francis, http://search.cpan.org/~friffin/