diff options
author | Florent Le Coz <louiz@louiz.org> | 2015-12-03 21:09:26 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2015-12-03 21:15:22 +0100 |
commit | 700a6c7bc39aa48af5037ecbb9778b20fb6f87df (patch) | |
tree | d5f1b23da3ceadf2f476a4a0bdb83f1e52359318 /louloulibs/xmpp | |
parent | 756b297045c5ec3ce051b48379a692d80398ef47 (diff) | |
download | biboumi-700a6c7bc39aa48af5037ecbb9778b20fb6f87df.tar.gz biboumi-700a6c7bc39aa48af5037ecbb9778b20fb6f87df.tar.bz2 biboumi-700a6c7bc39aa48af5037ecbb9778b20fb6f87df.tar.xz biboumi-700a6c7bc39aa48af5037ecbb9778b20fb6f87df.zip |
JID class provides bare() and full() methods
Diffstat (limited to 'louloulibs/xmpp')
-rw-r--r-- | louloulibs/xmpp/jid.hpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/louloulibs/xmpp/jid.hpp b/louloulibs/xmpp/jid.hpp index b6975a2..e2ee586 100644 --- a/louloulibs/xmpp/jid.hpp +++ b/louloulibs/xmpp/jid.hpp @@ -15,6 +15,15 @@ public: std::string local; std::string resource; + std::string bare() const + { + return this->local + "@" + this->domain; + } + std::string full() const + { + return this->local + "@" + this->domain + "/" + this->resource; + } + private: Jid(const Jid&) = delete; Jid(Jid&&) = delete; |