diff --git a/include/aman/types/Communication.h b/include/aman/types/Communication.h new file mode 100644 index 0000000..d24a641 --- /dev/null +++ b/include/aman/types/Communication.h @@ -0,0 +1,33 @@ +/* + * @brief Defines the communication configuration + * @file aman/types/Communication.h + * @author Sven Czarnian + * @copyright Copyright 2021 Sven Czarnian + * @license This project is published under the GNU General Public License v3 (GPLv3) + */ + +#pragma once + +#include + +namespace aman { + /** + * @brief Defines the communication structure + * @ingroup types + */ + struct Communication { + bool valid; /**< Marks if the configuration is valid */ + std::string url; /**< The URL of the backend */ + std::uint16_t port; /**< The port of the backend */ + std::string identifier; /**< The user's identifier for the connection */ + + /** + * @brief Initializes an invalid configuration + */ + Communication() : + valid(false), + url(), + port(0), + identifier() { } + }; +} diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index fdea3af..1eeadfa 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -30,6 +30,9 @@ SET(INCLUDE_CONFIG_FILES SET(INCLUDE_HELPER_FILES ${CMAKE_SOURCE_DIR}/include/aman/helper/String.h ) +SET(INCLUDE_TYPES_FILES + ${CMAKE_SOURCE_DIR}/include/aman/types/Communication.h +) # define the plug in ADD_LIBRARY( @@ -63,3 +66,4 @@ SOURCE_GROUP("Source Files\\config" FILES ${SOURCE_CONFIG_FILES}) SOURCE_GROUP("Source Files\\res" FILES ${SOURCE_FILES_RES}) SOURCE_GROUP("Header Files\\config" FILES ${INCLUDE_CONFIG_FILES}) SOURCE_GROUP("Header Files\\helper" FILES ${INCLUDE_HELPER_FILES}) +SOURCE_GROUP("Header Files\\types" FILES ${INCLUDE_TYPES_FILES})