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 16 CacheScreenshotProcess::CacheScreenshotProcess(Model *model, 17 ScreenshotCoordinate& screenshotCoordinate) 18 : 19 fModel(model), 20 fScreenshotCoordinate(screenshotCoordinate) 21 { 22 } 23 24 25 CacheScreenshotProcess::~CacheScreenshotProcess() 26 { 27 } 28 29 30 const char* 31 CacheScreenshotProcess::Name() const 32 { 33 return "CacheScreenshotProcess"; 34 } 35 36 37 const char* 38 CacheScreenshotProcess::Description() const 39 { 40 return B_TRANSLATE("Fetching screenshot"); 41 } 42 43 44 status_t 45 CacheScreenshotProcess::RunInternal() 46 { 47 return fModel->GetPackageScreenshotRepository()->CacheScreenshot(fScreenshotCoordinate); 48 }