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

# ChannelInterfaceMessagesInterface Class Reference
[Channel proxies]

`#include <TelepathyQt4/Channel>`

Inherits Tp::AbstractInterface.

List of all members.

## Public Slots

- QDBusPendingReply< QString > SendMessage (const Tp::MessagePartList &message, uint flags)
- QDBusPendingReply
  < Tp::MessagePartContentMap > GetPendingMessageContent (uint messageID, const Tp::UIntList &parts)

## Signals

- void MessageSent (const Tp::MessagePartList &content, uint flags, const QString &messageToken)
- void PendingMessagesRemoved (const Tp::UIntList &messageIDs)
- void MessageReceived (const Tp::MessagePartList &message)

## Public Member Functions

- ChannelInterfaceMessagesInterface (const QString &busName, const QString &objectPath, QObject *parent=0)
- ChannelInterfaceMessagesInterface (const QDBusConnection &connection, const QString &busName, const QString &objectPath, QObject *parent=0)
- ChannelInterfaceMessagesInterface (Tp::DBusProxy *proxy)
- ChannelInterfaceMessagesInterface (const Tp::Client::ChannelInterface &mainInterface)
- ChannelInterfaceMessagesInterface (const Tp::Client::ChannelInterface &mainInterface, QObject *parent)
- QStringList SupportedContentTypes () const TELEPATHY_GNUC_DEPRECATED
- uint MessagePartSupportFlags () const TELEPATHY_GNUC_DEPRECATED
- Tp::MessagePartListList PendingMessages () const TELEPATHY_GNUC_DEPRECATED
- uint DeliveryReportingSupport () const TELEPATHY_GNUC_DEPRECATED

## Static Public Member Functions

- static const char * staticInterfaceName ()

## Protected Member Functions

- virtual void invalidate (Tp::DBusProxy *, const QString &, const QString &)

## Properties

- QStringList SupportedContentTypes
- uint MessagePartSupportFlags
- Tp::MessagePartListList PendingMessages
- uint DeliveryReportingSupport

## Detailed Description

Proxy class providing a 1:1 mapping of the D-Bus interface "org.freedesktop.Telepathy.Channel.Interface.Messages."

## Constructor & Destructor Documentation

ChannelInterfaceMessagesInterface | ( | const QString & | busName,
|  | const QString & | objectPath,
|  | QObject * | parent = `0` |
| ) |  |  |

Creates a ChannelInterfaceMessagesInterface associated with the given object on the session bus.

Parameters:

  | busName | Name of the service the object is on.
  | objectPath | Path to the object on the service.
  | parent | Passed to the parent class constructor.

ChannelInterfaceMessagesInterface | ( | const QDBusConnection & | connection,
|  | const QString & | busName,
|  | const QString & | objectPath,
|  | QObject * | parent = `0` |
| ) |  |  |

Creates a ChannelInterfaceMessagesInterface associated with the given object on the given bus.

Parameters:

  | connection | The bus via which the object can be reached.
  | busName | Name of the service the object is on.
  | objectPath | Path to the object on the service.
  | parent | Passed to the parent class constructor.

ChannelInterfaceMessagesInterface | ( | Tp::DBusProxy * | proxy | ) |

Creates a ChannelInterfaceMessagesInterface associated with the same object as the given proxy.

Parameters:

  | proxy | The proxy to use. It will also be the QObject::parent() for this object.

ChannelInterfaceMessagesInterface | ( | const Tp::Client::ChannelInterface & | mainInterface | ) | `[explicit]`

Creates a ChannelInterfaceMessagesInterface associated with the same object as the given proxy. Additionally, the created proxy will have the same parent as the given proxy.

Parameters:

  | mainInterface | The proxy to use.

ChannelInterfaceMessagesInterface | ( | const Tp::Client::ChannelInterface & | mainInterface,
|  | QObject * | parent |
| ) |  |  |

Creates a ChannelInterfaceMessagesInterface associated with the same object as the given proxy. However, a different parent object can be specified.

Parameters:

  | mainInterface | The proxy to use.
  | parent | Passed to the parent class constructor.

## Member Function Documentation

static const char* staticInterfaceName | ( |  | ) | `[inline, static]`

Returns the name of the interface "org.freedesktop.Telepathy.Channel.Interface.Messages", which this class represents.

Returns:
  The D-Bus interface name.

QStringList SupportedContentTypes | ( |  | ) | const`[inline]`

Getter for the remote object property "SupportedContentTypes".

Don't use this: it blocks the main loop.

Returns:
  The value of the property, or a default-constructed value if the property is not readable.

uint MessagePartSupportFlags | ( |  | ) | const`[inline]`

Getter for the remote object property "MessagePartSupportFlags".

Don't use this: it blocks the main loop.

Returns:
  The value of the property, or a default-constructed value if the property is not readable.

Tp::MessagePartListList PendingMessages | ( |  | ) | const`[inline]`

Getter for the remote object property "PendingMessages".

Don't use this: it blocks the main loop.

Returns:
  The value of the property, or a default-constructed value if the property is not readable.

uint DeliveryReportingSupport | ( |  | ) | const`[inline]`

Getter for the remote object property "DeliveryReportingSupport".

Don't use this: it blocks the main loop.

Returns:
  The value of the property, or a default-constructed value if the property is not readable.

QDBusPendingReply<QString> SendMessage | ( | const Tp::MessagePartList & | message,
|  | uint | flags |
| ) |  |  | `[inline, slot]`

Begins a call to the D-Bus method "SendMessage" on the remote object.

Submit a message to the server for sending. If this method returns successfully, the message has been submitted to the server and the <tp:member-ref>MessageSent</tp:member-ref> signal is emitted. A corresponding <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type.Text">Sent</tp:dbus-ref> signal on the Text interface MUST also be emitted.

This method MUST return before the MessageSent signal is emitted.

<tp:rationale>

This means that the process sending the message is the first to see the <tp:type>Sent_Message_Token</tp:type>, and can relate the message to the corresponding <tp:member-ref>MessageSent</tp:member-ref> signal by comparing message tokens (if supported by the protocol). </tp:rationale>

If this method fails, message submission to the server has failed and no signal on this interface (or the Text interface) is emitted.

Parameters:

  | message | The message content, including any attachments or alternatives
  | flags | Flags affecting how the message is sent.

Returns:

An opaque token used to match any incoming delivery or failure reports against this message, or an empty string if the message is not readily identifiable.

QDBusPendingReply<Tp::MessagePartContentMap> GetPendingMessageContent | ( | uint | messageID,
|  | const Tp::UIntList & | parts |
| ) |  |  | `[inline, slot]`

Begins a call to the D-Bus method "GetPendingMessageContent" on the remote object.

Retrieve the content of one or more parts of a pending message. Note that this function may take a considerable amount of time to return if the part's 'needs-retrieval' flag is true; consider extending the default D-Bus method call timeout. Additional API is likely to be added in future, to stream large message parts.

Parameters:

  | messageID | The ID of a pending message
  | parts | The desired entries in the array of message parts, identified by their position. The "headers" part (which is not a valid argument to this method) is considered to be part 0, so the valid part numbers start at 1 (for the second Message_Part).

Returns:

The content of the requested parts. The keys in this mapping are positions in the array of message parts; the values are either of type 's' or 'ay' (UTF-8 text string, or byte array), following the same rules as for the value of the 'content' key in the <tp:type>Message_Part</tp:type> mappings.

If the one of the requested part numbers was greater than zero but referred to a part that had no content (i.e. it had no 'content-type' key or no 'content' key), it is simply omitted from this mapping; this is not considered to be an error condition.

void MessageSent | ( | const Tp::MessagePartList & | content,
|  | uint | flags,
|  | const QString & | messageToken |
| ) |  |  | `[signal]`

Represents the signal "MessageSent" on the remote object.

Signals that a message has been submitted for sending. This MUST be emitted exactly once per emission of the <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Type.Text">Sent</tp:dbus-ref> signal on the Text interface.

<tp:rationale>

This signal allows a process that is not the caller of SendMessage to log sent messages. The double signal-emission provides compatibility with older clients. Clients supporting Messages should listen for Messages.MessageSent only (if the channel has the Messages interface) or Text.Sent only (otherwise). </tp:rationale>

Parameters:

  | content |

The message content (see <tp:type>Message_Part</tp:type> for full details). If the message that was passed to SendMessage has a formatted text part that the connection manager recognises, but no text/plain alternative, the CM MUST use the formatted text part to generate a text/plain alternative which is also included in this signal argument.

If the connection manager can predict that the message will be altered during transmission, this argument SHOULD reflect what other contacts will receive, rather than being a copy of the argument to SendMessage (if the message is truncated, formatting or alternatives are dropped, etc., then the edited version SHOULD appear in this signal).

Parameters:

  | flags | Flags affecting how the message was sent. The flags might be a subset of those passed to SendMessage if the caller requested unsupported flags.
  | messageToken | An opaque token used to match any incoming delivery or failure reports against this message, or an empty string if the message is not readily identifiable.

void PendingMessagesRemoved | ( | const Tp::UIntList & | messageIDs | ) | `[signal]`

Represents the signal "PendingMessagesRemoved" on the remote object.

The messages with the given IDs have been removed from the PendingMessages list. Clients SHOULD NOT attempt to acknowledge those messages. This completes change notification for the PendingMessages property (previously, there was change notification when pending messages were added, but not when they were removed).

Parameters:

  | messageIDs | The messages that have been removed from the pending message list.

void MessageReceived | ( | const Tp::MessagePartList & | message | ) | `[signal]`

Represents the signal "MessageReceived" on the remote object.

Signals that a message has been received and added to the pending messages queue. This MUST be emitted exactly once per emission of the Received signal on the Text interface. The double signal-emission provides compatibility with older clients. Clients supporting Messages should listen for Messages.MessageReceived only (if the channel has the Messages interface) or Text.Received only (otherwise).

Parameters:

  | message | The message content, including any attachments or alternatives

virtual void invalidate | ( | Tp::DBusProxy * | ,
|  | const QString & | ,
|  | const QString & |  |
| ) |  |  | `[protected, virtual]`

## Property Documentation

QStringList SupportedContentTypes`[read]`

Represents property "SupportedContentTypes" on the remote object.

A list of MIME types supported by this channel, with more preferred MIME types appearing earlier in the list. The list MAY include "&#42;&#47;*" to indicate that attachments with arbitrary MIME types can be sent. This list MUST NOT be empty, since all Messages implementations MUST accept messages containing a single "text/plain" part.

Some examples of how this property interacts with the <tp:member-ref>MessagePartSupportFlags</tp:member-ref>:

A simple IM implementation: only plain text messages are allowed

  SupportedContentTypes = ['text/plain'], MessagePartSupportFlags = 0

Formatted text with a plain text alternative is allowed (see the HTML interface draft)

  SupportedContentTypes = ['text/html', 'text/plain'], MessagePartSupportFlags = 0

JPEG or PNG images may be sent, but without any attached text

  SupportedContentTypes = ['text/plain', 'image/jpeg', 'image/png'], MessagePartSupportFlags = 0

Unformatted text to which an optional JPEG or PNG image may be attached

  SupportedContentTypes = ['text/plain', 'image/jpeg', 'image/png'], MessagePartSupportFlags = One_Attachment

Formatted text to which arbitrarily many images may be attached

  SupportedContentTypes = ['text/html', 'text/plain', 'image/jpeg', 'image/png', 'image/x-ms-bmp'], MessagePartSupportFlags = One_Attachment | Multiple_Attachments

A full SIP implementation: arbitrary MIME messages are allowed
  SupportedContentTypes = ['&#42;&#47;*'], MessagePartSupportFlags = One_Attachment | Multiple_Attachments

uint MessagePartSupportFlags`[read]`

Represents property "MessagePartSupportFlags" on the remote object.

Flags indicating the level of support for message parts on this channel.

Tp::MessagePartListList PendingMessages`[read]`

Represents property "PendingMessages" on the remote object.

A list of incoming messages that have neither been acknowledged nor rejected. This list is a more detailed version of the one returned by Text.ListPendingMessages, and contains the same messages, uniquely identified by the same pending message IDs. Its items can be removed using Text.AcknowledgePendingMessages.

uint DeliveryReportingSupport`[read]`

Represents property "DeliveryReportingSupport" on the remote object.

A bitfield indicating features supported by this channel.