summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-06-03 11:09:08 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-06-03 11:09:08 (GMT)
commit10334c139670861d4860da59ad837fc3fe6fd41e (patch)
treeb632360747e635e229f336760ccc76789797a8bf /Swiften/Client/CoreClient.h
parent8189054fca9c68194ffc328eb7beecf241bbbcd7 (diff)
downloadswift-contrib-10334c139670861d4860da59ad837fc3fe6fd41e.zip
swift-contrib-10334c139670861d4860da59ad837fc3fe6fd41e.tar.bz2
Ensure safety on onDataRead and onDataWritten signals.
Diffstat (limited to 'Swiften/Client/CoreClient.h')
-rw-r--r--Swiften/Client/CoreClient.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/Swiften/Client/CoreClient.h b/Swiften/Client/CoreClient.h
index 9806d35..841c32c 100644
--- a/Swiften/Client/CoreClient.h
+++ b/Swiften/Client/CoreClient.h
@@ -15,6 +15,7 @@
#include <Swiften/Client/ClientError.h>
#include <Swiften/Client/ClientOptions.h>
#include <Swiften/Base/SafeString.h>
+#include <Swiften/Base/SafeByteArray.h>
namespace Swift {
class ChainedConnector;
@@ -156,7 +157,7 @@ namespace Swift {
* This signal is emitted before the XML data is parsed,
* so this data is unformatted.
*/
- boost::signal<void (const std::string&)> onDataRead;
+ boost::signal<void (const SafeByteArray&)> onDataRead;
/**
* Emitted when the client sends data.
@@ -164,7 +165,7 @@ namespace Swift {
* This signal is emitted after the XML was serialized, and
* is unformatted.
*/
- boost::signal<void (const std::string&)> onDataWritten;
+ boost::signal<void (const SafeByteArray&)> onDataWritten;
/**
* Emitted when a message is received.
@@ -194,8 +195,8 @@ namespace Swift {
void handleStanzaChannelAvailableChanged(bool available);
void handleSessionFinished(boost::shared_ptr<Error>);
void handleNeedCredentials();
- void handleDataRead(const std::string&);
- void handleDataWritten(const std::string&);
+ void handleDataRead(const SafeByteArray&);
+ void handleDataWritten(const SafeByteArray&);
void handlePresenceReceived(boost::shared_ptr<Presence>);
void handleMessageReceived(boost::shared_ptr<Message>);
void handleStanzaAcked(boost::shared_ptr<Stanza>);