17 #include "componentbase.h"
20 #include <gloox/gloox.h>
21 #include <gloox/jid.h>
22 #include <gloox/mutex.h>
62 const gloox::JID& name = gloox::JID(
"sm." +
GLOOXD_DOMAIN ) );
85 bool createSession( gloox::JID& jid,
const std::string&
id );
93 bool removeSession(
const std::string&
id );
102 m_plugins.push_back( p );
110 void dispatchPresence(
const gloox::Tag* pres );
118 bool dispatchMessage(
const gloox::Tag* msg );
121 virtual void handleIncomingTag( gloox::Tag* tag );
124 virtual void handleOutgoingTag( gloox::Tag* ) {}
127 virtual void handleDomainAdded(
const std::string& domain );
130 virtual void handleDomainRemoved(
const std::string& domain );
133 virtual void handleShutdown();
139 gloox::Tag* presence;
146 typedef std::map<std::string, Session> SessionList;
148 typedef std::list<Plugin*> PluginList;
150 void handleTag( gloox::Tag* tag );
157 const SessionList findSessions(
const gloox::JID& jid );
159 SessionList m_sessions;
160 PluginList m_plugins;
161 RosterProvider* m_rosterProvider;
163 gloox::util::Mutex m_sessionMutex;
165 gloox::TagList m_queue;
167 gloox::util::Mutex m_queueMutex;
169 volatile bool m_threading;