Permalink
Browse files

License headers and various style fixes.

  • Loading branch information...
1 parent 6e1c311 commit 956bbd89cf3be3e6be8d54eaef6e57cb78ec74d4 @hacst hacst committed Apr 4, 2012
Showing with 78 additions and 19 deletions.
  1. +37 −7 src/ConversionHelpers.h
  2. +33 −3 src/MessageTypes.h
  3. +1 −1 src/mumble.pri
  4. +1 −0 src/mumble/MessageHandler.cpp
  5. +6 −8 src/mumble/MessageHandler.h
View
@@ -1,10 +1,40 @@
-#include <QString>
-#include <QByteArray>
-#include <QCryptographicHash>
-#include <string>
+/* Copyright (C) 2005-2012, Thorvald Natvig <thorvald@natvig.com>
+
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ - Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ - Neither the name of the Mumble Developers nor the names of its
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
-#ifndef CONVERSION_HELPER_H
-#define CONVERSION_HELPER_H
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef CONVERSION_HELPERS_H_
+#define CONVERSION_HELPERS_H_
+
+#include <QtCore/QString>
+#include <QtCore/QByteArray>
+#include <QtCore/QCryptographicHash>
+#include <string>
inline QString u8(const ::std::string &str) {
return QString::fromUtf8(str.data(), static_cast<int>(str.length()));
@@ -35,4 +65,4 @@ inline QByteArray sha1(const QString &str) {
return QCryptographicHash::hash(str.toUtf8(), QCryptographicHash::Sha1);
}
-#endif
+#endif // CONVERSION_HELPERS_H_
View
@@ -1,5 +1,35 @@
-#ifndef MESSAGE_H
-#define MESSAGE_H
+/* Copyright (C) 2005-2011, Thorvald Natvig <thorvald@natvig.com>
+
+ All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without
+ modification, are permitted provided that the following conditions
+ are met:
+
+ - Redistributions of source code must retain the above copyright notice,
+ this list of conditions and the following disclaimer.
+ - Redistributions in binary form must reproduce the above copyright notice,
+ this list of conditions and the following disclaimer in the documentation
+ and/or other materials provided with the distribution.
+ - Neither the name of the Mumble Developers nor the names of its
+ contributors may be used to endorse or promote products derived from this
+ software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR
+ CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
+ LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+ NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#ifndef MESSAGE_TYPES_H_
+#define MESSAGE_TYPES_H_
/**
Protobuf packet type enumeration for message handler generation.
@@ -50,4 +80,4 @@ struct MessageTypes {
#undef MUMBLE_MH_MSG
};
-#endif
+#endif // MESSAGE_TYPES_H_
View
@@ -6,7 +6,7 @@ CONFIG += qt thread debug_and_release warn_on
DEFINES *= MUMBLE_VERSION_STRING=$$VERSION
INCLUDEPATH += $$PWD .
VPATH += $$PWD
-HEADERS *= ACL.h Channel.h CryptState.h Connection.h Group.h User.h Net.h OSInfo.h Timer.h SSL.h Version.h
+HEADERS *= ACL.h Channel.h ConversionHelpers.h CryptState.h Connection.h Group.h User.h MessageTypes.h Net.h OSInfo.h Timer.h SSL.h Version.h
SOURCES *= ACL.cpp Group.cpp Channel.cpp Connection.cpp User.cpp Timer.cpp CryptState.cpp OSInfo.cpp Net.cpp SSL.cpp Version.cpp
PROTOBUF *= ../Mumble.proto
@@ -31,6 +31,7 @@
#include "mumble_pch.hpp"
+#include "MainWindow.h"
#include "MessageHandler.h"
#include "ServerHandler.h"
#include "Global.h"
@@ -1,4 +1,4 @@
-/* Copyright (C) 2005-2011, Thorvald Natvig <thorvald@natvig.com>
+/* Copyright (C) 2005-2012, Thorvald Natvig <thorvald@natvig.com>
All rights reserved.
@@ -28,15 +28,13 @@
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef MESSAGES_HANDLER_H_
-#define MESSAGES_HANDLER_H_
+#ifndef MESSAGE_HANDLER_H_
+#define MESSAGE_HANDLER_H_
-#include <string>
-#include <QtCore/QCryptographicHash>
-#include <QtCore/QString>
#include <QtCore/QObject>
+#include <QtCore/QEvent>
+
#include "Mumble.pb.h"
-#include "MainWindow.h"
#include "MessageTypes.h"
/**
@@ -68,4 +66,4 @@ class MessageHandler : public QObject {
#undef MUMBLE_MH_MSG
};
-#endif
+#endif // MESSAGE_HANDLER_H_

0 comments on commit 956bbd8

Please sign in to comment.