gloox 1.0
|
This is an implementation of a basic jabber Component. More...
#include <component.h>
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 () |
void | disconnect () |
Protected Member Functions | |
virtual void | handleStartNode () |
virtual bool | handleNormalNode (Tag *tag) |
virtual bool | checkStreamVersion (const std::string &) |
This is an implementation of a basic jabber Component.
It's using XEP-0114 (Jabber Component Protocol) to authenticate with a server.
Definition at line 33 of file component.h.
Component | ( | const std::string & | ns, |
const std::string & | server, | ||
const std::string & | component, | ||
const std::string & | password, | ||
int | port = 5347 |
||
) |
Constructs a new Component.
ns | The namespace that qualifies the stream. Either jabber:component:accept or jabber:component:connect. See XEP-0114 for details. |
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 27 of file component.cpp.
virtual ~Component | ( | ) | [inline, virtual] |
Virtual Destructor.
Definition at line 52 of file component.h.
virtual bool checkStreamVersion | ( | const std::string & | version | ) | [inline, protected, virtual] |
Implementors of this function can check if they support the advertized stream version. The return value indicates whether or not the stream can be handled. A default implementation is provided.
version | The advertized stream version. |
Reimplemented from ClientBase.
Definition at line 67 of file component.h.
void disconnect | ( | ) | [inline] |
Disconnects from the server.
Definition at line 57 of file component.h.
bool handleNormalNode | ( | Tag * | tag | ) | [protected, virtual] |
This function is called for each Tag. Only stream initiation/negotiation should be done here.
tag | A Tag to handle. |
Implements ClientBase.
Definition at line 50 of file component.cpp.
void handleStartNode | ( | ) | [protected, virtual] |
This function is called right after the opening <stream:stream> was received.
Implements ClientBase.
Definition at line 35 of file component.cpp.