[Bug 26171] New: Need ContactMonitor helper

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Fri Jan 22 16:57:19 CET 2010


http://bugs.freedesktop.org/show_bug.cgi?id=26171

           Summary: Need ContactMonitor helper
           Product: Telepathy
           Version: unspecified
          Platform: Other
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: medium
         Component: tp-glib
        AssignedTo: telepathy-bugs at lists.freedesktop.org
        ReportedBy: guillaume.desmottes at collabora.co.uk


I'm adding tube support to a game and have to say that the barrier entry is
still pretty big. If you want to get the list of contacts supporting a specific
tube type you have to:

- Instantiate and prepare an account manager
- Iterate over the accounts and prepare them
- Once an account is ready, get is connection and wait it's ready
- Make an EnsureChannel() call per contact list channel.
- Instantiate a TpChannel and wait it's ready.
- Get the members and call GetContactCapabilities()
- Iterate over the caps and call tp_connection_get_contacts_by_handle() with
the handles supporting the desired tube.
- Finally, you have the TpContacts supporting the tube!

Each of these points is a separated function; and we don't even support
updating yet!

TpGlib should have a ContactMonitor object (or something like that) to which
you pass the kind of channels you want to be supported, does all that boring
job for you and returns a list of TpContact.
It would also connect the needed signals and notify you when new contacts are
added and removed.


-- 
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the telepathy-bugs mailing list