Plugin Class Referenceabstract

`#include <jingleplugin.h>`

Inheritance diagram for Plugin:
[legend]

## Public Member Functions

| Plugin (JinglePluginType type)
virtual | ~Plugin ()
void | addPlugin (const Plugin *plugin)
const Plugin * | findPlugin (int type) const
template<class T>
const T * | findPlugin (int type) const
const PluginList & | plugins () const
virtual const StringList | features () const
virtual const std::string & | filterString () const =0
virtual Tag * | tag () const =0
virtual Plugin * | newInstance (const Tag *tag) const =0
virtual Plugin * | clone () 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 | ( |  | ) |

inline virtual

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

  plugin | A 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 Content, FileTransfer, ICEUDP, and Session::Reason.

## features()

virtual const StringList features | ( |  | ) | const

inline virtual

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 FileTransfer, and ICEUDP.

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 Content, FileTransfer, ICEUDP, and Session::Reason.

## findPlugin() [1/2]

template<class T>

const T * findPlugin | ( | int | type | ) | const

inline

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

const MyPlugin* c = plugin.findPlugin<MyPlugin>( PluginMyPlugin );

Parameters

  type | The plugin type to look for.

Returns
  The static_cast' type, or 0 if none was found.

Definition at line 111 of file jingleplugin.h.

## findPlugin() [2/2]

const Plugin * findPlugin | ( | int | type | ) | const

inline

Finds a Jingle::Plugin of a particular type.

Parameters

  type | JinglePluginType 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.

## 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

  tag | The Tag to parse and create a new instance from.

Returns
  The new plugin instance.

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

## 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 Content, FileTransfer, ICEUDP, and Session::Reason.

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

- jingleplugin.h