about summary refs log tree commit diff stats
path: root/src/xmpp/stanza.h
diff options
context:
space:
mode:
authorMaximilian Wuttke <mwuttke97@posteo.de>2021-03-10 17:26:38 +0100
committerMaximilian Wuttke <mwuttke97@posteo.de>2021-03-11 17:11:22 +0100
commite217ed0b798706fd11d19f1ffc0bdbbb95d55f53 (patch)
treee28734730ffce8996bfb6d4be95e7a08790491cc /src/xmpp/stanza.h
parent96580f917b5c0a061e7bf41714cf48c8e89cd5f8 (diff)
downloadprofani-tty-e217ed0b798706fd11d19f1ffc0bdbbb95d55f53.tar.gz
Update to the newest version of XEP 0363 (HTTP Upload)
Main changes:

1. Attributes instead of tags
2. Read the optional <header> tags and send them in the HTTP PUT header:

   * Authorization
   * Cookie
   * Expires

Co-authored-by: Martin Dosch <martin@mdosch.de>
Diffstat (limited to 'src/xmpp/stanza.h')
-rw-r--r--src/xmpp/stanza.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/xmpp/stanza.h b/src/xmpp/stanza.h
index a4ac6b33..a26bd6ff 100644
--- a/src/xmpp/stanza.h
+++ b/src/xmpp/stanza.h
@@ -106,6 +106,10 @@
 #define STANZA_NAME_SLOT             "slot"
 #define STANZA_NAME_PUT              "put"
 #define STANZA_NAME_GET              "get"
+#define STANZA_NAME_HEADER           "header"
+#define STANZA_HEADER_AUTHORIZATION  "Authorization"
+#define STANZA_HEADER_COOKIE         "Cookie"
+#define STANZA_HEADER_EXPIRES        "Expires"
 #define STANZA_NAME_URL              "url"
 #define STANZA_NAME_COMMAND          "command"
 #define STANZA_NAME_CONFIGURE        "configure"
@@ -178,6 +182,9 @@
 #define STANZA_ATTR_STATUS         "status"
 #define STANZA_ATTR_DATE           "date"
 #define STANZA_ATTR_V4_FINGERPRINT "v4-fingerprint"
+#define STANZA_ATTR_FILENAME       "filename"
+#define STANZA_ATTR_SIZE           "size"
+#define STANZA_ATTR_CONTENTTYPE    "content-type"
 
 #define STANZA_TEXT_AWAY   "away"
 #define STANZA_TEXT_DND    "dnd"
@@ -210,7 +217,7 @@
 // XEP-0373: OpenPGP for XMPP
 #define STANZA_NS_OPENPGP_0               "urn:xmpp:openpgp:0"
 #define STANZA_NS_OPENPGP_0_PUBLIC_KEYS   "urn:xmpp:openpgp:0:public-keys"
-#define STANZA_NS_HTTP_UPLOAD             "urn:xmpp:http:upload"
+#define STANZA_NS_HTTP_UPLOAD             "urn:xmpp:http:upload:0"
 #define STANZA_NS_X_OOB                   "jabber:x:oob"
 #define STANZA_NS_BLOCKING                "urn:xmpp:blocking"
 #define STANZA_NS_COMMAND                 "http://jabber.org/protocol/commands"