diff options
author | Florent Le Coz <louiz@louiz.org> | 2014-05-06 22:39:09 +0200 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2014-05-06 22:39:09 +0200 |
commit | f35db5cebaf1b9e267a7f2341699bb50fbc54c65 (patch) | |
tree | 25b6538c8b3520fb6bd362d367084271f5121c61 /src/xmpp/xmpp_component.cpp | |
parent | 18b27793de8863f58b284ee791a8207a79738b85 (diff) | |
download | biboumi-f35db5cebaf1b9e267a7f2341699bb50fbc54c65.tar.gz biboumi-f35db5cebaf1b9e267a7f2341699bb50fbc54c65.tar.bz2 biboumi-f35db5cebaf1b9e267a7f2341699bb50fbc54c65.tar.xz biboumi-f35db5cebaf1b9e267a7f2341699bb50fbc54c65.zip |
Implement next_id() to
Diffstat (limited to 'src/xmpp/xmpp_component.cpp')
-rw-r--r-- | src/xmpp/xmpp_component.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/xmpp/xmpp_component.cpp b/src/xmpp/xmpp_component.cpp index 60b12dd..9f62514 100644 --- a/src/xmpp/xmpp_component.cpp +++ b/src/xmpp/xmpp_component.cpp @@ -29,6 +29,8 @@ #define STANZA_NS "urn:ietf:params:xml:ns:xmpp-stanzas" #define STREAMS_NS "urn:ietf:params:xml:ns:xmpp-streams" +unsigned long XmppComponent::current_id = 0; + XmppComponent::XmppComponent(const std::string& hostname, const std::string& secret): ever_auth(false), last_auth(false), @@ -783,3 +785,8 @@ void XmppComponent::send_self_disco_info(const std::string& id, const std::strin iq.close(); this->send_stanza(iq); } + +std::string XmppComponent::next_id() +{ + return std::to_string(XmppComponent::current_id++); +} |