Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members | Related Pages

Stanza Class Reference

XMLStream Stanza object. More...

Inheritance diagram for Stanza:

Inheritance graph
[legend]
Collaboration diagram for Stanza:

Collaboration graph
[legend]
List of all members.

Public Member Functions

Public Attributes

Protected Member Functions


Detailed Description

XMLStream Stanza object.

This is base class for all stanzas. It encapsulate data shared by all stanzas. This class cannot be used directly.


Constructor & Destructor Documentation

void Stanza Object  node,
Object  defaults,
bool  hasId
 

Create new Stanza object.

This class can be initialized from XML Element object or from JavaScript object with those properties:

  • to - JID of receiver
  • from - JID of sender
  • id - String with stanza id.
  • lang - String with language code of stanza.
  • namespace - String with this stanza namespace.
  • nodeName - String with nodeName of this stanza.
Parameters:
node Object with data for this stanza. Can be DOM Element object.
defaults Object with default values. Those values will be used when node doesn't have required parameter.
hasId Should or should not have id attribute. If this parameter is true, and none id attribute was given, new value for it will be generated.


Member Function Documentation

Element createNode void   )  [protected]
 

Create new DOM Element from data gathered in this stanza.

This method should be inherited by all subclasses of Stanza.

Returns:
Generateted DOM Element.

Reimplemented in TreeBasedIQStanza, and TreeBasedStanza.

String generateId  ) 
 

Generate unique id for this stanza.

Returns:
Generated id.

Element getNode  ) 
 

Returns DOM Element created from data gathered in this stanza.

Returns:
DOM Element which contains data from this stanza.

Reimplemented in UnknownIQStanza, and UnknownStanza.


The documentation for this class was generated from the following file:
Generated on Tue Jan 4 01:03:51 2005 for JabberZilla by  doxygen 1.4.0