diff options
author | Remko Tronçon <git@el-tramo.be> | 2011-06-03 11:09:08 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2011-06-03 11:09:08 (GMT) |
commit | 10334c139670861d4860da59ad837fc3fe6fd41e (patch) | |
tree | b632360747e635e229f336760ccc76789797a8bf /Swiften/Component/CoreComponent.h | |
parent | 8189054fca9c68194ffc328eb7beecf241bbbcd7 (diff) | |
download | swift-contrib-10334c139670861d4860da59ad837fc3fe6fd41e.zip swift-contrib-10334c139670861d4860da59ad837fc3fe6fd41e.tar.bz2 |
Ensure safety on onDataRead and onDataWritten signals.
Diffstat (limited to 'Swiften/Component/CoreComponent.h')
-rw-r--r-- | Swiften/Component/CoreComponent.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Swiften/Component/CoreComponent.h b/Swiften/Component/CoreComponent.h index 26f0024..e7945d1 100644 --- a/Swiften/Component/CoreComponent.h +++ b/Swiften/Component/CoreComponent.h @@ -22,6 +22,7 @@ #include <Swiften/Serializer/PayloadSerializers/FullPayloadSerializerCollection.h> #include <Swiften/Component/ComponentSessionStanzaChannel.h> #include <Swiften/Entity/Entity.h> +#include <Swiften/Base/SafeByteArray.h> namespace Swift { class IQRouter; @@ -72,8 +73,8 @@ namespace Swift { public: boost::signal<void (const ComponentError&)> onError; boost::signal<void ()> onConnected; - boost::signal<void (const std::string&)> onDataRead; - boost::signal<void (const std::string&)> onDataWritten; + 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; @@ -82,8 +83,8 @@ namespace Swift { void handleConnectorFinished(boost::shared_ptr<Connection>); void handleStanzaChannelAvailableChanged(bool available); void handleSessionFinished(boost::shared_ptr<Error>); - void handleDataRead(const std::string&); - void handleDataWritten(const std::string&); + void handleDataRead(const SafeByteArray&); + void handleDataWritten(const SafeByteArray&); private: EventLoop* eventLoop; |