summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Component/ComponentXMLTracer.h')
-rw-r--r--Swiften/Component/ComponentXMLTracer.h22
1 files changed, 4 insertions, 18 deletions
diff --git a/Swiften/Component/ComponentXMLTracer.h b/Swiften/Component/ComponentXMLTracer.h
index 70a617b..c12ec07 100644
--- a/Swiften/Component/ComponentXMLTracer.h
+++ b/Swiften/Component/ComponentXMLTracer.h
@@ -6,29 +6,15 @@
#pragma once
-#include <boost/bind.hpp>
-
-#include "Swiften/Component/Component.h"
+#include <Swiften/Component/Component.h>
namespace Swift {
class ComponentXMLTracer {
public:
- ComponentXMLTracer(Component* component) {
- component->onDataRead.connect(boost::bind(&ComponentXMLTracer::printData, '<', _1));
- component->onDataWritten.connect(boost::bind(&ComponentXMLTracer::printData, '>', _1));
- }
+ ComponentXMLTracer(CoreComponent* component);
private:
- static void printData(char direction, const std::string& data) {
- printLine(direction);
- std::cerr << data << std::endl;
- }
-
- static void printLine(char c) {
- for (unsigned int i = 0; i < 80; ++i) {
- std::cerr << c;
- }
- std::cerr << std::endl;
- }
+ static void printData(char direction, const SafeByteArray& data);
+ static void printLine(char c);
};
}