#include <TelepathyQt4/Prototype/ChatChannel.h>
Signals | |
void | signalTextMessageReceived (TpPrototype::ChatChannel *chatchannel, uint timestamp, uint type, uint flags, const QString &text) |
void | signalTextMessageSent (TpPrototype::ChatChannel *chatchannel, uint timestamp, uint type, const QString &text) |
Public Member Functions | |
bool | isValid () const |
void | sendTextMessage (const QString &text) |
void | pendingTextMessages () |
~ChatChannel () | |
Protected Slots | |
void | slotSentText (uint timestamp, uint type, const QString &text) |
void | slotLostMessage () |
void | slotSendError (uint error, uint timestamp, uint type, const QString &text) |
void | slotReceivedText (uint ID, uint timestamp, uint sender, uint type, uint flags, const QString &text) |
Protected Member Functions | |
ChatChannel (Contact *contact, Telepathy::Client::ConnectionInterface *connectionInterface, QObject *parent=NULL) | |
void | requestTextChannel (uint handle) |
void | openTextChannel (uint handle, uint handleType, const QString &channelPath, const QString &channelType) |
Friends | |
class | ContactManager |
class | Contact |
ChatChannel::~ChatChannel | ( | ) |
Destructor. Deleting this object forces to drop all channels.
ChatChannel::ChatChannel | ( | Contact * | contact, | |
Telepathy::Client::ConnectionInterface * | connectionInterface, | |||
QObject * | parent = NULL | |||
) | [protected] |
Constructor. Use Contact::chatChannel() to obtain an object of ChatChannel.
References TpPrototype::registerTypes(), and requestTextChannel().
bool ChatChannel::isValid | ( | ) | const |
Validity check. Do not access any functions if this account is invalid.
void ChatChannel::openTextChannel | ( | uint | handle, | |
uint | handleType, | |||
const QString & | channelPath, | |||
const QString & | channelType | |||
) | [protected] |
References slotLostMessage(), slotReceivedText(), slotSendError(), and slotSentText().
Referenced by TpPrototype::ContactManager::openTextChannel(), and requestTextChannel().
void ChatChannel::pendingTextMessages | ( | ) |
Fetch pending text messages. Force to refetch all messages that were sent while the account was offline. A signal signalTextMessageReceived() will be emitted for every message.
References Telepathy::PendingTextMessage::flags, Telepathy::PendingTextMessage::identifier, Telepathy::PendingTextMessage::messageType, requestTextChannel(), Telepathy::PendingTextMessage::sender, slotReceivedText(), Telepathy::PendingTextMessage::text, and Telepathy::PendingTextMessage::unixTimestamp.
void ChatChannel::requestTextChannel | ( | uint | handle | ) | [protected] |
References Telepathy::HandleTypeContact, and openTextChannel().
Referenced by ChatChannel(), pendingTextMessages(), and sendTextMessage().
void ChatChannel::sendTextMessage | ( | const QString & | text | ) |
Send a text message. This function sends a text message to the contact that belongs to this channel.
References requestTextChannel().
void TpPrototype::ChatChannel::signalTextMessageReceived | ( | TpPrototype::ChatChannel * | chatchannel, | |
uint | timestamp, | |||
uint | type, | |||
uint | flags, | |||
const QString & | text | |||
) | [signal] |
A new text message was received. This signal is emmitted right after receiving a new test message.
Referenced by slotReceivedText().
void TpPrototype::ChatChannel::signalTextMessageSent | ( | TpPrototype::ChatChannel * | chatchannel, | |
uint | timestamp, | |||
uint | type, | |||
const QString & | text | |||
) | [signal] |
A text message was sent. This signal is emmitted right after test message was delivered.
Referenced by slotSentText().
void ChatChannel::slotLostMessage | ( | ) | [protected, slot] |
Referenced by openTextChannel().
void ChatChannel::slotReceivedText | ( | uint | ID, | |
uint | timestamp, | |||
uint | sender, | |||
uint | type, | |||
uint | flags, | |||
const QString & | text | |||
) | [protected, slot] |
void ChatChannel::slotSendError | ( | uint | error, | |
uint | timestamp, | |||
uint | type, | |||
const QString & | text | |||
) | [protected, slot] |
Referenced by openTextChannel().
void ChatChannel::slotSentText | ( | uint | timestamp, | |
uint | type, | |||
const QString & | text | |||
) | [protected, slot] |
friend class Contact [friend] |
friend class ContactManager [friend] |