WhisperCom/include/Whisper/Messages/Priority.hpp

51 lines
1.4 KiB
C++
Raw Permalink Normal View History

2021-08-23 14:31:35 +02:00
#pragma once
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/
/** @file */
/** @copyright 2021 MPLv2 */
#include <cstdint>
#include <vector>
/**
* @brief This is the main namespace for all whisper-com related datatypes and classed.
*/
namespace Whisper
{
/**
* @brief namespace for all data related DataTypes, classes, etc.
*/
namespace Messages
2021-08-23 14:31:35 +02:00
{
/**
* \defgroup data_priority Priority of Messages
* Messages can be priortisied according to their importants.
* In whisper-com certain rules are enforced according to message priority
* e.g. important messages may be transorted and processed faster
2021-08-23 14:31:35 +02:00
*/
/**
* @brief Enumeration of different message priorities.
* \ingroup message_priorities
* Message priorities divides messages into three levels. We think three
* levels should be enough and fewer limits the flexibility of the user
* and more adds to the overall complexity.
2021-08-23 14:31:35 +02:00
*/
enum class priority : std::uint8_t
2021-08-23 14:31:35 +02:00
{
/// Messages of Priority low are additional information
LOW,
/// Messages of Priority medium are information for basic operation
MEDIUM,
/// Messages of Priority high are essential for survival
HIGH,
}; // enum class priority
2021-08-23 14:31:35 +02:00
}; // namespace Data
}; // namespace Whisper