Component Class Reference

This is an implementation of a basic jabber Component. More...

#include <component.h>

Inherits ClientBase.

Inheritance diagram for Component:

Inheritance graph
[legend]
Collaboration diagram for Component:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Component (const std::string &ns, const std::string &server, const std::string &component, const std::string &password, int port=5347)
virtual ~Component ()
virtual const std::string username () const
virtual const std::string password () const
Discodisco () const
void disconnect ()

Protected Member Functions

virtual void handleStartNode ()
virtual bool handleNormalNode (Stanza *stanza)
virtual bool checkStreamVersion (const std::string &)
virtual void disconnect (ConnectionError reason)

Detailed Description

This is an implementation of a basic jabber Component.

It's using JEP-0114 (Jabber Component Protocol) to authenticate with a server.

Author:
Jakob Schroeter <js@camaya.net>
Since:
0.3

Definition at line 34 of file component.h.


Constructor & Destructor Documentation

Component ( const std::string &  ns,
const std::string &  server,
const std::string &  component,
const std::string &  password,
int  port = 5347 
)

Constructs a new Component.

Parameters:
ns The namespace that qualifies the stream. Either jabber:component:accept or jabber:component:connect.
server The server to connect to.
component The component's hostname. FQDN.
password The component's password.
port The port to connect to. The default of 5347 is the default port of the router in jabberd2.

Definition at line 28 of file component.cpp.

~Component (  )  [virtual]

Virtual Destructor.

Definition at line 39 of file component.cpp.


Member Function Documentation

virtual const std::string username (  )  const [inline, virtual]

Reimplement this function to provide a username for connection purposes.

Returns:
The username.

Implements ClientBase.

Definition at line 56 of file component.h.

virtual const std::string password (  )  const [inline, virtual]

Returns the current password.

Returns:
The password used to connect.

Reimplemented from ClientBase.

Definition at line 59 of file component.h.

Disco* disco (  )  const [inline]

Gives access to the component's Disco object.

Returns:
A pointer to the Disco object.

Definition at line 65 of file component.h.

void disconnect (  ) 

Disconnects from the server.

Definition at line 69 of file component.cpp.


The documentation for this class was generated from the following files:
Generated on Tue May 1 14:20:22 2007 for gloox by  doxygen 1.5.1