diff options
Diffstat (limited to 'src/image.hpp')
-rw-r--r-- | src/image.hpp | 40 |
1 files changed, 40 insertions, 0 deletions
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 <cstdint> +#include <vector> +#include <fud_string.hpp> + +// 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<byte>; +using ImageResult = fud::Result<ImageOutput, ImageError>; + +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 |