Export definition of ObjectFactory and PropertyFetcher
They are dependencies of VintfObject and thus should
be public.
Test: builds
Bug: 118634720
Change-Id: I36912f7e3b05f2dc58a9f57845fc3bda6c5d6359
diff --git a/utils.h b/utils.h
index f8cc9cd..dccc811 100644
--- a/utils.h
+++ b/utils.h
@@ -22,6 +22,7 @@
#include <utils/Errors.h>
#include <vintf/FileSystem.h>
+#include <vintf/PropertyFetcher.h>
#include <vintf/RuntimeInfo.h>
#include <vintf/parse_xml.h>
@@ -49,13 +50,6 @@
return OK;
}
-template <typename T>
-class ObjectFactory {
- public:
- virtual ~ObjectFactory() = default;
- virtual std::shared_ptr<T> make_shared() const { return std::make_shared<T>(); }
-};
-
// TODO(b/70628538): Do not infer from Shipping API level.
inline Level convertFromApiLevel(size_t apiLevel) {
if (apiLevel < 26) {
@@ -69,16 +63,6 @@
}
}
-class PropertyFetcher {
- public:
- virtual ~PropertyFetcher() = default;
- virtual std::string getProperty(const std::string& key,
- const std::string& defaultValue = "") const = 0;
- virtual uint64_t getUintProperty(const std::string& key, uint64_t defaultValue,
- uint64_t max = UINT64_MAX) const = 0;
- virtual bool getBoolProperty(const std::string& key, bool defaultValue) const = 0;
-};
-
class PropertyFetcherImpl : public PropertyFetcher {
public:
virtual std::string getProperty(const std::string& key,