Bug 63070

Summary: Make WockyDataForm API nicer, and use GVariant rather than GValue
Product: Wocky Reporter: Will Thompson <will>
Component: GeneralAssignee: Telepathy bugs list <telepathy-bugs>
Status: NEW --- QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium CC: will
Version: unspecifiedKeywords: patch
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Will Thompson 2013-04-03 10:23:05 UTC
The WockyDataForm API was pretty anaemic and developer-hostile. I've added a bunch of accessors, made the contents of some structs private, and made it use GVariant rather than GValue, thus letting me delete the copy-pasta wocky_g_value_slice_* functions.

http://cgit.collabora.com/git/user/wjt/wocky/log/?h=make-data-forms-use-gvariant

 tests/wocky-data-form-test.c      | 111 ++++++++++------
 tests/wocky-pubsub-node-test.c    |   2 +-
 tests/wocky-pubsub-service-test.c |   4 +-
 wocky/wocky-caps-hash.c           |  69 ++++------
 wocky/wocky-data-form.c           | 417 ++++++++++++++++++++++++++++++++++++++++++++++++----------
 wocky/wocky-data-form.h           |  61 +++++----
 wocky/wocky-utils.c               | 330 ----------------------------------------------
 wocky/wocky-utils.h               |  21 ---
 8 files changed, 485 insertions(+), 530 deletions(-)

http://cgit.collabora.com/git/user/wjt/telepathy-gabble/log/?h=data-forms

 lib/ext/wocky    |  2 +-
 src/connection.c | 30 ++++++++----------------------
 src/ft-manager.c | 28 +++++++++++++---------------
 3 files changed, 22 insertions(+), 38 deletions(-)

I was disappointed that there was not more of a code-size reduction in code which uses WockyDataForm, but then I realised that there is not much code which uses WockyDataForm.

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.