[telepathy-qt4/master] TextChannel: Added flags param to send method, enabling support for delivery reports.
Andre Moreira Magalhaes (andrunko)
andre.magalhaes at collabora.co.uk
Mon Nov 2 05:58:59 PST 2009
---
TelepathyQt4/text-channel.cpp | 11 +++++++----
TelepathyQt4/text-channel.h | 6 ++++--
2 files changed, 11 insertions(+), 6 deletions(-)
diff --git a/TelepathyQt4/text-channel.cpp b/TelepathyQt4/text-channel.cpp
index be82cff..bd53bc8 100644
--- a/TelepathyQt4/text-channel.cpp
+++ b/TelepathyQt4/text-channel.cpp
@@ -631,14 +631,15 @@ void TextChannel::forget(const QList<ReceivedMessage> &messages)
}
PendingSendMessage *TextChannel::send(const QString &text,
- ChannelTextMessageType type)
+ ChannelTextMessageType type, MessageSendingFlags flags)
{
Message m(type, text);
PendingSendMessage *op = new PendingSendMessage(m, this);
if (hasMessagesInterface()) {
connect(new QDBusPendingCallWatcher(
- messagesInterface()->SendMessage(m.parts(), 0)),
+ messagesInterface()->SendMessage(m.parts(),
+ (uint) flags)),
SIGNAL(finished(QDBusPendingCallWatcher *)),
op,
SLOT(onMessageSent(QDBusPendingCallWatcher *)));
@@ -651,14 +652,16 @@ PendingSendMessage *TextChannel::send(const QString &text,
return op;
}
-PendingSendMessage *TextChannel::send(const MessagePartList &parts)
+PendingSendMessage *TextChannel::send(const MessagePartList &parts,
+ MessageSendingFlags flags)
{
Message m(parts);
PendingSendMessage *op = new PendingSendMessage(m, this);
if (hasMessagesInterface()) {
connect(new QDBusPendingCallWatcher(
- messagesInterface()->SendMessage(m.parts(), 0)),
+ messagesInterface()->SendMessage(m.parts(),
+ (uint) flags)),
SIGNAL(finished(QDBusPendingCallWatcher *)),
op,
SLOT(onMessageSent(QDBusPendingCallWatcher *)));
diff --git a/TelepathyQt4/text-channel.h b/TelepathyQt4/text-channel.h
index 6210a8f..f4cc08e 100644
--- a/TelepathyQt4/text-channel.h
+++ b/TelepathyQt4/text-channel.h
@@ -92,9 +92,11 @@ public Q_SLOTS:
void forget(const QList<ReceivedMessage> &messages);
PendingSendMessage *send(const QString &text,
- ChannelTextMessageType type = ChannelTextMessageTypeNormal);
+ ChannelTextMessageType type = ChannelTextMessageTypeNormal,
+ MessageSendingFlags flags = 0);
- PendingSendMessage *send(const MessagePartList &parts);
+ PendingSendMessage *send(const MessagePartList &parts,
+ MessageSendingFlags flags = 0);
inline PendingOperation *inviteContacts(
const QList<ContactPtr> &contacts,
--
1.5.6.5
More information about the telepathy-commits
mailing list