[Bug 32004] TpAccount omits some properties, and doesn't notify for others

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Dec 1 14:31:42 CET 2010


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

--- Comment #3 from Will Thompson <will.thompson at collabora.co.uk> 2010-12-01 05:31:41 PST ---
The unpacking would look nicer with tp_value_array_unpack... oh, that doesn't
copy the values. Never mind.

+   * Since: 0.9.0
+   */
+  g_object_class_install_property (object_class, PROP_AUTOMATIC_PRESENCE_TYPE,
+      g_param_spec_uint ("automatic-presence-type",

The Since: annotation lies!

The rest of my comments are nitpicks; I don't mind if they're changed or not.

+  GSimpleAsyncResult *simple;
+
+  g_return_val_if_fail (TP_IS_ACCOUNT (account), FALSE);
+  g_return_val_if_fail (G_IS_SIMPLE_ASYNC_RESULT (result), FALSE);
+
+  simple = G_SIMPLE_ASYNC_RESULT (result);
+
+  if (g_simple_async_result_propagate_error (simple, error))
+    return FALSE;
+
+  g_return_val_if_fail (g_simple_async_result_is_valid (result,
+          G_OBJECT (account), tp_account_set_automatic_presence_async),
FALSE);
+
+  return TRUE;

_tp_implement_finish_void() ?

+  g_value_init (&value, TP_STRUCT_TYPE_SIMPLE_PRESENCE);
+  g_value_take_boxed (&value, dbus_g_type_specialized_construct (
+          TP_STRUCT_TYPE_SIMPLE_PRESENCE));
+  arr = (GValueArray *) g_value_get_boxed (&value);
+
+  g_value_set_uint (arr->values, type);
+  g_value_set_static_string (arr->values + 1, status);
+  g_value_set_static_string (arr->values + 2, message);

Might be nicer as tp_value_array_build(). No big deal though.

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



More information about the telepathy-bugs mailing list