1 /* 2 * Copyright 2024, Andrew Lindesay <apl@lindesay.co.nz>. 3 * All rights reserved. Distributed under the terms of the MIT License. 4 */ 5 #ifndef POPULATE_PKG_USER_RATINGS_FROM_SERVER_PROCESS__H 6 #define POPULATE_PKG_USER_RATINGS_FROM_SERVER_PROCESS__H 7 8 9 #include "AbstractProcess.h" 10 11 #include "Model.h" 12 #include "PackageInfo.h" 13 14 #include <File.h> 15 #include <Path.h> 16 #include <String.h> 17 #include <Url.h> 18 19 #include <package/RepositoryCache.h> 20 21 22 class PkgDataLoadState; 23 24 25 /*! This process will invoke API calls onto the HaikuDepotServer system in order 26 to extract user rating data about the nominated package. 27 */ 28 29 class PopulatePkgUserRatingsFromServerProcess : public AbstractProcess 30 { 31 public: 32 PopulatePkgUserRatingsFromServerProcess(PackageInfoRef packageInfo, 33 Model *model); 34 virtual ~PopulatePkgUserRatingsFromServerProcess(); 35 36 const char* Name() const; 37 const char* Description() const; 38 39 protected: 40 virtual status_t RunInternal(); 41 42 private: 43 Model* fModel; 44 PackageInfoRef fPackageInfo; 45 }; 46 47 #endif // POPULATE_PKG_USER_RATINGS_FROM_SERVER_PROCESS__H 48