Telepathy::Client::Message Class Reference
[Channel proxies]

#include <TelepathyQt4/Client/TextChannel>

Inheritance diagram for Telepathy::Client::Message:

Inheritance graph
[legend]

List of all members.


Detailed Description

Object representing a message. These objects are implicitly shared, like QString.

Public Member Functions

 Message (ChannelTextMessageType, const QString &)
 Message (const Message &other)
 ~Message ()
Messageoperator= (const Message &other)
bool operator== (const Message &other) const
bool operator!= (const Message &other) const
QDateTime sent () const
ChannelTextMessageType messageType () const
bool isTruncated () const
bool hasNonTextContent () const
QString messageToken () const
bool isSpecificToDBusInterface () const
QString dbusInterface () const
QString text () const
MessagePart header () const
int size () const
MessagePart part (uint index) const
MessagePartList parts () const

Friends

class TextChannel
class ReceivedMessage

Constructor & Destructor Documentation

Telepathy::Client::Message::Message ( ChannelTextMessageType  type,
const QString &  text 
)

Constructor, from the parameters of the old Send method.

Parameters:
type The message type
text The text of the message

Telepathy::Client::Message::Message ( const Message other  ) 

Copy constructor.

Telepathy::Client::Message::~Message (  ) 

Destructor.


Member Function Documentation

Message & Telepathy::Client::Message::operator= ( const Message other  ) 

Assignment operator.

References mPriv.

bool Telepathy::Client::Message::operator== ( const Message other  )  const

Equality operator.

References mPriv.

bool Telepathy::Client::Message::operator!= ( const Message other  )  const [inline]

QDateTime Telepathy::Client::Message::sent (  )  const

Return the time the message was sent, or QDateTime() if that time is unknown.

Returns:
A timestamp

ChannelTextMessageType Telepathy::Client::Message::messageType (  )  const

Return the type of message this is, or ChannelTextMessageTypeNormal if the type is not recognised.

Returns:
The ChannelTextMessageType for this message

References Telepathy::ChannelTextMessageTypeNormal, and Telepathy::NUM_CHANNEL_TEXT_MESSAGE_TYPES.

Referenced by Telepathy::Client::TextChannel::send().

bool Telepathy::Client::Message::isTruncated (  )  const

Return whether this message was truncated during delivery.

References size().

bool Telepathy::Client::Message::hasNonTextContent (  )  const

Return whether this message contains parts not representable as plain text.

Returns:
true if this message cannot completely be represented as plain text

References isSpecificToDBusInterface(), and size().

QString Telepathy::Client::Message::messageToken (  )  const

Return the unique token identifying this message (e.g. the id attribute for XMPP messages), or an empty string if there is no suitable token.

Returns:
A non-empty message identifier, or an empty string if none

bool Telepathy::Client::Message::isSpecificToDBusInterface (  )  const

Return whether this message is specific to a D-Bus interface. This is false in almost all cases.

If this function returns true, the message is specific to the interface indicated by dbusInterface. Clients that don't understand that interface should not display the message. However, if the client would acknowledge an ordinary message, it must also acknowledge this interface-specific message.

Returns:
true if dbusInterface would return a non-empty string

References dbusInterface().

Referenced by hasNonTextContent().

QString Telepathy::Client::Message::dbusInterface (  )  const

Return the D-Bus interface to which this message is specific, or an empty string for normal messages.

Referenced by isSpecificToDBusInterface().

QString Telepathy::Client::Message::text (  )  const

MessagePart Telepathy::Client::Message::header (  )  const

Return the message's header part, as defined by the Telepathy D-Bus API specification. This is provided for advanced clients that need to access additional information not available through the normal Message API.

Returns:
The same thing as messagepart(0)

References part().

int Telepathy::Client::Message::size (  )  const

Return the number of parts in this message.

Returns:
1 greater than the largest valid argument to part

Referenced by hasNonTextContent(), isTruncated(), and text().

MessagePart Telepathy::Client::Message::part ( uint  index  )  const

Return the message's header part, as defined by the Telepathy D-Bus API specification. This is provided for advanced clients that need to access additional information not available through the normal Message API.

Parameters:
index The part to access, which must be strictly less than size(); part number 0 is the header, parts numbered 1 or greater are the body of the message.
Returns:
Part of the message

Referenced by header().

MessagePartList Telepathy::Client::Message::parts (  )  const


Friends And Related Function Documentation

friend class TextChannel [friend]

friend class ReceivedMessage [friend]


Generated on Fri Feb 27 12:10:27 2009 for TelepathyQt4-0.1.0 by  doxygen 1.5.6