1 // Copyright (c) 2015 Samsung Electronics Co., Ltd All Rights Reserved
3 #ifndef COMMON_APP_QUERY_INTERFACE_H_
4 #define COMMON_APP_QUERY_INTERFACE_H_
11 namespace common_installer {
15 * \brief Base interface for some helper functionalities used before
16 * configuring app-installer steps.
17 * Eg. it is used to check, if package is to be installed or updated
19 class AppQueryInterface {
21 /** virtual destructor (for inheritance) */
22 virtual ~AppQueryInterface() { }
25 * \brief method for checking if package is installed based
28 * \return true if package is installed
30 bool IsPkgInstalled(const std::string& arg, uid_t uid) const;
33 * \brief method for getting package id from package file
37 std::string GetPkgId(const std::string& arg) const;
40 virtual std::filesystem::path ExtractManifest(
41 const std::string& from) const;
42 virtual bool ClearTemporaryFile(const std::filesystem::path& path) const;
45 virtual std::string GetPkgIdFromPath(const std::string& path) const = 0;
46 virtual std::string GetManifestFileName() const = 0;
49 } // namespace common_installer
51 #endif // COMMON_APP_QUERY_INTERFACE_H_