summaryrefslogtreecommitdiff
path: root/louloulibs/xmpp/jid.hpp
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2017-03-14 21:45:23 +0100
committerlouiz’ <louiz@louiz.org>2017-03-14 21:45:23 +0100
commit0ab40dc1ab4e689921da54080b135e1d22b1c586 (patch)
tree238ac477aa6b29a8d1e187a8d97ecbcbbbc663ef /louloulibs/xmpp/jid.hpp
parent2d3806152e854ace7533fc3ad34d4ac1c44e9687 (diff)
downloadbiboumi-0ab40dc1ab4e689921da54080b135e1d22b1c586.tar.gz
biboumi-0ab40dc1ab4e689921da54080b135e1d22b1c586.tar.bz2
biboumi-0ab40dc1ab4e689921da54080b135e1d22b1c586.tar.xz
biboumi-0ab40dc1ab4e689921da54080b135e1d22b1c586.zip
Refactoring louloulibs and cmake
Use OBJECT libraries Remove the louloulibs directory Write FOUND variables in the cache
Diffstat (limited to 'louloulibs/xmpp/jid.hpp')
-rw-r--r--louloulibs/xmpp/jid.hpp49
1 files changed, 0 insertions, 49 deletions
diff --git a/louloulibs/xmpp/jid.hpp b/louloulibs/xmpp/jid.hpp
deleted file mode 100644
index 85e835c..0000000
--- a/louloulibs/xmpp/jid.hpp
+++ /dev/null
@@ -1,49 +0,0 @@
-#pragma once
-
-
-#include <string>
-
-/**
- * Parse a JID into its different subart
- */
-class Jid
-{
-public:
- explicit Jid(const std::string& jid);
-
- Jid(const Jid&) = delete;
- Jid(Jid&&) = delete;
- Jid& operator=(const Jid&) = delete;
- Jid& operator=(Jid&&) = delete;
-
- std::string domain;
- std::string local;
- std::string resource;
-
- std::string bare() const
- {
- return this->local + "@" + this->domain;
- }
- std::string full() const
- {
- std::string res = this->domain;
- if (!this->local.empty())
- res = this->local + "@" + this->domain;
- if (!this->resource.empty())
- res += "/" + this->resource;
- return res;
- }
-};
-
-/**
- * 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);
-
-