From 7a1aa8c806a63cfd031c082524501e26d4a181ee Mon Sep 17 00:00:00 2001 From: Marvin W Date: Fri, 10 Mar 2017 16:02:32 +0100 Subject: Do not expose UUID lib dependency outside vala-xmpp library --- vala-xmpp/src/module/iq/stanza.vala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'vala-xmpp/src/module/iq') diff --git a/vala-xmpp/src/module/iq/stanza.vala b/vala-xmpp/src/module/iq/stanza.vala index 99d589ff..561c5866 100644 --- a/vala-xmpp/src/module/iq/stanza.vala +++ b/vala-xmpp/src/module/iq/stanza.vala @@ -10,12 +10,12 @@ public class Stanza : Xmpp.Stanza { public const string TYPE_RESULT = "result"; public const string TYPE_SET = "set"; - private Stanza(string id = UUID.generate_random_unparsed()) { + private Stanza(string? id = null) { base.outgoing(new StanzaNode.build("iq")); - this.id = id; + this.id = id ?? random_uuid(); } - public Stanza.get(StanzaNode stanza_node, string id = UUID.generate_random_unparsed()) { + public Stanza.get(StanzaNode stanza_node, string? id = null) { this(id); this.type_ = TYPE_GET; stanza.put_node(stanza_node); @@ -29,7 +29,7 @@ public class Stanza : Xmpp.Stanza { } } - public Stanza.set(StanzaNode stanza_node, string id = UUID.generate_random_unparsed()) { + public Stanza.set(StanzaNode stanza_node, string? id = null) { this(id); type_ = TYPE_SET; stanza.put_node(stanza_node); -- cgit v1.2.3-70-g09d2