glooxd  0.3-svn
Public Member Functions | List of all members
StreamFeature Class Reference

#include <streamfeature.h>

Inheritance diagram for StreamFeature:
Inheritance graph
[legend]

Public Member Functions

 StreamFeature ()
virtual ~StreamFeature ()
void setParent (StreamBase *parent)
virtual const std::string & filterString () const =0
virtual gloox::Tag * tag (int state, const std::string &domain)=0
virtual StreamFeaturenewInstance () const =0

Detailed Description

This is the base class for a strean feature. It allows to plug new features (and associated processing) into the server.

Author
Jakob Schroeter js@ca.nosp@m.maya.nosp@m..net
Since
0.2

Definition at line 39 of file streamfeature.h.

Constructor & Destructor Documentation

StreamFeature ( )
inline

Constructor.

Definition at line 45 of file streamfeature.h.

virtual ~StreamFeature ( )
inlinevirtual

Virtual destructor.

Definition at line 52 of file streamfeature.h.

Member Function Documentation

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

Returns an XPath expression that describes the elements that are associated with this stream feature.

Returns
An XPath expression.

Implemented in FeatureSTARTTLS, FeatureSASL, FeatureResourceBind, FeatureSession, and FeatureCompression.

virtual StreamFeature* newInstance ( ) const
pure virtual

Returns a new Instance of the derived type. It should be configured identically, but should not inherit any state. The simplest implementation for a derived class FooFeature looks like:

{
return new FooExtension();
}
Returns
The derived feature's new instance.

Implemented in FeatureSTARTTLS, FeatureSASL, FeatureResourceBind, FeatureSession, and FeatureCompression.

void setParent ( StreamBase parent)
inline

Sets the StreamBase instance that will be used for communication. You should not need to use this function manually.

Definition at line 58 of file streamfeature.h.

virtual gloox::Tag* tag ( int  state,
const std::string &  domain 
)
pure virtual

Returns a Tag structire for inclusion in the stream features to send to the client. Features may depend on current stream state and the domain the client requested.

Returns
A feature Tag. May be 0 if there is no applicable feature for the current state and domain.

Implemented in FeatureSTARTTLS, FeatureSASL, FeatureResourceBind, FeatureSession, and FeatureCompression.


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