14 #ifndef JINGLEPLUGIN_H__
15 #define JINGLEPLUGIN_H__
84 void addPlugin(
const Plugin* plugin ) {
if( plugin ) m_plugins.push_back( plugin ); }
93 PluginList::const_iterator it = m_plugins.begin();
94 for( ; it != m_plugins.end() && (*it)->pluginType() != type; ++it ) ;
95 return it != m_plugins.end() ? (*it) : 0;
110 return static_cast<const T*
>( findPlugin( type ) );
117 const PluginList&
plugins()
const {
return m_plugins; }
133 virtual const std::string& filterString()
const = 0;
139 virtual Tag* tag()
const = 0;
147 virtual Plugin* newInstance(
const Tag* tag )
const = 0;
153 virtual Plugin* clone()
const = 0;
162 PluginList m_plugins;
166 void setFactory(
PluginFactory* factory ) { m_factory = factory; }
176 #endif // JINGLEPLUGIN_H__
An abstraction of a Jingle plugin. This is part of Jingle (XEP-0166 et al.)
std::list< std::string > StringList
void clearList(std::list< T * > &L)
const PluginList & plugins() const
void addPlugin(const Plugin *plugin)
JinglePluginType pluginType() const
A factory for which creates Plugin instances based on Tags. This is part of Jingle (XEP-0166)...
const T * findPlugin(int type) const
The namespace for the gloox library.
virtual const StringList features() const
Plugin(JinglePluginType type)
std::list< const Plugin * > PluginList
This is an abstraction of an XML element.
const Plugin * findPlugin(int type) const