Home · All Classes · All Namespaces · Modules · Functions · Files
Signals | Public Member Functions | Static Public Member Functions

Tp::SimpleTextObserver Class Reference
[Account proxies]

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

#include <TelepathyQt4/SimpleTextObserver>

Inherits 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/receive 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:
account The 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:
account The account used to listen to events.
contact The 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:
account The account used to listen to events.
contactIdentifier The 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:
The account used to listen to events.
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 used to filter events.
void Tp::SimpleTextObserver::messageSent ( const Tp::Message message,
Tp::MessageSendingFlags  flags,
const QString &  sentMessageToken,
const Tp::TextChannelPtr channel 
) [signal]

This signal is 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.

void Tp::SimpleTextObserver::messageReceived ( const Tp::ReceivedMessage message,
const Tp::TextChannelPtr channel 
) [signal]

This signal is 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.


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