Public Member Functions | Public Attributes

Swift::CoreComponent Class Reference

The central class for communicating with an XMPP server as a component. More...

Inheritance diagram for Swift::CoreComponent:
Collaboration diagram for Swift::CoreComponent:

List of all members.

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 >)
IQRoutergetIQRouter () const
StanzaChannelgetStanzaChannel () const
bool isAvailable () const
const JIDgetJID () const
 Returns the JID of the component.

Public Attributes

boost::signal< void(const
ComponentError &)> 
boost::signal< void()> onConnected
boost::signal< void(const
SafeByteArray &)> 
boost::signal< void(const
SafeByteArray &)> 
boost::signal< void(boost::shared_ptr
< Message >)> 
boost::signal< void(boost::shared_ptr
< Presence >) > 

Detailed Description

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.

Constructor & Destructor Documentation

Swift::CoreComponent::CoreComponent ( EventLoop eventLoop,
NetworkFactories *  networkFactories,
const JID jid,
const std::string &  secret 
Swift::CoreComponent::~CoreComponent (  ) 

Member Function Documentation

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  ) 

Member Data Documentation

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.