gloox  1.0.28
Public Member Functions | List of all members
Plugin Class Referenceabstract

#include <jingleplugin.h>

Inheritance diagram for Plugin:
Inheritance graph
[legend]

Public Member Functions

 Plugin (JinglePluginType type)
 
virtual ~Plugin ()
 
void addPlugin (const Plugin *plugin)
 
const PluginfindPlugin (int type) const
 
template<class T >
const T * findPlugin (int type) const
 
const PluginListplugins () const
 
virtual const StringList features () const
 
virtual const std::string & filterString () const =0
 
virtual Tagtag () const =0
 
virtual PluginnewInstance (const Tag *tag) const =0
 
virtual Pluginclone () const =0
 
JinglePluginType pluginType () const
 

Detailed Description

An abstraction of a Jingle plugin. This is part of Jingle (XEP-0166 et al.)

This is the base class for Content and all other pluggable Jingle-related containers, e.g. session information, such as the 'ringing' info in Jingle Audio, or Jingle DTMF, etc.

A Plugin abstracts the XML that gets sent and received as part of a Jingle session negotiation.

XEP Version: 1.1

Author
Jakob Schröter js@ca.nosp@m.maya.nosp@m..net
Since
1.0.5

Definition at line 67 of file jingleplugin.h.

Constructor & Destructor Documentation

◆ Plugin()

Plugin ( JinglePluginType  type)
inline

Simple initializer.

Definition at line 76 of file jingleplugin.h.

◆ ~Plugin()

virtual ~Plugin ( )
inlinevirtual

Virtual destructor.

Definition at line 81 of file jingleplugin.h.

Member Function Documentation

◆ addPlugin()

void addPlugin ( const Plugin plugin)
inline

Adds another Plugin as child.

Parameters
pluginA plugin to be embedded. Will be owned by this instance and deleted in the destructor.

Definition at line 87 of file jingleplugin.h.

◆ clone()

virtual Plugin* clone ( ) const
pure virtual

Creates an identical deep copy of the current instance.

Returns
An identical deep copy of the current instance.

Implemented in Session::Reason, ICEUDP, FileTransfer, and Content.

◆ features()

virtual const StringList features ( ) const
inlinevirtual

Reimplement this function if your plugin wants to add anything to the list of features announced via Disco.

Returns
A list of additional feature strings.

Reimplemented in ICEUDP, and FileTransfer.

Definition at line 127 of file jingleplugin.h.

◆ filterString()

virtual const std::string& filterString ( ) const
pure virtual

Returns an XPath expression that describes a path to child elements of a jingle element that the plugin handles. The result should be a single Tag.

Returns
The plugin's filter string.

Implemented in Session::Reason, ICEUDP, FileTransfer, and Content.

◆ findPlugin() [1/2]

const Plugin* findPlugin ( int  type) const
inline

Finds a Jingle::Plugin of a particular type.

Parameters
typeJinglePluginType to search for.
Returns
A pointer to the first Jingle::Plugin of the given type, or 0 if none was found.

Definition at line 94 of file jingleplugin.h.

◆ findPlugin() [2/2]

const T* findPlugin ( int  type) const
inline

Finds a Jingle::Plugin of a particular type. Example:

const MyPlugin* c = plugin.findPlugin<MyPlugin>( PluginMyPlugin );
Parameters
typeThe plugin type to look for.
Returns
The static_cast' type, or 0 if none was found.

Definition at line 111 of file jingleplugin.h.

◆ newInstance()

virtual Plugin* newInstance ( const Tag tag) const
pure virtual

Returns a new instance of the same plugin type, based on the Tag provided.

Parameters
tagThe Tag to parse and create a new instance from.
Returns
The new plugin instance.

Implemented in Session::Reason, ICEUDP, FileTransfer, and Content.

◆ plugins()

const PluginList& plugins ( ) const
inline

Returns a reference to a list of embedded plugins.

Returns
A reference to a list of embedded plugins.

Definition at line 120 of file jingleplugin.h.

◆ pluginType()

JinglePluginType pluginType ( ) const
inline

Returns the plugin type.

Returns
The plugin type.

Definition at line 162 of file jingleplugin.h.

◆ tag()

virtual Tag* tag ( ) const
pure virtual

Returns a Tag representation of the plugin.

Returns
A Tag representation of the plugin.

Implemented in Session::Reason, ICEUDP, FileTransfer, and Content.


The documentation for this class was generated from the following file: