xref: /haiku/src/apps/haikudepot/server/ServerIconExportUpdateProcess.h (revision 05880d133e589414a7530de474132f6990dbdc81)
1 /*
2  * Copyright 2017-2020, Andrew Lindesay <apl@lindesay.co.nz>.
3  * All rights reserved. Distributed under the terms of the MIT License.
4  */
5 #ifndef SERVER_ICON_EXPORT_UPDATE_PROCESS_H
6 #define SERVER_ICON_EXPORT_UPDATE_PROCESS_H
7 
8 
9 #include <File.h>
10 #include <Path.h>
11 #include <String.h>
12 #include <Url.h>
13 
14 #include "AbstractSingleFileServerProcess.h"
15 #include "Model.h"
16 
17 
18 class DumpExportPkg;
19 
20 
21 class ServerIconExportUpdateProcess : public AbstractSingleFileServerProcess {
22 public:
23 
24 								ServerIconExportUpdateProcess(
25 									Model* model, uint32 serverProcessOptions);
26 	virtual						~ServerIconExportUpdateProcess();
27 
28 			const char*			Name() const;
29 			const char*			Description() const;
30 
31 	virtual status_t			ProcessLocalData();
32 
33 	virtual	status_t			GetLocalPath(BPath& path) const;
34 	virtual	status_t			IfModifiedSinceHeaderValue(
35 									BString& headerValue) const;
36 
37 
38 	virtual	status_t			GetStandardMetaDataPath(BPath& path) const;
39 	virtual	void				GetStandardMetaDataJsonPath(
40 									BString& jsonPath) const;
41 
42 protected:
43 	virtual	BString				UrlPathComponent();
44 
45 private:
46 			void				_NotifyPackagesWithIconsInDepots() const;
47 			void				_NotifyPackagesWithIconsInDepot(
48 									const DepotInfoRef& depotInfo) const;
49 
50 private:
51 			Model*				fModel;
52 
53 };
54 
55 #endif // SERVER_ICON_EXPORT_UPDATE_PROCESS_H
56