Bug 28241 - Need tp_channel_dispatch_operation_handle_with_time_{async,finish} API
Summary: Need tp_channel_dispatch_operation_handle_with_time_{async,finish} API
Status: RESOLVED FIXED
Alias: None
Product: Telepathy
Classification: Unclassified
Component: tp-glib (show other bugs)
Version: unspecified
Hardware: Other All
: medium enhancement
Assignee: Guillaume Desmottes
QA Contact: Telepathy bugs list
URL: http://git.collabora.co.uk/?p=user/ca...
Whiteboard: review+ with minor changes
Keywords: patch
Depends on:
Blocks:
 
Reported: 2010-05-25 07:05 UTC by Guillaume Desmottes
Modified: 2010-06-08 05:36 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Guillaume Desmottes 2010-05-25 07:05:41 UTC
High level API on top of HandleWithTime().
Comment 2 Simon McVittie 2010-06-08 03:51:38 UTC
> + * Since: 0.11.5

Untrue.

> + * @user_action_timestamp: the time at which user action occurred

The long description should document what this means in terms of Gtk, something like this:

If an X server timestamp for the user action causing this method call is available, @user_action_timestamp should be this timestamp (for instance, the result of gdk_event_get_time() if it is not %GDK_CURRENT_TIME). Otherwise, it may be 0 to behave as if there was no user action or it happened a long time ago, or %G_MAXINT64 to have the Handler behave as though the user action had just happened (resembling, but not numerically equal to, %GDK_CURRENT_TIME).

It might even be worth adding a utility function:

gint64
tp_user_action_timestamp_from_gdk (guint32 gdk_event_time)
{
  if (gdk_event_time == 0)    /* == GDK_CURRENT_TIME */
    return G_MAXINT64;
  else
    return gdk_event_time;
}

but if we put that function in telepathy-gtk instead (when it exists), we wouldn't have to hard-code the value of GDK_CURRENT_TIME.
Comment 3 Simon McVittie 2010-06-08 03:53:56 UTC
> + * @handler: The well-known bus name (starting with #TP_CLIENT_BUS_NAME_BASE)
> + * of the channel handler that should handle the channel, or %NULL
> + * if the client has no preferred channel handler

Almost forgot: this should be "@handler: (allow-none): The ..."
Comment 4 Guillaume Desmottes 2010-06-08 04:56:49 UTC
Fixed (I amend the commit). I'm not sure this helper is really worth it and I'd see it more in tp-gtk.
Comment 5 Simon McVittie 2010-06-08 05:32:26 UTC
Both occurrences of (allow none) should be (allow-none), as per <http://live.gnome.org/GObjectIntrospection/Annotations>. With that change, r+.
Comment 6 Guillaume Desmottes 2010-06-08 05:36:10 UTC
Thanks, merged to master.


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.