Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   Compound Members   File Members  

strmod::strmod::TelnetChunkBuilder Class Reference

Interface class for things that build telnet protocol data streams. More...

#include <StrMod/TelnetChunkBuilder.h>

Inheritance diagram for strmod::strmod::TelnetChunkBuilder:

Inheritance graph
[legend]
List of all members.

Public Methods

virtual int AreYouA (const lcore::ClassIdent &cid) const
 Asks if a class is of a particular type, or publicly derived from that type.

virtual void addDataBlock (size_t regionbegin, size_t regionend)=0
 Add a data block to the stream.

virtual void addCharCommand (TelnetChars::Commands command)=0
 Add a single character telnet command to the stream.

virtual void addNegotiationCommand (TelnetChars::OptionNegotiations negtype, lcore::U1Byte opt_type)=0
 Add a negotiation command to the stream.

virtual void addSuboption (lcore::U1Byte opt_type, size_t regionbegin, size_t regionend, StrChunkPtrT< BufferChunk > &cooked)=0
 Add a suboption to the data stream.


Static Public Attributes

const STR_ClassIdent identifier
 Globally unique identifier for this class.


Protected Methods

virtual const lcore::ClassIdent * i_GetIdent () const
 Returns the class identifier for the class the object actually is.


Detailed Description

Interface class for things that build telnet protocol data streams.

This is an abstract interface used for building up telnet protocol elements block by block. The TelnetParser uses it, and the TelnetChunker implements it to build up TelnetChunker::TelnetChunk objects.

Definition at line 49 of file TelnetChunkBuilder.h.


Member Function Documentation

virtual void strmod::strmod::TelnetChunkBuilder::addDataBlock size_t    regionbegin,
size_t    regionend
[pure virtual]
 

Add a data block to the stream.

Parameters:
regionbegin Where the region begins in some data buffer the child class should know about (STL style).
regionend Where the region begins in some data buffer the child class should know about (STL style).

virtual void strmod::strmod::TelnetChunkBuilder::addNegotiationCommand TelnetChars::OptionNegotiations    negtype,
lcore::U1Byte    opt_type
[pure virtual]
 

Add a negotiation command to the stream.

Negotiations are where two sides of a telnet conversation agree to turn an option off or on. Sometimes turning an option on merely means being willing to communicate more about it through suboption negotiation.

virtual void strmod::strmod::TelnetChunkBuilder::addSuboption lcore::U1Byte    opt_type,
size_t    regionbegin,
size_t    regionend,
StrChunkPtrT< BufferChunk > &    cooked
[pure virtual]
 

Add a suboption to the data stream.

This function will cause a suboption of the specified type to be added to the stream.

Parameters:
opt_type The telnet option this suboption is for.
regionbegin Where the raw suboption data region begins in some data buffer the child class should know about (STL style).
regionend Where the raw suboption data region ends in some data buffer the child class should know about (STL style).
cooked The 'cooked' data with all the escapes processed.

int strmod::strmod::TelnetChunkBuilder::AreYouA const lcore::ClassIdent &    cid const [inline, virtual]
 

Asks if a class is of a particular type, or publicly derived from that type.

Overriden in every derived class (with a static identifier member) to compare against the identifier, then call the AreYouA methods of all the superclasses.

Parameters:
cid Usually <class>::identifier for the class you want to ask if the object is an instance of.

Reimplemented from strmod::lcore::Protocol.

Definition at line 92 of file TelnetChunkBuilder.h.

virtual const lcore::ClassIdent* strmod::strmod::TelnetChunkBuilder::i_GetIdent   const [inline, protected, virtual]
 

Returns the class identifier for the class the object actually is.

Should always be overridden in any class that has a static identifier member.

Reimplemented from strmod::lcore::Protocol.

Definition at line 87 of file TelnetChunkBuilder.h.


Member Data Documentation

const STR_ClassIdent strmod::strmod::TelnetChunkBuilder::identifier [static]
 

Globally unique identifier for this class.

Every class that might need to be identified should have a public static const identifier object in it.

Reimplemented from strmod::lcore::Protocol.


The documentation for this class was generated from the following files:
Generated on Wed Jan 29 00:32:56 2003 for libNet by doxygen1.3-rc1