Home · All Classes · All Namespaces · Modules · Functions · Files |
The ContactMessenger class provides an easy way to send text messages to a contact and also track sent/receive text messages from the same contact. More...
#include <TelepathyQt/ContactMessenger>
Signals | |
void | messageSent (const Tp::Message &message, Tp::MessageSendingFlags flags, const QString &sentMessageToken, const Tp::TextChannelPtr &channel) |
void | messageReceived (const Tp::ReceivedMessage &message, const Tp::TextChannelPtr &channel) |
Public Member Functions | |
virtual | ~ContactMessenger () |
AccountPtr | account () const |
QString | contactIdentifier () const |
QList< TextChannelPtr > | textChats () const |
PendingSendMessage * | sendMessage (const QString &text, ChannelTextMessageType type=ChannelTextMessageTypeNormal, MessageSendingFlags flags=0) |
PendingSendMessage * | sendMessage (const MessageContentPartList &parts, MessageSendingFlags flags=0) |
![]() | |
QObject (QObject *parent) | |
virtual | ~QObject () |
virtual bool | event (QEvent *e) |
virtual bool | eventFilter (QObject *watched, QEvent *event) |
virtual const QMetaObject * | metaObject () const |
QString | objectName () const |
void | setObjectName (const QString &name) |
bool | isWidgetType () const |
bool | signalsBlocked () const |
bool | blockSignals (bool block) |
QThread * | thread () const |
void | moveToThread (QThread *targetThread) |
int | startTimer (int interval) |
void | killTimer (int id) |
T | findChild (const QString &name) const |
QList< T > | findChildren (const QString &name) const |
QList< T > | findChildren (const QRegExp ®Exp) const |
QObject * | child (const char *objName, const char *inheritsClass, bool recursiveSearch) const |
const QObjectList & | children () const |
void | setParent (QObject *parent) |
void | installEventFilter (QObject *filterObj) |
void | removeEventFilter (QObject *obj) |
bool | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
bool | disconnect (const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *receiver, const char *method) |
void | dumpObjectTree () |
void | dumpObjectInfo () |
bool | setProperty (const char *name, const QVariant &value) |
QVariant | property (const char *name) const |
QList< QByteArray > | dynamicPropertyNames () const |
void | destroyed (QObject *obj) |
QObject * | parent () const |
bool | inherits (const char *className) const |
void | deleteLater () |
QObject (QObject *parent, const char *name) | |
void | insertChild (QObject *object) |
void | removeChild (QObject *object) |
bool | isA (const char *className) const |
const char * | className () const |
const char * | name () const |
const char * | name (const char *defaultName) const |
void | setName (const char *name) |
![]() | |
RefCounted () | |
virtual | ~RefCounted () |
Static Public Member Functions | |
static ContactMessengerPtr | create (const AccountPtr &account, const ContactPtr &contact) |
static ContactMessengerPtr | create (const AccountPtr &account, const QString &contactIdentifier) |
![]() | |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
Additional Inherited Members | |
![]() | |
QObject * | sender () const |
int | senderSignalIndex () const |
int | receivers (const char *signal) const |
virtual void | timerEvent (QTimerEvent *event) |
virtual void | childEvent (QChildEvent *event) |
virtual void | customEvent (QEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | disconnectNotify (const char *signal) |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
![]() | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
![]() | |
objectName | |
The ContactMessenger class provides an easy way to send text messages to a contact and also track sent/receive text messages from the same contact.
|
virtual |
Class destructor.
|
static |
Create a new ContactMessenger object.
account | The account this messenger is communicating with. |
contact | The contact this messenger is communicating with. |
|
static |
Create a new ContactMessenger object.
account | The account this messenger is communicating with. |
contactIdentifier | The identifier of the contact this messenger is communicating with. |
AccountPtr Tp::ContactMessenger::account | ( | ) | const |
Return the account this messenger is communicating with.
QString Tp::ContactMessenger::contactIdentifier | ( | ) | const |
Return the identifier of the contact this messenger is communicating with.
QList< TextChannelPtr > Tp::ContactMessenger::textChats | ( | ) | const |
Return the list of text chats currently being observed.
PendingSendMessage * Tp::ContactMessenger::sendMessage | ( | const QString & | text, |
ChannelTextMessageType | type = ChannelTextMessageTypeNormal , |
||
MessageSendingFlags | flags = 0 |
||
) |
Send a message to the contact identified by contactIdentifier() using account().
Note that the return from this method isn't ordered in any sane way, meaning that messageSent() can be signalled either before or after the returned PendingSendMessage object finishes.
text | The message text. |
type | The message type. |
flags | The message flags. |
PendingSendMessage * Tp::ContactMessenger::sendMessage | ( | const MessageContentPartList & | parts, |
MessageSendingFlags | flags = 0 |
||
) |
Send a message to the contact identified by contactIdentifier() using account().
Note that the return from this method isn't ordered in any sane way, meaning that messageSent() can be signalled either before or after the returned PendingSendMessage object finishes.
parts | The message parts. |
flags | The message flags. |
|
signal |
Emitted whenever a text message on account() is sent to the contact identified by contactIdentifier().
message | The message sent. |
flags | The flags of the message that was sent. |
sentMessageToken | The token of the message that was sent. |
channel | The channel from which the message was sent. |
|
signal |
Emitted whenever a text message on account() is received from the contact identified by contactIdentifier().
message | The message received. |
channel | The channel from which the message was received. |
Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation | Telepathy-Qt 0.9.5 |