summaryrefslogtreecommitdiff
path: root/src/xmpp/jid.hpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2013-12-08 20:14:12 +0100
committerFlorent Le Coz <louiz@louiz.org>2013-12-08 20:14:12 +0100
commitb11126a19dbaadf4c32fb8dbec22754ad0712c26 (patch)
tree140a9c33a264adfb4eee7a0e2add0b6c5ec1671c /src/xmpp/jid.hpp
parentcb718def0cb51aac4c2125e3864522740fcb2573 (diff)
downloadbiboumi-b11126a19dbaadf4c32fb8dbec22754ad0712c26.tar.gz
biboumi-b11126a19dbaadf4c32fb8dbec22754ad0712c26.tar.bz2
biboumi-b11126a19dbaadf4c32fb8dbec22754ad0712c26.tar.xz
biboumi-b11126a19dbaadf4c32fb8dbec22754ad0712c26.zip
Provide a JID for IRC users, and add a stringprep dependency for this
Diffstat (limited to 'src/xmpp/jid.hpp')
-rw-r--r--src/xmpp/jid.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/xmpp/jid.hpp b/src/xmpp/jid.hpp
index 3027497..b6975a2 100644
--- a/src/xmpp/jid.hpp
+++ b/src/xmpp/jid.hpp
@@ -22,5 +22,15 @@ private:
Jid& operator=(Jid&&) = delete;
};
+/**
+ * Prepare the given UTF-8 string according to the XMPP node stringprep
+ * identifier profile. This is used to send properly-formed JID to the XMPP
+ * server.
+ *
+ * If the stringprep library is not found, we return an empty string. When
+ * this function is used, the result must always be checked for an empty
+ * value, and if this is the case it must not be used as a JID.
+ */
+std::string jidprep(const std::string& original);
#endif // JID_INCLUDED