summaryrefslogtreecommitdiff
path: root/src/core/contacts-phones-chunk.vala
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/contacts-phones-chunk.vala')
-rw-r--r--src/core/contacts-phones-chunk.vala15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/contacts-phones-chunk.vala b/src/core/contacts-phones-chunk.vala
index c8e0ce3..5d8a347 100644
--- a/src/core/contacts-phones-chunk.vala
+++ b/src/core/contacts-phones-chunk.vala
@@ -110,4 +110,19 @@ public class Contacts.Phone : BinChunkChild {
copy_parameters (phone);
return phone;
}
+
+ protected override Variant? to_gvariant_internal () {
+ return new Variant ("(sv)", this.raw_number, parameters_to_gvariant ());
+ }
+
+ public override void apply_gvariant (Variant variant)
+ requires (variant.get_type ().equal (new VariantType ("(sv)"))) {
+
+ string phone_nr;
+ Variant params_variant;
+ variant.get ("(sv)", out phone_nr, out params_variant);
+
+ this.raw_number = phone_nr;
+ apply_gvariant_parameters (params_variant);
+ }
}