[Telepathy] Accessing the ContactList for a connection.
Michael R. Head
burner at suppressingfire.org
Fri Feb 15 10:54:36 PST 2008
Gotcha. Thanks Simon.
mike
On Fri, 2008-02-15 at 18:44 +0000, Simon McVittie wrote:
> On Fri, 15 Feb 2008 at 13:06:04 -0500, Michael R. Head wrote:
> > On Fri, 2008-02-15 at 01:16 -0500, Michael R. Head wrote:
> > > I'm curious about
> > > org.freedesktop.Telepathy.Connection.Interface.ContactInfo and why it's
> > > deprecated, but apparently not replaced?
> > > http://telepathy.freedesktop.org/spec.html#org.freedesktop.Telepathy.Connection.Interface.ContactInfo
> > > THIS INTERFACE IS DEPRECATED AND SHOULD NOT BE USED. A new
> > > version will be proposed in the 0.13 specification branch.
> > >
> > > But the spec is version 0.17.1, right?
> >
> > Is there a replacement for ContactInfo that I'm missing somewhere?
>
> No. We plan to design one, but there's always been something of a higher
> priority. ContactInfo has never actually been implemented, as far as I
> know.
>
> >
> > > I'm also curious about how to manage memory. Most things use
> > > g_object_ref and _unref, but some things don't need them. For example,
> > > interfaces should be unref()fed, but connections and channels don't?
> >
> > I've mostly been looking through the empathy source and libtelepathy
> > headers (and performing trial and error by calling g_object_unref()
> > unless I get a warning at runtime) to figure out what I can. Am I
> > missing some good informative resource on how to answer these questions
> > myself?
>
> TpChan is a GObject, see appropriate documentation (which in the case of
> libtelepathy is only the source code, I'm afraid...) to see whether each
> function returns a new reference or a "borrowed" reference. Any
> functions named like *_new() should be returning new references,
> so you do need to unref.
>
> > > Also, how is the OUT_arg1 of tp_conn_iface_aliasing_request_aliases
> > > meant to be collected?
> >
> > OUT_arg1 is is an array of strings. Are they meant to be freed by the
> > caller, or are they managed elsewhere? (or, a better question, how can I
> > figure out what needs to be g_free()ed, what needs to be
> > g_object_unref()ed and what needs to be left alone?)
>
> It's a g_malloc()d array of g_malloc()d strings. You free it with
> g_strfreev().
>
> (At some point I'll try to improve the code-gen for telepathy-glib to
> make that sort of thing completely clear.)
>
> Simon
> _______________________________________________
> Telepathy mailing list
> Telepathy at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/telepathy
>
--
Michael R. Head <burner at suppressingfire.org>
http://www.core.binghamton.edu/~burner/new/resume.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 3259 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/telepathy/attachments/20080215/f52b9b5c/attachment.bin
More information about the Telepathy
mailing list