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 <TelepathyQt/SimpleTextObserver>
Inherits QObject, and Tp::RefCounted.
The SimpleTextObserver class provides an easy way to track sent/received text messages in an account and can be optionally filtered by a contact. 
  
  | 
        
          | Tp::SimpleTextObserver::~SimpleTextObserver | ( |  | ) |  |  | virtual | 
 
 
  
  | 
        
          | 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
- 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
- 
  
    | message | The message sent. |  | flags | The message flags, |  | sentMessageToken | The message token. |  | channel | The 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
- 
  
    | message | The message received. |  | channel | The channel which received the message. |