aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp-vala/src/core')
-rw-r--r--xmpp-vala/src/core/stanza_attribute.vala2
-rw-r--r--xmpp-vala/src/core/stanza_node.vala6
2 files changed, 6 insertions, 2 deletions
diff --git a/xmpp-vala/src/core/stanza_attribute.vala b/xmpp-vala/src/core/stanza_attribute.vala
index 26e63f80..f751c801 100644
--- a/xmpp-vala/src/core/stanza_attribute.vala
+++ b/xmpp-vala/src/core/stanza_attribute.vala
@@ -32,7 +32,7 @@ public class StanzaAttribute : StanzaEntry {
}
}
- public string to_string() {
+ public override string to_string(int i = 0) {
return printf(ATTRIBUTE_STRING_FORMAT);
}
diff --git a/xmpp-vala/src/core/stanza_node.vala b/xmpp-vala/src/core/stanza_node.vala
index 026b8ddb..67b8db35 100644
--- a/xmpp-vala/src/core/stanza_node.vala
+++ b/xmpp-vala/src/core/stanza_node.vala
@@ -42,6 +42,10 @@ public abstract class StanzaEntry {
public virtual unowned string? get_string_content() {
return val;
}
+
+ public virtual string to_string(int i = 0) {
+ return get_string_content() ?? "(null)";
+ }
}
public class StanzaNode : StanzaEntry {
@@ -339,7 +343,7 @@ public class StanzaNode : StanzaEntry {
return sb.str;
}
- public string to_string(int i = 0) {
+ public override string to_string(int i = 0) {
return printf(i, TAG_START_BEGIN_FORMAT, TAG_START_EMPTY_END, TAG_START_CONTENT_END, TAG_END_FORMAT, StanzaAttribute.ATTRIBUTE_STRING_FORMAT);
}