vfs: check userland buffers before reading them.
[haiku.git] / src / apps / haikudepot / server / PkgDataUpdateProcess.h
blob7d1486a40e0ed3260c289920fd5b2b2e4a3ebad0
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 "AbstractSingleFileServerProcess.h"
12 #include "Model.h"
13 #include "PackageInfo.h"
15 #include <File.h>
16 #include <Path.h>
17 #include <String.h>
18 #include <Url.h>
21 class PkgDataUpdateProcess : public AbstractSingleFileServerProcess {
22 public:
23 PkgDataUpdateProcess(
24 AbstractServerProcessListener* listener,
25 const BPath& localFilePath,
26 BString naturalLanguageCode,
27 BString repositorySourceCode,
28 BString depotName,
29 Model *model,
30 uint32 options);
31 virtual ~PkgDataUpdateProcess();
33 const char* Name();
35 protected:
36 void GetStandardMetaDataPath(BPath& path) const;
37 void GetStandardMetaDataJsonPath(
38 BString& jsonPath) const;
40 BString UrlPathComponent();
41 status_t ProcessLocalData();
42 BPath& LocalPath();
44 private:
46 BPath fLocalFilePath;
47 BString fNaturalLanguageCode;
48 BString fRepositorySourceCode;
49 Model* fModel;
50 BString fDepotName;
51 BString fName;
55 #endif // PACKAGE_DATA_UPDATE_PROCESS_H