[Bug 40695] Expose more caps code to plugins

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Wed Sep 28 18:24:18 CEST 2011


--- Comment #6 from Will Thompson <will.thompson at collabora.co.uk> 2011-09-28 09:24:17 PDT ---

The problem with this is, if two different clients cause a CapsChannelManager
to produce two forms with the same FORM_TYPE, we'll get a warning. (Also if two
channel managers produce a 

Now, I don't know of many XEPs which actually use data forms in caps.
(http://xmpp.org/extensions/xep-0232.html is the only one that comes to mind.)
In the Ytstenut case, we have an implicit assumption that there's only one
handler for each service, so we won't get duplicated FORM_TYPEs. So in practice
this is not a problem for now.

Possibly in future the channel manager API could be changed to allow them to
have some way to merge duplicated forms—for duplicated feature URIs the merging
operation is just union, but for forms it's harder.

+static const gchar *
+get_form_type (WockyDataForm *form)
+  WockyDataFormField *field;
+  field = g_hash_table_lookup (form->fields,
+      "FORM_TYPE");
+  g_assert (field != NULL);
+  return field->raw_value_contents[0];

Ugh this should be in wocky_data_form. (I know I know RESOLVED LATER.)

So I think this branch is fine for now, but noting the above caveat in the code
would be good.

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