#include <TelepathyQt4/Client/Channel>
Public Slots | |
QDBusPendingReply | AcknowledgePendingMessages (const Telepathy::UIntList &IDs) |
QDBusPendingReply < Telepathy::UIntList > | GetMessageTypes () |
QDBusPendingReply < Telepathy::PendingTextMessageList > | ListPendingMessages (bool clear) |
QDBusPendingReply | Send (uint type, const QString &text) |
Signals | |
void | LostMessage () |
void | Received (uint ID, uint timestamp, uint sender, uint type, uint flags, const QString &text) |
void | SendError (uint error, uint timestamp, uint type, const QString &text) |
void | Sent (uint timestamp, uint type, const QString &text) |
Public Member Functions | |
ChannelTypeTextInterface (const QString &serviceName, const QString &objectPath, QObject *parent=0) | |
ChannelTypeTextInterface (const QDBusConnection &connection, const QString &serviceName, const QString &objectPath, QObject *parent=0) | |
ChannelTypeTextInterface (Telepathy::Client::DBusProxy *proxy) | |
ChannelTypeTextInterface (const Telepathy::Client::ChannelInterface &mainInterface) | |
ChannelTypeTextInterface (const Telepathy::Client::ChannelInterface &mainInterface, QObject *parent) | |
Static Public Member Functions | |
static const char * | staticInterfaceName () |
Protected Member Functions | |
virtual void | invalidate (Telepathy::Client::DBusProxy *, const QString &, const QString &) |
Telepathy::Client::ChannelTypeTextInterface::ChannelTypeTextInterface | ( | const QString & | serviceName, | |
const QString & | objectPath, | |||
QObject * | parent = 0 | |||
) |
Creates a ChannelTypeTextInterface associated with the given object on the session bus.
serviceName | Name of the service the object is on. | |
objectPath | Path to the object on the service. | |
parent | Passed to the parent class constructor. |
Telepathy::Client::ChannelTypeTextInterface::ChannelTypeTextInterface | ( | const QDBusConnection & | connection, | |
const QString & | serviceName, | |||
const QString & | objectPath, | |||
QObject * | parent = 0 | |||
) |
Creates a ChannelTypeTextInterface associated with the given object on the given bus.
connection | The bus via which the object can be reached. | |
serviceName | Name of the service the object is on. | |
objectPath | Path to the object on the service. | |
parent | Passed to the parent class constructor. |
Telepathy::Client::ChannelTypeTextInterface::ChannelTypeTextInterface | ( | Telepathy::Client::DBusProxy * | proxy | ) |
Creates a ChannelTypeTextInterface associated with the same object as the given proxy.
proxy | The proxy to use. It will also be the QObject::parent() for this object. |
Telepathy::Client::ChannelTypeTextInterface::ChannelTypeTextInterface | ( | const Telepathy::Client::ChannelInterface & | mainInterface | ) | [explicit] |
Creates a ChannelTypeTextInterface associated with the same object as the given proxy. Additionally, the created proxy will have the same parent as the given proxy.
mainInterface | The proxy to use. |
Telepathy::Client::ChannelTypeTextInterface::ChannelTypeTextInterface | ( | const Telepathy::Client::ChannelInterface & | mainInterface, | |
QObject * | parent | |||
) |
Creates a ChannelTypeTextInterface associated with the same object as the given proxy. However, a different parent object can be specified.
mainInterface | The proxy to use. | |
parent | Passed to the parent class constructor. |
QDBusPendingReply Telepathy::Client::ChannelTypeTextInterface::AcknowledgePendingMessages | ( | const Telepathy::UIntList & | IDs | ) | [inline, slot] |
Begins a call to the D-Bus method "AcknowledgePendingMessages" on the remote object.
Inform the channel that you have handled messages by displaying them to the user (or equivalent), so they can be removed from the pending queue.
IDs | The IDs of the messages to acknowledge |
References Telepathy::Client::AbstractInterface::invalidationMessage(), and Telepathy::Client::AbstractInterface::invalidationReason().
QDBusPendingReply<Telepathy::UIntList> Telepathy::Client::ChannelTypeTextInterface::GetMessageTypes | ( | ) | [inline, slot] |
Begins a call to the D-Bus method "GetMessageTypes" on the remote object.
Return an array indicating which types of message may be sent on this channel.
References Telepathy::Client::AbstractInterface::invalidationMessage(), and Telepathy::Client::AbstractInterface::invalidationReason().
virtual void Telepathy::Client::ChannelTypeTextInterface::invalidate | ( | Telepathy::Client::DBusProxy * | , | |
const QString & | , | |||
const QString & | ||||
) | [protected, virtual] |
Reimplemented from Telepathy::Client::AbstractInterface.
QDBusPendingReply<Telepathy::PendingTextMessageList> Telepathy::Client::ChannelTypeTextInterface::ListPendingMessages | ( | bool | clear | ) | [inline, slot] |
Begins a call to the D-Bus method "ListPendingMessages" on the remote object.
List the messages currently in the pending queue, and optionally remove then all.
clear | If true, behave as if AcknowledgePendingMessages had also been called. |
References Telepathy::Client::AbstractInterface::invalidationMessage(), and Telepathy::Client::AbstractInterface::invalidationReason().
void Telepathy::Client::ChannelTypeTextInterface::LostMessage | ( | ) | [signal] |
Represents the signal "LostMessage" on the remote object.
This signal is emitted to indicate that an incoming message was not able to be stored and forwarded by the connection manager due to lack of memory.
void Telepathy::Client::ChannelTypeTextInterface::Received | ( | uint | ID, | |
uint | timestamp, | |||
uint | sender, | |||
uint | type, | |||
uint | flags, | |||
const QString & | text | |||
) | [signal] |
Represents the signal "Received" on the remote object.
Signals that a message with the given id, timestamp, sender, type and text has been received on this channel. Applications that catch this signal and reliably inform the user of the message should acknowledge that they have dealt with the message with the AcknowledgePendingMessages method.
ID | A numeric identifier for acknowledging the message | |
timestamp | A Unix timestamp indicating when the message was received | |
sender | The handle of the contact who sent the message | |
type | The type of the message (normal, action, notice, etc.) | |
flags | A bitwise OR of the message flags | |
text | The text of the message |
QDBusPendingReply Telepathy::Client::ChannelTypeTextInterface::Send | ( | uint | type, | |
const QString & | text | |||
) | [inline, slot] |
Begins a call to the D-Bus method "Send" on the remote object.
Request that a message be sent on this channel. When the message has been submitted for delivery, this method will return and the <tp:member-ref>Sent</tp:member-ref> signal will be emitted. If the message cannot be submitted for delivery, the method returns an error and no signal is emitted.
This method SHOULD return before the Sent signal is emitted.
<tp:rationale>
When a Text channel implements the <tp:dbus-ref namespace="org.freedesktop.Telepathy.Channel.Interface">Messages</tp:dbus-ref> interface, that "SHOULD" becomes a "MUST". </tp:rationale>
type | An integer indicating the type of the message | |
text | The message to send |
References Telepathy::Client::AbstractInterface::invalidationMessage(), and Telepathy::Client::AbstractInterface::invalidationReason().
void Telepathy::Client::ChannelTypeTextInterface::SendError | ( | uint | error, | |
uint | timestamp, | |||
uint | type, | |||
const QString & | text | |||
) | [signal] |
Represents the signal "SendError" on the remote object.
Signals that an outgoing message has failed to send. The error will be one of the values from ChannelTextSendError.
This signal should only be emitted for messages for which <tp:member-ref>Sent</tp:member-ref> has already been emitted and <tp:member-ref>Send</tp:member-ref> has already returned success.
error | The error that occurred | |
timestamp | The Unix timestamp indicating when the message was sent | |
type | The message type | |
text | The text of the message |
void Telepathy::Client::ChannelTypeTextInterface::Sent | ( | uint | timestamp, | |
uint | type, | |||
const QString & | text | |||
) | [signal] |
Represents the signal "Sent" on the remote object.
Signals that a message has been submitted for sending.
timestamp | Unix timestamp indicating when the message was sent | |
type | The message type (normal, action, notice, etc) from ChannelTextMessageType | |
text | The text of the message. If the message was, or will be, altered during transmission, this argument SHOULD reflect what other contacts will receive rather than being a copy of the argument to Send. |
static const char* Telepathy::Client::ChannelTypeTextInterface::staticInterfaceName | ( | ) | [inline, static] |
Returns the name of the interface "org.freedesktop.Telepathy.Channel.Type.Text", which this class represents.