Yate
Public Member Functions
XmlElementOut Class Reference

An outgoing XML element. More...

#include <xmpputils.h>

Inheritance diagram for XmlElementOut:
RefObject GenObject

List of all members.

Public Member Functions

 XmlElementOut (XmlElement *element, const char *senderID=0, bool unclose=false)
virtual ~XmlElementOut ()
XmlElementelement () const
bool sent () const
const Stringbuffer ()
const Stringid () const
unsigned int dataCount ()
const char * getData (unsigned int &nCount)
void dataSent (unsigned int nCount)
XmlElementrelease ()
void toBuffer (String &buffer)
void prepareToSend ()

Detailed Description

An outgoing XML element.

This class holds an XML element to be sent through a stream


Constructor & Destructor Documentation

XmlElementOut ( XmlElement element,
const char *  senderID = 0,
bool  unclose = false 
) [inline]

Constructor

Parameters:
elementThe XML element
senderIDOptional sender id
uncloseTrue to not close the tag when building the buffer
virtual ~XmlElementOut ( ) [inline, virtual]

Destructor Delete m_element if not 0

References TelEngine::destruct().


Member Function Documentation

const String& buffer ( ) [inline]

Get the data buffer

Returns:
The data buffer
unsigned int dataCount ( ) [inline]

Get the remainig byte count to send

Returns:
The unsent number of bytes

References String::length().

void dataSent ( unsigned int  nCount) [inline]

Increase the offset with nCount bytes. Set the sent flag

Parameters:
nCountThe number of bytes sent
XmlElement* element ( ) const [inline]

Get the underlying element

Returns:
The underlying element
const char* getData ( unsigned int &  nCount) [inline]

Get the remainig data to send. Set the buffer if not already set

Parameters:
nCountThe number of unsent bytes
Returns:
Pointer to the remaining data or 0
const String& id ( ) const [inline]

Get the id member

Returns:
The id member
void prepareToSend ( ) [inline]

Fill the buffer with the XML element to send

XmlElement* release ( ) [inline]

Release the ownership of m_element The caller is responsable of returned pointer

Returns:
XmlElement pointer or 0
bool sent ( ) const [inline]

Check if this element was (partially) sent

Returns:
True if an attempt to send this element was already done
void toBuffer ( String buffer) [inline]

Fill a buffer with the XML element to send

Parameters:
bufferThe buffer to fill

References String::empty().


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