Public Member Functions | Public Attributes

Swift::Component Class Reference

Provides the core functionality for writing XMPP component software. More...

Inheritance diagram for Swift::Component:
Collaboration diagram for Swift::Component:

List of all members.

Public Member Functions

 Component (EventLoop *eventLoop, NetworkFactories *networkFactories, const JID &jid, const std::string &secret)
 ~Component ()
void setSoftwareVersion (const std::string &name, const std::string &version)
 Sets the software version of the client.
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 &)> 
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

Detailed Description

Provides the core functionality for writing XMPP component software.

Besides connecting to an XMPP server, this class also provides interfaces for performing most component tasks on the XMPP network.

Definition at line 20 of file Component.h.


Constructor & Destructor Documentation

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

Member Function Documentation

void Swift::CoreComponent::connect ( const std::string &  host,
int  port 
) [inherited]
void Swift::CoreComponent::disconnect (  )  [inherited]
IQRouter* Swift::CoreComponent::getIQRouter (  )  const [inline, inherited]

Definition at line 55 of file CoreComponent.h.

const JID& Swift::CoreComponent::getJID (  )  const [inline, inherited]

Returns the JID of the component.

Definition at line 70 of file CoreComponent.h.

StanzaChannel* Swift::CoreComponent::getStanzaChannel (  )  const [inline, inherited]

Definition at line 59 of file CoreComponent.h.

bool Swift::CoreComponent::isAvailable (  )  const [inline, inherited]

Definition at line 63 of file CoreComponent.h.

void Swift::CoreComponent::sendMessage ( boost::shared_ptr< Message  )  [inherited]
void Swift::CoreComponent::sendPresence ( boost::shared_ptr< Presence  )  [inherited]
void Swift::Component::setSoftwareVersion ( const std::string &  name,
const std::string &  version 
)

Sets the software version of the client.

This will be used to respond to version queries from other entities.


Member Data Documentation

boost::signal<void ()> Swift::CoreComponent::onConnected [inherited]

Definition at line 76 of file CoreComponent.h.

boost::signal<void (const SafeByteArray&)> Swift::CoreComponent::onDataRead [inherited]

Definition at line 77 of file CoreComponent.h.

boost::signal<void (const SafeByteArray&)> Swift::CoreComponent::onDataWritten [inherited]

Definition at line 78 of file CoreComponent.h.

boost::signal<void (const ComponentError&)> Swift::CoreComponent::onError [inherited]

Definition at line 75 of file CoreComponent.h.

boost::signal<void (boost::shared_ptr<Message>)> Swift::CoreComponent::onMessageReceived [inherited]

Definition at line 80 of file CoreComponent.h.

boost::signal<void (boost::shared_ptr<Presence>) > Swift::CoreComponent::onPresenceReceived [inherited]

Definition at line 81 of file CoreComponent.h.