From 500e1f9892dd41419663e9f72cf47bab5b2aca0b Mon Sep 17 00:00:00 2001 From: Dominick Allen Date: Mon, 23 Sep 2024 00:33:33 -0500 Subject: Saving work. --- src/image.hpp | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 src/image.hpp (limited to 'src/image.hpp') diff --git a/src/image.hpp b/src/image.hpp new file mode 100644 index 0000000..9b51be0 --- /dev/null +++ b/src/image.hpp @@ -0,0 +1,40 @@ +#ifndef IMAGE_HPP +#define IMAGE_HPP + +#include "bookmouse_types.hpp" + +#include +#include +#include + +// const int foo[] = {O_RDONLY, O_WRONLY, O_RDWR, O_TRUNC, O_APPEND, O_CREAT}; + +namespace bookmouse { + +enum class ImageError +{ + FileError, + JpegError, +}; + +using ImageOutput = std::vector; +using ImageResult = fud::Result; + +class Image { + + public: + virtual ~Image() = default; + virtual ImageResult output() const = 0; +}; + +class JpegImage : public Image { + public: + virtual ImageResult output() const override; + + private: + fud::String m_filename; +}; + +} // namespace bookmouse + +#endif -- cgit v1.2.3