/* * Copyright 2023, Andrew Lindesay . * All rights reserved. Distributed under the terms of the MIT License. */ #ifndef SCREENSHOT_COORDINATE_H #define SCREENSHOT_COORDINATE_H #include #include /*! A screenshot coordinate defines a screenshot to obtain. The `code` is recorded against a screenshot in the HDS system and then the width and height define the sizing required for that screenshot. */ class ScreenshotCoordinate : public BArchivable { public: ScreenshotCoordinate(const BMessage* from); ScreenshotCoordinate(BString code, uint16 width, uint16 height); ScreenshotCoordinate(); virtual ~ScreenshotCoordinate(); const BString Code() const; uint16 Width() const; uint16 Height() const; bool operator==(const ScreenshotCoordinate& other) const; bool IsValid() const; const BString Key() const; const BString CacheFilename() const; status_t Archive(BMessage* into, bool deep = true) const; private: BString fCode; uint16 fWidth; uint16 fHeight; }; #endif // SCREENSHOT_COORDINATE_H