1/*
2 * Copyright 2023, Andrew Lindesay <apl@lindesay.co.nz>.
3 * All rights reserved. Distributed under the terms of the MIT License.
4 */
5#include "CacheScreenshotProcess.h"
6
7#include <Catalog.h>
8
9#include "Model.h"
10
11
12#undef B_TRANSLATION_CONTEXT
13#define B_TRANSLATION_CONTEXT "CacheScreenshotProcess"
14
15
16CacheScreenshotProcess::CacheScreenshotProcess(Model *model,
17	ScreenshotCoordinate& screenshotCoordinate)
18	:
19	fModel(model),
20	fScreenshotCoordinate(screenshotCoordinate)
21{
22}
23
24
25CacheScreenshotProcess::~CacheScreenshotProcess()
26{
27}
28
29
30const char*
31CacheScreenshotProcess::Name() const
32{
33	return "CacheScreenshotProcess";
34}
35
36
37const char*
38CacheScreenshotProcess::Description() const
39{
40	return B_TRANSLATE("Fetching screenshot");
41}
42
43
44status_t
45CacheScreenshotProcess::RunInternal()
46{
47	return fModel->GetPackageScreenshotRepository()->CacheScreenshot(fScreenshotCoordinate);
48}