about summary refs log tree commit diff stats
path: root/src/xmpp/stanza.h
diff options
context:
space:
mode:
authorMarouane L <techmetx11@disroot.org>2022-09-06 17:29:07 +0100
committerMarouane L <techmetx11@disroot.org>2022-10-18 23:24:30 +0100
commitf934c5b59f2fe2c3c00a50135add4aec55ac4024 (patch)
tree730d135fb92cb15b68717da1f5248c8bc6525019 /src/xmpp/stanza.h
parentfc8455ba34fdb467cc2702e4e071e850eaaf9be7 (diff)
downloadprofani-tty-f934c5b59f2fe2c3c00a50135add4aec55ac4024.tar.gz
Add vCard support
Only nicknames, photos, birthdays, addresses, telephone numbers, emails,
JIDs, titles, roles, notes, and URLs are supported

Due to the synopsis array not having enough space, `/vcard photo
open-self` and `/vcard photo save-self` are not documented properly in
the synopsis section of the `/vcard` command, but they are documented in
the arguments section

Fixed memory leak in vcard autocomplete (thanks to debXwoody)
Diffstat (limited to 'src/xmpp/stanza.h')
-rw-r--r--src/xmpp/stanza.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/xmpp/stanza.h b/src/xmpp/stanza.h
index 12c9a5ee..ddd46e9a 100644
--- a/src/xmpp/stanza.h
+++ b/src/xmpp/stanza.h
@@ -123,6 +123,7 @@
 #define STANZA_NAME_MOOD             "mood"
 #define STANZA_NAME_RECEIVED         "received"
 #define STANZA_NAME_SENT             "sent"
+#define STANZA_NAME_VCARD            "vCard"
 
 // error conditions
 #define STANZA_NAME_BAD_REQUEST             "bad-request"
@@ -249,6 +250,7 @@
 #define STANZA_NS_MOOD_NOTIFY             "http://jabber.org/protocol/mood+notify"
 #define STANZA_NS_STREAMS                 "http://etherx.jabber.org/streams"
 #define STANZA_NS_XMPP_STREAMS            "urn:ietf:params:xml:ns:xmpp-streams"
+#define STANZA_NS_VCARD                   "vcard-temp"
 
 #define STANZA_DATAFORM_SOFTWARE "urn:xmpp:dataforms:softwareinfo"
 
@@ -413,6 +415,7 @@ void stanza_free_caps(XMPPCaps* caps);
 xmpp_stanza_t* stanza_create_avatar_retrieve_data_request(xmpp_ctx_t* ctx, const char* stanza_id, const char* const item_id, const char* const jid);
 xmpp_stanza_t* stanza_create_avatar_data_publish_iq(xmpp_ctx_t* ctx, const char* img_data, gsize len);
 xmpp_stanza_t* stanza_create_avatar_metadata_publish_iq(xmpp_ctx_t* ctx, const char* img_data, gsize len, int height, int width);
+xmpp_stanza_t* stanza_create_vcard_request_iq(xmpp_ctx_t* ctx, const char* const jid, const char* const stanza_id);
 xmpp_stanza_t* stanza_create_mam_iq(xmpp_ctx_t* ctx, const char* const jid, const char* const startdate, const char* const lastid);
 xmpp_stanza_t* stanza_change_password(xmpp_ctx_t* ctx, const char* const user, const char* const password);
 xmpp_stanza_t* stanza_register_new_account(xmpp_ctx_t* ctx, const char* const user, const char* const password);