gloox  1.0.16
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 64 of file jingleplugin.h.

Constructor & Destructor Documentation

Plugin ( JinglePluginType  type)
inline

Simple initializer.

Definition at line 73 of file jingleplugin.h.

virtual ~Plugin ( )
inlinevirtual

Virtual destructor.

Definition at line 78 of file jingleplugin.h.

Member Function Documentation

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 84 of file jingleplugin.h.

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

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 124 of file jingleplugin.h.

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

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 91 of file jingleplugin.h.

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 108 of file jingleplugin.h.

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

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 117 of file jingleplugin.h.

JinglePluginType pluginType ( ) const
inline

Returns the plugin type.

Returns
The plugin type.

Definition at line 159 of file jingleplugin.h.

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


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