jabberd14 1.6.2
Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends
xmppd::lwresc::lwquery Class Reference

#include <jabberdlib.h>

Inheritance diagram for xmppd::lwresc::lwquery:
xmppd::lwresc::rrsetbyname

Public Member Functions

uint32_t getSerial () const

Protected Member Functions

 lwquery ()
virtual ~lwquery ()
void write_header (std::ostream &os, uint32_t opcode, size_t rdata_len) const

Static Protected Member Functions

static void write_uint16 (std::ostream &os, uint16_t value)
static void write_uint32 (std::ostream &os, uint32_t value)

Protected Attributes

uint16_t flags
uint32_t serial

Friends

std::ostream & operator<< (std::ostream &os, const lwquery &lwq)

Detailed Description

query to a lwresd


Constructor & Destructor Documentation

xmppd::lwresc::lwquery::lwquery ( ) [protected]

Constructor for a lwquery. As a lwquery instance should (and cannot) be created, this is only to be called by child classes

xmppd::lwresc::lwquery::~lwquery ( ) [protected, virtual]

Cleanup the data of the base class


Member Function Documentation

uint32_t xmppd::lwresc::lwquery::getSerial ( ) const

References serial.

void xmppd::lwresc::lwquery::write_header ( std::ostream &  os,
uint32_t  opcode,
size_t  rdata_len 
) const [protected]

writes the lwpacket header

Parameters:
oswhere to write to
opcodethe opcode for the light-weight resolver query
rdata_lenlength of the data, that will follow the lwpacket header

References flags, serial, write_uint16(), and write_uint32().

void xmppd::lwresc::lwquery::write_uint16 ( std::ostream &  os,
uint16_t  value 
) [static, protected]

helper to serialize a 16 bit value to a stream in network byte order

Parameters:
osthe stream to serialize to
valuethe value to serialize

Referenced by write_header(), and write_uint32().

void xmppd::lwresc::lwquery::write_uint32 ( std::ostream &  os,
uint32_t  value 
) [static, protected]

helper to serialize a 32 bit value to a stream in network byte order

Parameters:
osthe stream to serialize to
valuethe value to serialize

References write_uint16().

Referenced by write_header().


Friends And Related Function Documentation

std::ostream& operator<< ( std::ostream &  os,
const lwquery lwq 
) [friend]

function to serialize a lwquery to a std::ostream


Field Documentation

uint16_t xmppd::lwresc::lwquery::flags [protected]

packet flags

Referenced by write_header().

uint32_t xmppd::lwresc::lwquery::serial [protected]

query serial number

Referenced by getSerial(), and write_header().


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