Home · All Classes · All Namespaces · Modules · Functions · Files
Signals | Public Member Functions | Static Public Member Functions
Tp::SimpleTextObserver Class Reference

The SimpleTextObserver class provides an easy way to track sent/received text messages in an account and can be optionally filtered by a contact. More...

#include <TelepathyQt4/SimpleTextObserver>

Inherits QObject, and Tp::RefCounted.

List of all members.

Signals

Public Member Functions

Static Public Member Functions


Detailed Description

The SimpleTextObserver class provides an easy way to track sent/received text messages in an account and can be optionally filtered by a contact.


Constructor & Destructor Documentation

Tp::SimpleTextObserver::~SimpleTextObserver ( ) [virtual]

Class destructor.


Member Function Documentation

SimpleTextObserverPtr Tp::SimpleTextObserver::create ( const AccountPtr &  account) [static]

Create a new SimpleTextObserver object.

Events will be signalled for all messages sent/received by all contacts in account.

Parameters:
accountThe account used to listen to events.
Returns:
An SimpleTextObserverPtr object pointing to the newly created SimpleTextObserver object.
SimpleTextObserverPtr Tp::SimpleTextObserver::create ( const AccountPtr &  account,
const ContactPtr &  contact 
) [static]

Create a new SimpleTextObserver object.

If contact is not null, events will be signalled for all messages sent/received by contact, otherwise this method works the same as create(const Tp::AccountPtr &).

Parameters:
accountThe account used to listen to events.
contactThe contact used to filter events.
Returns:
An SimpleTextObserverPtr object pointing to the newly created SimpleTextObserver object.
SimpleTextObserverPtr Tp::SimpleTextObserver::create ( const AccountPtr &  account,
const QString contactIdentifier 
) [static]

Create a new SimpleTextObserver object.

If contactIdentifier is non-empty, events will be signalled for all messages sent/received by a contact identified by contactIdentifier, otherwise this method works the same as create(const Tp::AccountPtr &).

Parameters:
accountThe account used to listen to events.
contactIdentifierThe identifier of the contact used to filter events.
Returns:
An SimpleTextObserverPtr object pointing to the newly created SimpleTextObserver object.
AccountPtr Tp::SimpleTextObserver::account ( ) const

Return the account used to listen to events.

Returns:
A pointer to the Account object.
QString Tp::SimpleTextObserver::contactIdentifier ( ) const

Return the identifier of the contact used to filter events, or an empty string if none was provided at construction.

Returns:
The identifier of the contact.
QList< TextChannelPtr > Tp::SimpleTextObserver::textChats ( ) const

Return the list of text chats currently being observed.

Returns:
A list of pointers to TextChannel objects.
void Tp::SimpleTextObserver::messageSent ( const Tp::Message message,
Tp::MessageSendingFlags  flags,
const QString sentMessageToken,
const Tp::TextChannelPtr &  channel 
) [signal]

Emitted whenever a text message on account() is sent. If contactIdentifier() is non-empty, only messages sent to the contact identified by it will be signalled.

Parameters:
messageThe message sent.
flagsThe message flags,
sentMessageTokenThe message token.
channelThe channel which received the message.
void Tp::SimpleTextObserver::messageReceived ( const Tp::ReceivedMessage message,
const Tp::TextChannelPtr &  channel 
) [signal]

Emitted whenever a text message on account() is received. If contactIdentifier() is non-empty, only messages received by the contact identified by it will be signalled.

Parameters:
messageThe message received.
channelThe channel which received the message.


Copyright © 2008-2011 Collabora Ltd. and Nokia Corporation
Telepathy-Qt4 0.6.5