14 #ifndef JINGLEPLUGIN_H__ 15 #define JINGLEPLUGIN_H__ 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 ) );
120 const PluginList&
plugins()
const {
return m_plugins; }
136 virtual const std::string& filterString()
const = 0;
142 virtual Tag* tag()
const = 0;
150 virtual Plugin* newInstance(
const Tag* tag )
const = 0;
156 virtual Plugin* clone()
const = 0;
165 PluginList m_plugins;
169 void setFactory(
PluginFactory* factory ) { m_factory = factory; }
179 #endif // JINGLEPLUGIN_H__ An abstraction of a Jingle plugin. This is part of Jingle (XEP-0166 et al.)
virtual const StringList features() const
std::list< std::string > StringList
void clearList(std::list< T * > &L)
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)...
The namespace for the gloox library.
const T * findPlugin(int type) const
const PluginList & plugins() const
const Plugin * findPlugin(int type) const
Plugin(JinglePluginType type)
std::list< const Plugin * > PluginList
This is an abstraction of an XML element.