XFcInetAdvertiser class Reference

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

# XFcInetAdvertiser Class Reference

Inet advertiser. More...

Inheritance diagram for XFcInetAdvertiser:

[legend]
Collaboration diagram for XFcInetAdvertiser:

[legend]
List of all members.

## Public Member Functions

virtual XFCIMPORT | ~XFcInetAdvertiser ()
virtual XFCIMPORT void | setGamePort (UINT16 aGamePort)
| Sets game play port.
virtual XFCIMPORT UINT16 | getGamePort () const
| Gets game play port.
virtual XFCIMPORT INT | setMessageHeader (const CHAR8 *aHeader, INT32 aLength)
| Sets message header, e.g. "X-Forge Game: GeoPod".
virtual XFCIMPORT void | getMessageHeader (CHAR8 *aHeader, INT32 &aLength) const
| Gets message header, e.g. "X-Forge Game: GeoPod".
virtual XFCIMPORT INT | setMessageData (const CHAR8 *aData, INT32 aLength)
| Sets other data to message.
virtual XFCIMPORT void | getMessageData (CHAR8 *aData, INT32 &aLength) const
| Gets other message data.
virtual XFCIMPORT INT | isAddress () const
| Test if address is set.

## Static Public Member Functions

XFCIMPORT XFcInetAdvertiser * | create (const XFcAddress &aAddress, const CHAR8 *aMessage, INT32 aMessageLength)
XFCIMPORT XFcInetAdvertiser * | create (const CHAR8 *aMessage, INT32 aMessageLength)
XFCIMPORT XFcInetAdvertiser * | create (const XFcHostEntry &aHostEntry)
XFCIMPORT XFcInetAdvertiser * | create ()

## Public Attributes

XFcHostEntry * | mHostEntry
| Holds advertice receive address.

## Protected Member Functions

| XFcInetAdvertiser ()
| Protected constructor.
INT | init (const XFcAddress &aAddress, const CHAR8 *aMessage, INT32 aMessageLength)
INT | init (const CHAR8 *aMessage, INT32 aMessageLength)
INT | init (const XFcHostEntry &aHostEntry)
INT | init ()
CHAR8 * | getElement (CHAR8 *aBuffer, UINT8 aElement)
| Returns pointer to beginning of the data chunck.
const CHAR8 * | getElement (const CHAR8 *aBuffer, UINT8 aElement) const
INT32 | getElementLength (const CHAR8 *aBuffer, UINT8 aElement) const
INT32 | addElement (CHAR8 *aElement, UINT8 aElementLength, UINT8 aElementId)

## Private Attributes

CHAR8 | mTmpMessage [XFC_MAXBUFFERSIZE]
INT32 | mTmpLength

## Detailed Description

Inet advertiser.

Protocol description:

- id is always one octet long.
- 0x02 header element, element length will follow.
- 0x03 port element, element length is 2 octets.
- 0x04 data element, element length will follow.
- Length field is always 1 octet. One field can be only 255 octets long. [0x02][0x06][HEADER][0x03][0xffff][0x04][0x04][DATA]

## Constructor & Destructor Documentation

XFcInetAdvertiser::XFcInetAdvertiser | ( |  | ) | `[protected]`

| Protected constructor.

virtual XFCIMPORT XFcInetAdvertiser::~XFcInetAdvertiser | ( |  | ) | `[virtual]`

## Member Function Documentation

INT32 XFcInetAdvertiser::addElement | ( | CHAR8 * | aElement,
|  | UINT8 | aElementLength,
|  | UINT8 | aElementId
| ) | `[protected]`

XFCIMPORT XFcInetAdvertiser* XFcInetAdvertiser::create | ( |  | ) | `[static]`

XFCIMPORT XFcInetAdvertiser* XFcInetAdvertiser::create | ( | const XFcHostEntry & | aHostEntry | ) | `[static]`

XFCIMPORT XFcInetAdvertiser* XFcInetAdvertiser::create | ( | const CHAR8 * | aMessage,
|  | INT32 | aMessageLength
| ) | `[static]`

XFCIMPORT XFcInetAdvertiser* XFcInetAdvertiser::create | ( | const XFcAddress & | aAddress,
|  | const CHAR8 * | aMessage,
|  | INT32 | aMessageLength
| ) | `[static]`

const CHAR8* XFcInetAdvertiser::getElement | ( | const CHAR8 * | aBuffer,
|  | UINT8 | aElement
| ) | const`[protected]`

CHAR8* XFcInetAdvertiser::getElement | ( | CHAR8 * | aBuffer,
|  | UINT8 | aElement
| ) | `[protected]`

| Returns pointer to beginning of the data chunck.

INT32 XFcInetAdvertiser::getElementLength | ( | const CHAR8 * | aBuffer,
|  | UINT8 | aElement
| ) | const`[protected]`

virtual XFCIMPORT UINT16 XFcInetAdvertiser::getGamePort | ( |  | ) | const`[virtual]`

| Gets game play port. Reimplemented from XFcAdvertiser.

virtual XFCIMPORT void XFcInetAdvertiser::getMessageData | ( | CHAR8 * | aData,
|  | INT32 & | aLength
| ) | const`[virtual]`

| Gets other message data. Reimplemented from XFcAdvertiser.

virtual XFCIMPORT void XFcInetAdvertiser::getMessageHeader | ( | CHAR8 * | aHeader,
|  | INT32 & | aLength
| ) | const`[virtual]`

| Gets message header, e.g. "X-Forge Game: GeoPod". Reimplemented from XFcAdvertiser.

INT XFcInetAdvertiser::init | ( |  | ) | `[protected]`

INT XFcInetAdvertiser::init | ( | const XFcHostEntry & | aHostEntry | ) | `[protected]`

INT XFcInetAdvertiser::init | ( | const CHAR8 * | aMessage,
|  | INT32 | aMessageLength
| ) | `[protected]`

INT XFcInetAdvertiser::init | ( | const XFcAddress & | aAddress,
|  | const CHAR8 * | aMessage,
|  | INT32 | aMessageLength
| ) | `[protected]`

virtual XFCIMPORT INT XFcInetAdvertiser::isAddress | ( |  | ) | const`[virtual]`

| Test if address is set. Reimplemented from XFcAdvertiser.

virtual XFCIMPORT void XFcInetAdvertiser::setGamePort | ( | UINT16 | aGamePort | ) | `[virtual]`

| Sets game play port. Reimplemented from XFcAdvertiser.

virtual XFCIMPORT INT XFcInetAdvertiser::setMessageData | ( | const CHAR8 * | aData,
|  | INT32 | aLength
| ) | `[virtual]`

| Sets other data to message. Reimplemented from XFcAdvertiser.

virtual XFCIMPORT INT XFcInetAdvertiser::setMessageHeader | ( | const CHAR8 * | aHeader,
|  | INT32 | aLength
| ) | `[virtual]`

| Sets message header, e.g. "X-Forge Game: GeoPod". Reimplemented from XFcAdvertiser.

## Member Data Documentation

XFcHostEntry* XFcInetAdvertiser::mHostEntry

| Holds advertice receive address.

INT32 XFcInetAdvertiser::mTmpLength`[private]`

CHAR8 XFcInetAdvertiser::mTmpMessage[XFC_MAXBUFFERSIZE]`[private]`

|  | X-Forge Documentation Confidential Copyright © 2002-2003 Fathammer |  | Documentation generated with doxygen by Dimitri van Heesch