diff options
Diffstat (limited to 'src/rexmpp_jid.h')
-rw-r--r-- | src/rexmpp_jid.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/rexmpp_jid.h b/src/rexmpp_jid.h new file mode 100644 index 0000000..bfeedcb --- /dev/null +++ b/src/rexmpp_jid.h @@ -0,0 +1,25 @@ +/** + @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); +int rexmpp_jid_check (struct rexmpp_jid *jid); + +#endif |