17 #include "componentbase.h"
21 #include <gloox/connectionhandler.h>
22 #include <gloox/gloox.h>
23 #include <gloox/mutex.h>
31 class ConnectionTCPServer;
70 SM& sm,
bool threading =
false,
95 m_features.push_back( feature );
116 void setSupportRecipientUnavailable(
bool value )
118 m_supportRecipientUnavailable = value;
128 bool supportRecipientUnavailable()
const
130 return m_supportRecipientUnavailable;
134 virtual void handleIncomingConnection( gloox::ConnectionBase* server,
135 gloox::ConnectionBase* connection );
138 virtual void handleIncomingTag( gloox::Tag* tag );
141 virtual void handleOutgoingTag( gloox::Tag* tag );
144 virtual bool handleC2SInterfaceAdded(
const std::string& interface,
148 virtual bool handleC2SInterfaceRemoved(
const std::string& interface,
151 virtual void handleDomainAdded(
const std::string& domain );
154 virtual void handleDomainRemoved(
const std::string& domain );
157 virtual void handleShutdown();
172 gloox::ConnectionError recv(
int timeout = -1 );
179 gloox::ConnectionError receive();
181 void handleTag( gloox::Tag* tag );
183 typedef std::list<gloox::ConnectionTCPServer*> ServerList;
184 typedef std::list<StreamBase*> StreamBaseList;
186 ServerList m_servers;
187 StreamBaseList m_clients;
188 StreamBaseList m_obsoleteClients;
191 gloox::util::Mutex m_clientMutex;
192 gloox::util::Mutex m_obsoleteClientMutex;
193 gloox::util::Mutex m_serverMutex;
197 gloox::TagList m_queue;
199 gloox::util::Mutex m_queueMutex;
201 volatile bool m_threading;
204 bool m_supportRecipientUnavailable;