14#ifndef JINGLEPLUGIN_H__
15#define JINGLEPLUGIN_H__
81 virtual ~Plugin() { util::clearList( m_plugins ) ; }
87 void addPlugin(
const Plugin* plugin ) {
if( plugin ) m_plugins.push_back( plugin ); }
96 PluginList::const_iterator it = m_plugins.begin();
97 for( ; it != m_plugins.end() && (*it)->pluginType() != type; ++it ) ;
98 return it != m_plugins.end() ? (*it) : 0;
113 return static_cast<const T*
>( findPlugin( type ) );
169 void setFactory(
PluginFactory* factory ) { m_factory = factory; }
171 JinglePluginType m_pluginType;
A factory for which creates Plugin instances based on Tags. This is part of Jingle (XEP-0166).
An abstraction of a Jingle plugin. This is part of Jingle (XEP-0166 et al.)
virtual const StringList features() const
const Plugin * findPlugin(int type) const
JinglePluginType pluginType() const
Plugin(JinglePluginType type)
virtual Plugin * newInstance(const Tag *tag) const =0
void addPlugin(const Plugin *plugin)
virtual Tag * tag() const =0
const PluginList & plugins() const
virtual const std::string & filterString() const =0
virtual Plugin * clone() const =0
const T * findPlugin(int type) const
This is an abstraction of an XML element.
std::list< const Plugin * > PluginList
The namespace for the gloox library.
std::list< std::string > StringList