Bug 54874

Summary: further storage refactoring: be more variant-based internally
Product: Telepathy Reporter: Simon McVittie <smcv>
Component: mission-controlAssignee: Simon McVittie <smcv>
Status: RESOLVED FIXED QA Contact: Telepathy bugs list <telepathy-bugs>
Severity: normal    
Priority: medium CC: jonny.lamb
Version: unspecifiedKeywords: patch
Hardware: Other   
OS: All   
URL: http://cgit.freedesktop.org/~smcv/telepathy-mission-control/log/?h=storage-refactor-54874
Whiteboard:
i915 platform: i915 features:
Bug Depends on: 54780    
Bug Blocks:    
Attachments: mcd_keyfile_set_value: implement in terms of a new mcd_keyfile_set_variant
mcd_keyfile_escape_value: implement in terms of mcd_keyfile_escape_variant
mcd_keyfile_get_value: implement in terms of a new mcd_keyfile_get_variant

Description Simon McVittie 2012-09-13 15:17:56 UTC
This is part 5 of my account storage refactoring megabranch. It's probably non-critical, although beware that I haven't yet tested part 6 without this refactoring applied.
Comment 1 Will Thompson 2012-11-07 17:40:45 UTC
This looks okay, but it doesn't seem to improve much in and of itself: it moves the conversions to a different place. (I guess the ultimate goal is to bubble them right out so they go away entirely.)
Comment 2 Simon McVittie 2012-11-08 11:15:44 UTC
(In reply to comment #1)
> (I guess the ultimate goal is to bubble them right out so they
> go away entirely.)

Yes. I could try rebasing Bug #54875 to happen before this, and not merge this one until it enables something practically-useful, if you'd prefer?
Comment 3 Simon McVittie 2013-10-29 14:27:25 UTC
Created attachment 88301 [details] [review]
mcd_keyfile_set_value: implement in terms of a new  mcd_keyfile_set_variant

---

Not needed for Bug #54874, but provides symmetry with the one above.
Comment 4 Simon McVittie 2013-10-29 14:29:32 UTC
Created attachment 88302 [details] [review]
mcd_keyfile_escape_value: implement in terms of  mcd_keyfile_escape_variant

It was previously the other way round.

Similarly, implement mcd_storage_coerce_variant_to_value in terms of
mcd_keyfile_escape_variant.

---

Also not needed for Bug #54875, but it avoids some indirection if the previous patch is applied.

I've just noticed that the last patch band should actually have been part of the previous patch - not that it matters much if both are merged.
Comment 5 Simon McVittie 2013-10-29 14:30:25 UTC
Created attachment 88303 [details] [review]
mcd_keyfile_get_value: implement in terms of a new  mcd_keyfile_get_variant

---

This is actually the only one needed for Bug #54875. I thought I'd already attached this - please s/above/below/ in the previous comments :-)
Comment 6 Guillaume Desmottes 2013-10-29 14:31:24 UTC
Comment on attachment 88301 [details] [review]
mcd_keyfile_set_value: implement in terms of a new  mcd_keyfile_set_variant

Review of attachment 88301 [details] [review]:
-----------------------------------------------------------------

++
Comment 7 Guillaume Desmottes 2013-10-31 08:10:41 UTC
Comment on attachment 88302 [details] [review]
mcd_keyfile_escape_value: implement in terms of  mcd_keyfile_escape_variant

Review of attachment 88302 [details] [review]:
-----------------------------------------------------------------

++
Comment 8 Guillaume Desmottes 2013-10-31 08:12:17 UTC
Comment on attachment 88303 [details] [review]
mcd_keyfile_get_value: implement in terms of a new  mcd_keyfile_get_variant

Review of attachment 88303 [details] [review]:
-----------------------------------------------------------------

++
Comment 9 Simon McVittie 2013-10-31 14:49:40 UTC
Fixed in git for 5.17.0, thanks.

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.