diff options
author | Tobias Markmann <tm@ayena.de> | 2016-03-31 14:57:35 (GMT) |
---|---|---|
committer | Tobias Markmann <tm@ayena.de> | 2016-03-31 14:57:35 (GMT) |
commit | cfbdb43d2cadd40aa87338d41548e4bf89e146e6 (patch) | |
tree | 18d94153a302445196fc0c18586abf44a1ce4a38 /Swiften/Component/CoreComponent.h | |
parent | 1d545a4a7fb877f021508094b88c1f17b30d8b4e (diff) | |
download | swift-cfbdb43d2cadd40aa87338d41548e4bf89e146e6.zip swift-cfbdb43d2cadd40aa87338d41548e4bf89e146e6.tar.bz2 |
Convert tabs to 4 spaces for all source files
Removed trailing spaces and whitespace on empty lines
in the process.
Changed CheckTabs.py tool to disallow hard tabs in source
files.
Test-Information:
Manually checked 30 random files that the conversion worked
as expected.
Change-Id: I874f99d617bd3d2bb55f02d58f22f58f9b094480
Diffstat (limited to 'Swiften/Component/CoreComponent.h')
-rw-r--r-- | Swiften/Component/CoreComponent.h | 150 |
1 files changed, 75 insertions, 75 deletions
diff --git a/Swiften/Component/CoreComponent.h b/Swiften/Component/CoreComponent.h index 12b38eb..ff88173 100644 --- a/Swiften/Component/CoreComponent.h +++ b/Swiften/Component/CoreComponent.h @@ -26,79 +26,79 @@ #include <Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.h> namespace Swift { - class EventLoop; - class IQRouter; - class NetworkFactories; - class ComponentSession; - class BasicSessionStream; - - /** - * 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. - */ - class SWIFTEN_API CoreComponent : public Entity { - public: - CoreComponent(const JID& jid, const std::string& secret, NetworkFactories* networkFactories); - virtual ~CoreComponent(); - - void connect(const std::string& host, int port); - void disconnect(); - - void sendMessage(boost::shared_ptr<Message>); - void sendPresence(boost::shared_ptr<Presence>); - void sendData(const std::string& data); - - IQRouter* getIQRouter() const { - return iqRouter_; - } - - StanzaChannel* getStanzaChannel() const { - return stanzaChannel_; - } - - bool isAvailable() const { - return stanzaChannel_->isAvailable(); - } - - /** - * Returns the JID of the component - */ - const JID& getJID() const { - return jid_; - } - - public: - 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; - - private: - void handleConnectorFinished(boost::shared_ptr<Connection>); - void handleStanzaChannelAvailableChanged(bool available); - void handleSessionFinished(boost::shared_ptr<Error>); - void handleDataRead(const SafeByteArray&); - void handleDataWritten(const SafeByteArray&); - - private: - NetworkFactories* networkFactories; - JID jid_; - std::string secret_; - ComponentSessionStanzaChannel* stanzaChannel_; - IQRouter* iqRouter_; - ComponentConnector::ref connector_; - boost::shared_ptr<Connection> connection_; - boost::shared_ptr<BasicSessionStream> sessionStream_; - boost::shared_ptr<ComponentSession> session_; - bool disconnectRequested_; - }; + class EventLoop; + class IQRouter; + class NetworkFactories; + class ComponentSession; + class BasicSessionStream; + + /** + * 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. + */ + class SWIFTEN_API CoreComponent : public Entity { + public: + CoreComponent(const JID& jid, const std::string& secret, NetworkFactories* networkFactories); + virtual ~CoreComponent(); + + void connect(const std::string& host, int port); + void disconnect(); + + void sendMessage(boost::shared_ptr<Message>); + void sendPresence(boost::shared_ptr<Presence>); + void sendData(const std::string& data); + + IQRouter* getIQRouter() const { + return iqRouter_; + } + + StanzaChannel* getStanzaChannel() const { + return stanzaChannel_; + } + + bool isAvailable() const { + return stanzaChannel_->isAvailable(); + } + + /** + * Returns the JID of the component + */ + const JID& getJID() const { + return jid_; + } + + public: + 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; + + private: + void handleConnectorFinished(boost::shared_ptr<Connection>); + void handleStanzaChannelAvailableChanged(bool available); + void handleSessionFinished(boost::shared_ptr<Error>); + void handleDataRead(const SafeByteArray&); + void handleDataWritten(const SafeByteArray&); + + private: + NetworkFactories* networkFactories; + JID jid_; + std::string secret_; + ComponentSessionStanzaChannel* stanzaChannel_; + IQRouter* iqRouter_; + ComponentConnector::ref connector_; + boost::shared_ptr<Connection> connection_; + boost::shared_ptr<BasicSessionStream> sessionStream_; + boost::shared_ptr<ComponentSession> session_; + bool disconnectRequested_; + }; } |