aboutsummaryrefslogtreecommitdiff
path: root/xmpp-vala/src/module/xep/0334_message_processing_hints.vala
diff options
context:
space:
mode:
Diffstat (limited to 'xmpp-vala/src/module/xep/0334_message_processing_hints.vala')
-rw-r--r--xmpp-vala/src/module/xep/0334_message_processing_hints.vala15
1 files changed, 15 insertions, 0 deletions
diff --git a/xmpp-vala/src/module/xep/0334_message_processing_hints.vala b/xmpp-vala/src/module/xep/0334_message_processing_hints.vala
new file mode 100644
index 00000000..352e03ac
--- /dev/null
+++ b/xmpp-vala/src/module/xep/0334_message_processing_hints.vala
@@ -0,0 +1,15 @@
+namespace Xmpp.Xep.MessageProcessingHints {
+
+private const string NS_URI = "urn:xmpp:hints";
+
+private const string HINT_NO_PERMANENT_STORE = "no-permanent-store";
+private const string HINT_NO_STORE = "no-store";
+private const string HINT_NO_COPY = "no-copy";
+private const string HINT_STORE = "store";
+
+public static void set_message_hint(MessageStanza message, string message_hint) {
+ StanzaNode hint_node = (new StanzaNode.build(message_hint, NS_URI)).add_self_xmlns();
+ message.stanza.put_node(hint_node);
+}
+
+}