diff --git a/include/FileHandler/Generic.h b/include/FileHandler/Generic.h index 59916bc..ee8a79c 100644 --- a/include/FileHandler/Generic.h +++ b/include/FileHandler/Generic.h @@ -7,7 +7,6 @@ * */ -#include "../RDI_Datatypes.h" #include @@ -16,6 +15,8 @@ namespace RDI { +typedef char* MEMFILE; + namespace DatFile { class DatFileEntryFile; } diff --git a/include/RDI.hpp b/include/RDI.hpp index a6a8368..376ed5e 100644 --- a/include/RDI.hpp +++ b/include/RDI.hpp @@ -1,6 +1,6 @@ /** * @file RDI.hpp - * @date 22/01/2023 + * @date 04/02/2023 * @author JackCarterSmith * @copyright GPL-v3.0 * @brief Rogue Data Interface library main entry file. @@ -9,7 +9,6 @@ #include #include -#include "RDI_Datatypes.h" #include "FileHandler/HOB.h" @@ -45,6 +44,21 @@ namespace RDI { + /** + * @brief Errors flags who can be returned by this lib's interfaces. + * //TODO: Should be removed and use c++ exceptions instead + */ + typedef enum e_rdi_result { + RDI_OK, + + RDI_ERROR_GENERIC, + RDI_ERROR_PROCESS, + RDI_ERROR_MEMORY, + RDI_ERROR_FILESYSTEM, + + RDI_ERROR_UNEXPECTED + } RDI_RESULT; + /** * @brief Get the current library version. * @return String of the version. diff --git a/include/RDI_Datatypes.h b/include/RDI_Datatypes.h deleted file mode 100644 index 4797195..0000000 --- a/include/RDI_Datatypes.h +++ /dev/null @@ -1,30 +0,0 @@ -/** - * @file RDI_Datatypes.h - * @date 20/09/2022 - * @author JackCarterSmith - * @copyright GPL-v3.0 - * @brief Rogue Data Interface library variables type definitions. - * - */ - -#ifndef RDI_DATATYPES_H_ -#define RDI_DATATYPES_H_ - -namespace RDI { - -typedef char* MEMFILE; - -typedef enum e_rdi_result { - RDI_OK, - - RDI_ERROR_GENERIC, - RDI_ERROR_PROCESS, - RDI_ERROR_MEMORY, - RDI_ERROR_FILESYSTEM, - - RDI_ERROR_UNEXPECTED -} RDI_RESULT; - -} - -#endif /* RDI_DATATYPES_H_ */ diff --git a/src/DatFileEntry.cpp b/src/DatFileEntry.cpp index e979532..bc88b81 100644 --- a/src/DatFileEntry.cpp +++ b/src/DatFileEntry.cpp @@ -7,9 +7,9 @@ * */ -#include #include #include +#include #include "DatFileEntry.hpp" using std::string; diff --git a/src/DatFileEntry.hpp b/src/DatFileEntry.hpp index f6f8447..ed58170 100644 --- a/src/DatFileEntry.hpp +++ b/src/DatFileEntry.hpp @@ -1,6 +1,6 @@ /** * @file DatFileEntry.hpp - * @date 12/01/2023 + * @date 04/02/2023 * @author JackCarterSmith * @copyright GPL-v3.0 * @brief Data file entry descriptor objects helper class. @@ -12,13 +12,13 @@ * */ -#include +#include #include #include -#ifndef ERSOENTRY_HPP_ -#define ERSOENTRY_HPP_ +#ifndef DATFILEENTRY_HPP_ +#define DATFILEENTRY_HPP_ namespace RDI { @@ -103,4 +103,4 @@ private: } } -#endif /* ERSOENTRY_HPP_ */ +#endif /* DATFILEENTRY_HPP_ */ diff --git a/src/Erso.cpp b/src/Erso.cpp index 9b59ea3..619dd5a 100644 --- a/src/Erso.cpp +++ b/src/Erso.cpp @@ -1,6 +1,6 @@ /** * @file Erso.cpp - * @date 11/01/2023 + * @date 04/02/2023 * @author JackCarterSmith * @copyright GPL-v3.0 * @brief Rogue DATA/BUNDLE file parser and interface. @@ -12,7 +12,8 @@ #include #include #include -#include +#include +#include //TODO: Should be removed with RDI_RESULT #include "files_mms/data_struct.h" #include "DatFileEntry.hpp" #include "Erso.hpp" diff --git a/src/Erso.hpp b/src/Erso.hpp index fdb11e8..5ac784f 100644 --- a/src/Erso.hpp +++ b/src/Erso.hpp @@ -1,6 +1,6 @@ /** * @file Erso.hpp - * @date 11/01/2023 + * @date 04/02/2023 * @author JackCarterSmith * @copyright GPL-v3.0 * @brief Rogue DATA/BUNDLE file parser and interface. @@ -30,7 +30,8 @@ #include #include -#include "RDI_Datatypes.h" +#include +#include //TODO: Should be removed with RDI_RESULT #include "DatFileEntry.hpp"