Bug 63070 - Make WockyDataForm API nicer, and use GVariant rather than GValue
Summary: Make WockyDataForm API nicer, and use GVariant rather than GValue
Status: NEW
Alias: None
Product: Wocky
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: Telepathy bugs list
QA Contact: Telepathy bugs list
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2013-04-03 10:23 UTC by Will Thompson
Modified: 2013-04-03 10:28 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

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.