repository_infos: Enable automatic updates on the main Haiku repostiory.
[haiku.git] / src / apps / haikudepot / server / PkgDataUpdateProcess.h
blob749783acfc4f4eb5a18f4114b9464f3991b732ff
1 /*
2 * Copyright 2017, Andrew Lindesay <apl@lindesay.co.nz>.
3 * All rights reserved. Distributed under the terms of the MIT License.
4 */
6 #ifndef PACKAGE_DATA_UPDATE_PROCESS_H
7 #define PACKAGE_DATA_UPDATE_PROCESS_H
10 #include "AbstractServerProcess.h"
12 #include "PackageInfo.h"
14 #include <File.h>
15 #include <Path.h>
16 #include <String.h>
17 #include <Url.h>
20 class PkgDataUpdateProcess : public AbstractServerProcess {
21 public:
22 PkgDataUpdateProcess(
23 const BPath& localFilePath,
24 BLocker& lock,
25 BString naturalLanguageCode,
26 BString repositorySourceCode,
27 const PackageList& packages,
28 const CategoryList& categories);
29 virtual ~PkgDataUpdateProcess();
31 status_t Run();
33 protected:
34 void GetStandardMetaDataPath(BPath& path) const;
35 void GetStandardMetaDataJsonPath(
36 BString& jsonPath) const;
37 const char* LoggingName() const;
39 private:
40 status_t PopulateDataToDepots();
42 BPath fLocalFilePath;
43 BString fNaturalLanguageCode;
44 BString fRepositorySourceCode;
45 const PackageList& fPackages;
46 const CategoryList& fCategories;
47 BLocker& fLock;
51 #endif // PACKAGE_DATA_UPDATE_PROCESS_H