TelepathyQt4: Tp::ReceivedMessage Class Reference

| Home · All Classes · All Namespaces · Modules · Functions · Files

# Tp::ReceivedMessage Class Reference
[Channel proxies]

The ReceivedMessage class is a subclass of Message, representing a received message. More...

`#include <TelepathyQt4/TextChannel>`

Inherits Tp::Message.

List of all members.

## Public Member Functions

- ReceivedMessage (const ReceivedMessage &other)
- ReceivedMessage & operator= (const ReceivedMessage &other)
- ~ReceivedMessage ()
- QDateTime received () const
- ContactPtr sender () const
- bool isScrollback () const
- bool isRescued () const
- bool isFromChannel (const TextChannelPtr &channel) const

## Detailed Description

The ReceivedMessage class is a subclass of Message, representing a received message.

It contains additional information that's generally only available on received messages.

## Constructor & Destructor Documentation

Tp::ReceivedMessage::ReceivedMessage | ( | const ReceivedMessage & | other | ) |

Copy constructor.

Tp::ReceivedMessage::~ReceivedMessage | ( |  | ) |

Destructor.

## Member Function Documentation

ReceivedMessage & Tp::ReceivedMessage::operator= | ( | const ReceivedMessage & | other | ) |

Assignment operator.

QDateTime Tp::ReceivedMessage::received | ( |  | ) | const

Return the time the message was received.

Returns:
  A timestamp

ContactPtr Tp::ReceivedMessage::sender | ( |  | ) | const

Return the Contact who sent the message, or ContactPtr(0) if unknown.

Returns:
  The sender or ContactPtr(0)

bool Tp::ReceivedMessage::isScrollback | ( |  | ) | const

Return whether the incoming message was part of a replay of message history.

If true, loggers can use this to improve their heuristics for elimination of duplicate messages (a simple, correct implementation would be to avoid logging any message that has this flag).

Returns:
  whether the scrollback flag is set

bool Tp::ReceivedMessage::isRescued | ( |  | ) | const

Return whether the incoming message was seen in a previous channel during the lifetime of this Connection, but was not acknowledged before that chanenl closed, causing the channel in which it now appears to open.

If true, loggers should not log this message again.

Returns:
  whether the rescued flag is set

bool Tp::ReceivedMessage::isFromChannel | ( | const TextChannelPtr & | channel | ) | const