[Bug 77189] [next] make TpBaseConnection GVariant-based

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Apr 16 06:05:05 PDT 2014


https://bugs.freedesktop.org/show_bug.cgi?id=77189

--- Comment #13 from Simon McVittie <simon.mcvittie at collabora.co.uk> ---
> +  if (TP_IS_PRESENCE_MIXIN (self))
> +    {
> +      _tp_presence_mixin_init (self);
> +    }

I'm still unsure about coupling the Presence1 mixin to TpBaseConnection. OTOH
presence is a fairly fundamental thing in IM... I do appreciate the
simplification, though.

I think I'd still prefer it if the API was more like (Python-like pseudocode)

    def constructed(self):
        super.constructed()

        self.__presence_mixin = Tp.PresenceMixin.new()

    def fill_contact_attributes(self, *args):
        if self.__presence_mixin.fill_contact_attributes(self, *args):
            return
        ...

which I think would be enough to avoid having any glue in TpBaseConnection at
all?

Your TpPresenceMixin(Interface) would have to be renamed to
TpPresenceMixinConnection(Interface) or TpPresenceMixable(Interface) or
something though.

- * @obj: An object with this mixin.
+ * @self: A #TpBaseConnection implemeting #TpPresenceMixinInterface

> -   * g_bus_get_sync() just after it is constructed; if this fails, this
> +   * g_bus_get_sync() just after it is ; if this fails, this

Typo, or deliberate?

 /**
  * TpPresenceMixinGetContactStatusFunc:
- * @obj: An object with this mixin.
+ * @self: A #TpBaseConnection implemeting #TpPresenceMixinInterface

Is this introspectable, or should it take a TpPresenceMixin *?

(If it isn't introspectable, maybe we should change TpBaseContactList while we
still can.)

> + * @statuses: An array of #TpPresenceStatusSpec structures representing all
> + *  presence statuses supported by the protocol, terminated by a NULL name.

I don't think this is introspectable. A vfunc returning the same thing would be
better.

+/* For some reason g-i wants that name */
+typedef struct _TpPresenceMixinInterface TpPresenceMixin;

It should be "typedef struct _TpPresenceMixin TpPresenceMixin" (an incomplete
struct type that is declared but never defined).

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.


More information about the telepathy-bugs mailing list