Add API for (de)serialising FolderPath and EmailIdentifier

Supports (de)serialising via GLib.Variant for use as GLib.Action targets
transmission via DBus, etc.
This commit is contained in:
Michael James Gratton 2018-01-03 15:01:21 +11:00
parent f269e552ae
commit dd3a7a1bc8
14 changed files with 251 additions and 13 deletions

View file

@ -26,6 +26,7 @@ public class Geary.FolderPathTest : TestCase {
add_test("path_compare", path_compare);
add_test("path_compare_normalised", path_compare_normalised);
add_test("distinct_roots_compare", distinct_roots_compare);
add_test("variant_representation", variant_representation);
}
public override void set_up() {
@ -305,4 +306,12 @@ public class Geary.FolderPathTest : TestCase {
}
public void variant_representation() throws GLib.Error {
FolderPath orig = this.root.get_child("test");
GLib.Variant variant = orig.to_variant();
FolderPath copy = this.root.from_variant(variant);
assert_true(orig.equal_to(copy));
}
}