13 #include "featuresession.h"
14 #include "streambase.h"
16 #include <gloox/gloox.h>
23 : m_state( SessionCanceled )
29 static const std::string filter =
"/iq/session[@xmlns='" + gloox::XMLNS_STREAM_SESSION +
"']";
39 t =
new gloox::Tag(
"session" );
40 t->setXmlns( gloox::XMLNS_STREAM_SESSION );
41 m_state = SessionOffered;
47 void FeatureSession::handleTag( gloox::Tag* _tag )
52 if( m_state == SessionOffered )
54 m_state = SessionDone;
56 gloox::IQ re( gloox::IQ::Result, _tag->findAttribute(
"from" ),
57 _tag->findAttribute(
"id" ));
62 gloox::IQ re( gloox::IQ::Error, _tag->findAttribute(
"from" ),
63 _tag->findAttribute(
"id" ));