#include <component.h>
Inherits ClientBase.
Inheritance diagram for Component:
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 |
Disco * | disco () 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) |
It's using JEP-0114 (Jabber Component Protocol) to authenticate with a server.
Definition at line 34 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. | |
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.
virtual const std::string username | ( | ) | const [inline, virtual] |
Reimplement this function to provide a username for connection purposes.
Implements ClientBase.
Definition at line 56 of file component.h.
virtual const std::string password | ( | ) | const [inline, virtual] |
Returns the current password.
Reimplemented from ClientBase.
Definition at line 59 of file component.h.
Disco* disco | ( | ) | const [inline] |
Gives access to the component's Disco object.
Definition at line 65 of file component.h.
void disconnect | ( | ) |
Disconnects from the server.
Definition at line 69 of file component.cpp.