#ifndef AAPT_MANIFEST_MERGER_H #define AAPT_MANIFEST_MERGER_H #include "Logger.h" #include "Source.h" #include "XmlDom.h" #include #include namespace aapt { class ManifestMerger { public: struct Options { }; ManifestMerger(const Options& options); bool setAppManifest(const Source& source, const std::u16string& package, std::unique_ptr root); bool mergeLibraryManifest(const Source& source, const std::u16string& package, std::unique_ptr libRoot); xml::Node* getMergedXml(); bool printMerged(); private: bool mergeNewOrEqual(xml::Element* parentA, xml::Element* elA, xml::Element* elB); bool mergePreferRequired(xml::Element* parentA, xml::Element* elA, xml::Element* elB); bool checkEqual(xml::Element* elA, xml::Element* elB); bool mergeApplication(xml::Element* applicationA, xml::Element* applicationB); bool mergeUsesSdk(xml::Element* elA, xml::Element* elB); Options mOptions; std::unique_ptr mRoot; SourceLogger mAppLogger; SourceLogger mLogger; }; } // namespace aapt #endif // AAPT_MANIFEST_MERGER_H