class XmlElementOut

An outgoing XML element. More...

Full nameTelEngine::XmlElementOut
Definition#include <libs/yjabber/xmpputils.h>
InheritsTelEngine::RefObject [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods


Detailed Description

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

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

XmlElementOut

Constructor

Parameters:
elementThe XML element
senderIDOptional sender id
uncloseTrue to not close the tag when building the buffer

 ~XmlElementOut ()

~XmlElementOut

[virtual]

Destructor Delete m_element if not 0

inline XmlElement*  element ()

element

[const]

Get the underlying element

Returns: The underlying element

inline bool  sent ()

sent

[const]

Check if this element was (partially) sent

Returns: True if an attempt to send this element was already done

inline const String&  buffer ()

buffer

Get the data buffer

Returns: The data buffer

inline const String&  id ()

id

[const]

Get the id member

Returns: The id member

inline unsigned int  dataCount ()

dataCount

Get the remainig byte count to send

Returns: The unsent number of bytes

inline const char*  getData (unsigned int& nCount)

getData

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

inline void  dataSent (unsigned int nCount)

dataSent

Increase the offset with nCount bytes. Set the sent flag

Parameters:
nCountThe number of bytes sent

inline XmlElement*  release ()

release

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

Returns: XmlElement pointer or 0

inline void  toBuffer (String& buffer)

toBuffer

Fill a buffer with the XML element to send

Parameters:
bufferThe buffer to fill

inline void  prepareToSend ()

prepareToSend

Fill the buffer with the XML element to send


Generated by: paulc on bussard on Tue Mar 8 18:42:27 2011, using kdoc 2.0a54.