From f35db5cebaf1b9e267a7f2341699bb50fbc54c65 Mon Sep 17 00:00:00 2001 From: Florent Le Coz Date: Tue, 6 May 2014 22:39:09 +0200 Subject: Implement next_id() to --- src/xmpp/xmpp_component.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/xmpp/xmpp_component.cpp') 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++); +} -- cgit v1.2.3