summaryrefslogtreecommitdiff
path: root/src/rexmpp_jid.h
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2020-11-17 15:07:05 +0300
committerdefanor <defanor@uberspace.net>2020-11-17 15:18:22 +0300
commit48542332c351d21706e61abbd9cb50ce02afac2d (patch)
tree836aa3365f3de12a14bdd7b5ab4188f09eec8815 /src/rexmpp_jid.h
parent0748958c63052a6c4e0fb20a172ae793fdf8fa6c (diff)
Add initial JID parsing
Diffstat (limited to 'src/rexmpp_jid.h')
-rw-r--r--src/rexmpp_jid.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/rexmpp_jid.h b/src/rexmpp_jid.h
new file mode 100644
index 0000000..8613e3d
--- /dev/null
+++ b/src/rexmpp_jid.h
@@ -0,0 +1,24 @@
+/**
+ @file rexmpp_jid.h
+ @brief JID parsing and manipulation
+ @author defanor <defanor@uberspace.net>
+ @date 2020
+ @copyright MIT license.
+*/
+
+#ifndef REXMPP_JID_H
+#define REXMPP_JID_H
+
+/** @brief A redundant structure for easy access to JID parts and
+ avoidance of dynamic allocations. */
+struct rexmpp_jid {
+ char local[1024];
+ char domain[1024];
+ char resource[1024];
+ char bare[2048];
+ char full[3072];
+};
+
+int rexmpp_jid_parse (const char *str, struct rexmpp_jid *jid);
+
+#endif