[Bug 25236] TpHandler - a class that implements a Client.Handler

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Thu Apr 22 14:06:50 CEST 2010


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

--- Comment #15 from Simon McVittie <simon.mcvittie at collabora.co.uk> 2010-04-22 05:06:49 PDT ---
I haven't done a detailed review, just skim-reading. You're going in the right
sort of direction, except that ObserveChannels should be more OO and more
convenient.

>  tp_base_client_register (TpBaseClient *self)
...
> +  dbus_g_connection_register_g_object (

This could use the new API on TpDBusDaemon to not need the DBusGConnection.

> +struct _TpBaseClientClass {
> +    /*<private>*/
> +    GObjectClass parent_class;
> +    TpDBusPropertiesMixinClass dbus_properties_class;
> +};

This should probably have a bit of ABI padding; add GCallback[4] or something?

> +TpObserveChannelsContext * tp_observe_channels_context_new (

Internal functions like this one should start with "_tp" so they're not ABI.

> +    g_type_add_class_private (g_define_type_id, sizeof (

Needs a dependency on GLib 2.24. I think it's legitimate for 0.11.x to have
that dependency, but wjt might disagree.

> +typedef void (*TpBaseClientClassObserveChannelsImpl) (
> +    TpBaseClient *self,
> +    const gchar *account,
> +    const gchar *connection,
> +    const GPtrArray *channels,
> +    const gchar *dispatch_operation,
> +    const GPtrArray *requests,
> +    TpObserveChannelsContext *context);

@account should be a TpAccount that's guaranteed to have CORE ready.

@connection should be a TpConnection that's guaranteed to have CORE ready.
(Note that this does not guarantee it's CONNECTED!)

@channels should be a GList of TpChannel, each of which is guaranteed to have
CORE ready.

@dispatch_operation should be a TpChannelDispatchOperation or NULL. It
shouldn't be (guaranteed|trying) to be ready, even when
TpChannelDispatchOperation has a decent amount of API (because most observers
won't want it to be ready).

@requests should be a GList of TpChannelRequest, which have at least their
object paths (so they can be compared for equality) but are otherwise not
(guaranteed|trying) to be ready.

TpBaseClient should probably have a way to ask for extra features on every
Account, every Connection and every Channel, too, but that's not critical; we
can add it later.

-- 
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- 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