The central class for communicating with an XMPP server as a component. More...
Public Member Functions | |
CoreComponent (EventLoop *eventLoop, NetworkFactories *networkFactories, const JID &jid, const std::string &secret) | |
~CoreComponent () | |
void | connect (const std::string &host, int port) |
void | disconnect () |
void | sendMessage (boost::shared_ptr< Message >) |
void | sendPresence (boost::shared_ptr< Presence >) |
IQRouter * | getIQRouter () const |
StanzaChannel * | getStanzaChannel () const |
bool | isAvailable () const |
const JID & | getJID () const |
Returns the JID of the component. | |
Public Attributes | |
boost::signal< void(const ComponentError &)> | onError |
boost::signal< void()> | onConnected |
boost::signal< void(const SafeByteArray &)> | onDataRead |
boost::signal< void(const SafeByteArray &)> | onDataWritten |
boost::signal< void(boost::shared_ptr < Message >)> | onMessageReceived |
boost::signal< void(boost::shared_ptr < Presence >) > | onPresenceReceived |
The central class for communicating with an XMPP server as a component.
This class is responsible for setting up the connection with the XMPP server and authenticating the component.
This class can be used directly in your application, although the Component subclass provides more functionality and interfaces, and is better suited for most needs.
Definition at line 44 of file CoreComponent.h.
Swift::CoreComponent::CoreComponent | ( | EventLoop * | eventLoop, | |
NetworkFactories * | networkFactories, | |||
const JID & | jid, | |||
const std::string & | secret | |||
) |
Swift::CoreComponent::~CoreComponent | ( | ) |
void Swift::CoreComponent::connect | ( | const std::string & | host, | |
int | port | |||
) |
void Swift::CoreComponent::disconnect | ( | ) |
IQRouter* Swift::CoreComponent::getIQRouter | ( | ) | const [inline] |
Definition at line 55 of file CoreComponent.h.
const JID& Swift::CoreComponent::getJID | ( | ) | const [inline] |
Returns the JID of the component.
Definition at line 70 of file CoreComponent.h.
StanzaChannel* Swift::CoreComponent::getStanzaChannel | ( | ) | const [inline] |
Definition at line 59 of file CoreComponent.h.
bool Swift::CoreComponent::isAvailable | ( | ) | const [inline] |
Definition at line 63 of file CoreComponent.h.
void Swift::CoreComponent::sendMessage | ( | boost::shared_ptr< Message > | ) |
void Swift::CoreComponent::sendPresence | ( | boost::shared_ptr< Presence > | ) |
boost::signal<void ()> Swift::CoreComponent::onConnected |
Definition at line 76 of file CoreComponent.h.
boost::signal<void (const SafeByteArray&)> Swift::CoreComponent::onDataRead |
Definition at line 77 of file CoreComponent.h.
boost::signal<void (const SafeByteArray&)> Swift::CoreComponent::onDataWritten |
Definition at line 78 of file CoreComponent.h.
boost::signal<void (const ComponentError&)> Swift::CoreComponent::onError |
Definition at line 75 of file CoreComponent.h.
boost::signal<void (boost::shared_ptr<Message>)> Swift::CoreComponent::onMessageReceived |
Definition at line 80 of file CoreComponent.h.
boost::signal<void (boost::shared_ptr<Presence>) > Swift::CoreComponent::onPresenceReceived |
Definition at line 81 of file CoreComponent.h.