Communication.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. /*
  2. * @brief Defines the communication configuration
  3. * @file aman/types/Communication.h
  4. * @author Sven Czarnian <devel@svcz.de>
  5. * @copyright Copyright 2021 Sven Czarnian
  6. * @license This project is published under the GNU General Public License v3 (GPLv3)
  7. */
  8. #pragma once
  9. #include <string>
  10. namespace aman {
  11. /**
  12. * @brief Defines the communication structure
  13. * @ingroup types
  14. */
  15. struct Communication {
  16. bool valid; /**< Marks if the configuration is valid */
  17. std::string address; /**< The address of the backend */
  18. std::uint16_t portReporter; /**< The reported port of the backend */
  19. std::uint16_t portNotification; /**< The notification port of the backend */
  20. std::string serverPublicIdentifier; /**< The server's public identifier */
  21. std::string clientPublicIdentifier; /**< The client's public identifier */
  22. std::string clientPrivateIdentifier; /**< The client's private identifier */
  23. /**
  24. * @brief Initializes an invalid configuration
  25. */
  26. Communication() :
  27. valid(false),
  28. address(),
  29. portReporter(0),
  30. portNotification(0),
  31. serverPublicIdentifier(),
  32. clientPublicIdentifier(),
  33. clientPrivateIdentifier() { }
  34. };
  35. }