diff options
author | Remko Tronçon <git@el-tramo.be> | 2009-11-27 19:06:47 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2009-11-27 19:06:47 (GMT) |
commit | aa09a889108c4d0e3c5888ad98958d8f3e12bd3b (patch) | |
tree | 3c621ae0a6e2150281be182b37e2837b804adcba /Swift/Controllers | |
parent | c89ef0ffae597ac8c1063732e1d9a2d84703a80c (diff) | |
download | swift-contrib-aa09a889108c4d0e3c5888ad98958d8f3e12bd3b.zip swift-contrib-aa09a889108c4d0e3c5888ad98958d8f3e12bd3b.tar.bz2 |
Added MD5 hashing algorithm.
Moved 'hexifying' of hashes into its own class, such that it can be
shared between all hashes.
Diffstat (limited to 'Swift/Controllers')
-rw-r--r-- | Swift/Controllers/MainController.cpp | 3 | ||||
-rw-r--r-- | Swift/Controllers/SConscript | 3 | ||||
-rw-r--r-- | Swift/Controllers/UIInterfaces/XMLConsoleWidget.cpp | 8 | ||||
-rw-r--r-- | Swift/Controllers/UIInterfaces/XMLConsoleWidget.h | 2 |
4 files changed, 14 insertions, 2 deletions
diff --git a/Swift/Controllers/MainController.cpp b/Swift/Controllers/MainController.cpp index 39c63dd..52efe0e 100644 --- a/Swift/Controllers/MainController.cpp +++ b/Swift/Controllers/MainController.cpp @@ -43,6 +43,7 @@ #include "Swiften/Avatars/AvatarFileStorage.h" #include "Swiften/Avatars/AvatarManager.h" #include "Swiften/StringCodecs/SHA1.h" +#include "Swiften/StringCodecs/Hexify.h" namespace { void printIncomingData(const Swift::String& data) { @@ -430,7 +431,7 @@ bool MainController::isMUC(const JID& jid) const { void MainController::handleOwnVCardReceived(boost::shared_ptr<VCard> vCard, const boost::optional<ErrorPayload>& error) { if (!error && !vCard->getPhoto().isEmpty()) { - vCardPhotoHash_ = SHA1::getHexHash(vCard->getPhoto()); + vCardPhotoHash_ = Hexify::hexify(SHA1::getHash(vCard->getPhoto())); if (lastSentPresence_) { sendPresence(lastSentPresence_); } diff --git a/Swift/Controllers/SConscript b/Swift/Controllers/SConscript index 6c9b049..79357b5 100644 --- a/Swift/Controllers/SConscript +++ b/Swift/Controllers/SConscript @@ -19,7 +19,8 @@ myenv.StaticLibrary("SwiftControllers", [ "SoundEventController.cpp", "SystemTrayController.cpp", "XMLConsoleController.cpp", - "UIEvents/UIEvent.cpp" + "UIEvents/UIEvent.cpp", + "UIInterfaces/XMLConsoleWidget.cpp", ]) env.Append(UNITTEST_SOURCES = [ diff --git a/Swift/Controllers/UIInterfaces/XMLConsoleWidget.cpp b/Swift/Controllers/UIInterfaces/XMLConsoleWidget.cpp new file mode 100644 index 0000000..32e3065 --- /dev/null +++ b/Swift/Controllers/UIInterfaces/XMLConsoleWidget.cpp @@ -0,0 +1,8 @@ +#include "Swift/Controllers/UIInterfaces/XMLConsoleWidget.h" + +namespace Swift { + +XMLConsoleWidget::~XMLConsoleWidget() { +} + +} diff --git a/Swift/Controllers/UIInterfaces/XMLConsoleWidget.h b/Swift/Controllers/UIInterfaces/XMLConsoleWidget.h index efde1a2..9098fbc 100644 --- a/Swift/Controllers/UIInterfaces/XMLConsoleWidget.h +++ b/Swift/Controllers/UIInterfaces/XMLConsoleWidget.h @@ -3,6 +3,8 @@ namespace Swift { class XMLConsoleWidget { public: + virtual ~XMLConsoleWidget(); + virtual void show() = 0; }; } |