1234567891011121314151617181920212223242526272829303132333435363738394041 |
- /*
- * @brief Defines the communication configuration
- * @file aman/types/Communication.h
- * @author Sven Czarnian <devel@svcz.de>
- * @copyright Copyright 2021 Sven Czarnian
- * @license This project is published under the GNU General Public License v3 (GPLv3)
- */
- #pragma once
- #include <string>
- namespace aman {
- /**
- * @brief Defines the communication structure
- * @ingroup types
- */
- struct Communication {
- bool valid; /**< Marks if the configuration is valid */
- bool httpsProtocol; /**< Marks if the server uses HTTPS */
- std::string address; /**< The address of the backend */
- std::uint16_t portBackend; /**< The reported port of the backend */
- std::uint16_t portRestAPI; /**< The notification port of the backend */
- std::string serverPublicIdentifier; /**< The server's public identifier */
- std::string clientPublicIdentifier; /**< The client's public identifier */
- std::string clientPrivateIdentifier; /**< The client's private identifier */
- /**
- * @brief Initializes an invalid configuration
- */
- Communication() :
- valid(false),
- httpsProtocol(false),
- address(),
- portBackend(0),
- portRestAPI(0),
- serverPublicIdentifier(),
- clientPublicIdentifier(),
- clientPrivateIdentifier() { }
- };
- }
|