Bug 28753

Summary: Helper class(es) for observing text channels
Product: Telepathy Reporter: Will Thompson <will>
Component: tp-qtAssignee: Telepathy bugs list <telepathy-bugs>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: enhancement    
Priority: medium    
Version: unspecified   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 35321    

Description Will Thompson 2010-06-25 03:00:49 UTC
It would be nice to have helper classes for observing text channels for a particular Tp::Contact, and perhaps for all contacts (which would make writing a logger much easier, for instance).

Maybe one class could do both, with an optional constructor parameter for the Tp::Contact you're interested in, and signals:

    void messageReceived(Tp::TextChannel *, const Tp::ReceivedMessage &)
    void messageSent(Tp::TextChannel *, const Tp::Message &)

or similar, telling you the particular channel on which the event occurred, and the message itself.

(Later it would also be nice to have a helper on the same class to send a message on the channel, too.)
Comment 1 Will Thompson 2010-11-19 10:29:40 UTC
*** Bug 31768 has been marked as a duplicate of this bug. ***
Comment 2 Will Thompson 2010-11-19 10:30:36 UTC
From the duplicate of my own bug that I just filed:

> It should have a default constructor which gives you THT: Contact
> channels with MessageQueue and MessageSentSignal prepared (and maybe
> MessageCapabilities? I can't tell from its documentation what it does). We
> might want to have other constructors for specifying other features, and also a
> way to tweak the filter (so you can tell it you understand THT: Room and THT:
> None channels too).
> 
> I think it should default to Recover: True.
Comment 3 Andre Moreira Magalhaes 2011-03-18 16:14:45 UTC
Fixed in tp-qt4 0.5.12.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.