1/* 2 * Copyright 2017-2018, Andrew Lindesay <apl@lindesay.co.nz>. 3 * All rights reserved. Distributed under the terms of the MIT License. 4 */ 5#ifndef REPOSITORY_DATA_UPDATE_PROCESS_H 6#define REPOSITORY_DATA_UPDATE_PROCESS_H 7 8 9#include "AbstractSingleFileServerProcess.h" 10 11#include <File.h> 12#include <Path.h> 13#include <String.h> 14#include <Url.h> 15 16#include "Model.h" 17#include "PackageInfo.h" 18 19 20#undef B_TRANSLATION_CONTEXT 21#define B_TRANSLATION_CONTEXT "ServerRepositoryDataUpdateProcess" 22 23 24class ServerRepositoryDataUpdateProcess : public AbstractSingleFileServerProcess { 25public: 26 27 ServerRepositoryDataUpdateProcess( 28 Model* model, uint32 serverProcessOptions); 29 virtual ~ServerRepositoryDataUpdateProcess(); 30 31 const char* Name() const; 32 const char* Description() const; 33 34protected: 35 status_t GetStandardMetaDataPath(BPath& path) const; 36 void GetStandardMetaDataJsonPath( 37 BString& jsonPath) const; 38 39 BString UrlPathComponent(); 40 status_t ProcessLocalData(); 41 status_t GetLocalPath(BPath& path) const; 42 43private: 44 Model* fModel; 45 46}; 47 48#endif // REPOSITORY_DATA_UPDATE_PROCESS_H 49