Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   Related Pages  

ICQ2000::MessageEvent Class Reference

A message event. More...

#include <events.h>

Inheritance diagram for ICQ2000::MessageEvent:

ICQ2000::Event ICQ2000::EmailExEvent ICQ2000::EmailMessageEvent ICQ2000::ICQMessageEvent ICQ2000::SMSMessageEvent ICQ2000::SMSReceiptEvent ICQ2000::AuthAckEvent ICQ2000::AuthReqEvent ICQ2000::AwayMessageEvent ICQ2000::NormalMessageEvent ICQ2000::URLMessageEvent ICQ2000::UserAddEvent List of all members.

Public Types

enum  MessageType {
  Normal, URL, SMS, SMS_Receipt,
  AuthReq, AuthAck, AwayMessage, EmailEx,
  UserAdd, Email
}
 enum of the type of the message.

enum  DeliveryFailureReason {
  Failed, Failed_NotConnected, Failed_ClientNotCapable, Failed_Denied,
  Failed_Ignored, Failed_Occupied, Failed_DND, Failed_SMTP
}

Public Methods

 MessageEvent (ContactRef c)
 Constructor for a MessageEvent. More...

virtual ~MessageEvent ()
 Destructor for MessageEvent.

virtual MessageType getType () const=0
 get the type of the MessageEvent. More...

ContactRef getContact ()
 get the contact related to the event. More...

bool isFinished () const
 get if a message event is finished. More...

bool isDelivered () const
 get if a message event was delivered. More...

bool isDirect () const
 get if a message event was sent direct. More...

void setFinished (bool f)
 set whether the message has been finished. More...

void setDelivered (bool f)
 set whether the message has been delivered. More...

void setDirect (bool f)
 set whether the message has been sent direct. More...

DeliveryFailureReason getDeliveryFailureReason () const
 get the reason for delivery failure. More...

void setDeliveryFailureReason (DeliveryFailureReason d)
 set the reason for delivery failure. More...


Protected Attributes

ContactRef m_contact
 the contact related to the MessageEvent.

bool m_finished
 whether the event is finished.

bool m_delivered
 whether the event was delivered.

bool m_direct
 whether the event was sent direct.

DeliveryFailureReason m_failure_reason

Detailed Description

A message event.

MessageEvents are used for messages, URLs, SMSs, Authorisation request/responses and away messages.


Constructor & Destructor Documentation

ICQ2000::MessageEvent::MessageEvent ContactRef    c
 

Constructor for a MessageEvent.

Parameters:
c  the contact related to this event


Member Function Documentation

ContactRef ICQ2000::MessageEvent::getContact  
 

get the contact related to the event.

Returns:
the contact related to the event

MessageEvent::DeliveryFailureReason ICQ2000::MessageEvent::getDeliveryFailureReason   const
 

get the reason for delivery failure.

Defined when getFinished == false and getDelivered == false too. This is used in the message ack'ing system.

Returns:
reason for delivery failing

virtual MessageType ICQ2000::MessageEvent::getType   const [pure virtual]
 

get the type of the MessageEvent.

Returns:
the type of the message

Implemented in ICQ2000::NormalMessageEvent, ICQ2000::URLMessageEvent, ICQ2000::SMSMessageEvent, ICQ2000::SMSReceiptEvent, ICQ2000::AwayMessageEvent, ICQ2000::AuthReqEvent, ICQ2000::AuthAckEvent, ICQ2000::EmailExEvent, ICQ2000::UserAddEvent, and ICQ2000::EmailMessageEvent.

bool ICQ2000::MessageEvent::isDelivered   const
 

get if a message event was delivered.

This is used in the message ack'ing system.

Returns:
if message was delivered

bool ICQ2000::MessageEvent::isDirect   const
 

get if a message event was sent direct.

This is used in the message ack'ing system.

Returns:
if message was sent direct

bool ICQ2000::MessageEvent::isFinished   const
 

get if a message event is finished.

This is used in the message ack'ing system.

Returns:
if message is finished

void ICQ2000::MessageEvent::setDelivered bool    f
 

set whether the message has been delivered.

Parameters:
f  if message was delivered

void ICQ2000::MessageEvent::setDeliveryFailureReason DeliveryFailureReason    d
 

set the reason for delivery failure.

Used to indicate the failure reason when a client marks a message as not accepted (by setDeliverd(false) in the messaged callback).

Parameters:
d  delivery failure reason

void ICQ2000::MessageEvent::setDirect bool    f
 

set whether the message has been sent direct.

This is used internally by the library and is of no interest to the client.

Parameters:
f  if message was sent direct

void ICQ2000::MessageEvent::setFinished bool    f
 

set whether the message has been finished.

This is used internally by the library and is of no interest to the client.

Parameters:
f  if message was finished


The documentation for this class was generated from the following files:
Generated on Fri Apr 26 23:48:16 2002 for libicq2000 by doxygen1.2.15