Use nested namespaces (C++17 feature)

This commit is contained in:
Mat Sutcliffe
2021-09-15 21:44:54 +01:00
parent 3f2e5b0b69
commit 57d32da826
1345 changed files with 146075 additions and 150376 deletions

View File

@@ -11,48 +11,45 @@
#ifndef BLACKCORE_FSD_AUTHCHALLENGE_H
#define BLACKCORE_FSD_AUTHCHALLENGE_H
#include "messagebase.h"
#include "blackcore/fsd/messagebase.h"
namespace BlackCore
namespace BlackCore::Fsd
{
namespace Fsd
//! FSD Message: auth challenge
class BLACKCORE_EXPORT AuthChallenge : public MessageBase
{
//! FSD Message: auth challenge
class BLACKCORE_EXPORT AuthChallenge : public MessageBase
{
public:
//! Constructor
AuthChallenge(const QString &sender, const QString &target, const QString &challengeKey);
public:
//! Constructor
AuthChallenge(const QString &sender, const QString &target, const QString &challengeKey);
//! Message converted to tokens
QStringList toTokens() const;
//! Message converted to tokens
QStringList toTokens() const;
//! Construct from tokens
static AuthChallenge fromTokens(const QStringList &tokens);
//! Construct from tokens
static AuthChallenge fromTokens(const QStringList &tokens);
//! PDU identifier
static QString pdu() { return QStringLiteral("$ZC"); }
//! PDU identifier
static QString pdu() { return QStringLiteral("$ZC"); }
QString m_challengeKey; //!< key
QString m_challengeKey; //!< key
private:
//! Ctor
AuthChallenge();
};
private:
//! Ctor
AuthChallenge();
};
//! Equal to operator
inline bool operator==(const AuthChallenge &lhs, const AuthChallenge &rhs)
{
return lhs.sender() == rhs.sender() &&
lhs.receiver() == rhs.receiver() &&
lhs.m_challengeKey == rhs.m_challengeKey;
}
//! Equal to operator
inline bool operator==(const AuthChallenge &lhs, const AuthChallenge &rhs)
{
return lhs.sender() == rhs.sender() &&
lhs.receiver() == rhs.receiver() &&
lhs.m_challengeKey == rhs.m_challengeKey;
}
//! Not equal to operator
inline bool operator!=(const AuthChallenge &lhs, const AuthChallenge &rhs)
{
return !(lhs == rhs);
}
//! Not equal to operator
inline bool operator!=(const AuthChallenge &lhs, const AuthChallenge &rhs)
{
return !(lhs == rhs);
}
}