Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mumble-voip/mumble.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThorvald Natvig <slicer@users.sourceforge.net>2010-01-17 05:49:32 +0300
committerThorvald Natvig <slicer@users.sourceforge.net>2010-01-17 05:49:40 +0300
commit60e71510bfc097b97ee77073db8a12663aca064a (patch)
tree72175fd1fb7215b677dcaa1e8744560bb6f10dca /src/Message.h
parentad0f30f6d12d4bbf97d6b3a1b92ffbc3f61791da (diff)
Serverside comment/texture send-on-demand
Diffstat (limited to 'src/Message.h')
-rw-r--r--src/Message.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/Message.h b/src/Message.h
index 17c0a3baf..7980606ca 100644
--- a/src/Message.h
+++ b/src/Message.h
@@ -57,7 +57,8 @@
MUMBLE_MH_MSG(VoiceTarget) \
MUMBLE_MH_MSG(PermissionQuery) \
MUMBLE_MH_MSG(CodecVersion) \
- MUMBLE_MH_MSG(UserStats)
+ MUMBLE_MH_MSG(UserStats) \
+ MUMBLE_MH_MSG(RequestBlob)
class MessageHandler {
public:
@@ -83,6 +84,22 @@ inline ::std::string u8(const QString &str) {
return ::std::string(qba.constData(), qba.length());
}
+inline QByteArray blob(const ::std::string &str) {
+ return QByteArray(str.data(), static_cast<int>(str.length()));
+}
+
+inline ::std::string blob(const QByteArray &str) {
+ return ::std::string(str.constData(), str.length());
+}
+
+inline QByteArray sha1(const QByteArray &blob) {
+ return QCryptographicHash::hash(blob, QCryptographicHash::Sha1);
+}
+
+inline QByteArray sha1(const QString &str) {
+ return QCryptographicHash::hash(str.toUtf8(), QCryptographicHash::Sha1);
+}
+
#else
class Message;
#endif