X-Git-Url: https://git.saurik.com/android/aapt.git/blobdiff_plain/7648681357a841c6af59c5ce38e1656842e7d9ac..681e0c62435715da0dde10840e2fce4ebed23aed:/ResourceTable.h diff --git a/ResourceTable.h b/ResourceTable.h index 74ba326..caa01b3 100644 --- a/ResourceTable.h +++ b/ResourceTable.h @@ -15,6 +15,7 @@ using namespace std; +class XMLNode; class ResourceTable; enum { @@ -34,6 +35,12 @@ status_t compileXmlFile(const sp& assets, ResourceTable* table, int options = XML_COMPILE_STANDARD_RESOURCE); +status_t compileXmlFile(const sp& assets, + const sp& xmlTree, + const sp& target, + ResourceTable* table, + int options = XML_COMPILE_STANDARD_RESOURCE); + status_t compileResourceFile(Bundle* bundle, const sp& assets, const sp& in, @@ -89,6 +96,7 @@ public: const String16& name, const String16& bagParent, const ResTable_config* params = NULL, + bool overlay = false, bool replace = false, bool isId = false); @@ -124,6 +132,9 @@ public: const String16& name, const String16& comment); + void canAddEntry(const SourcePos& pos, + const String16& package, const String16& type, const String16& name); + size_t size() const; size_t numLocalResources() const; bool hasResources() const; @@ -405,12 +416,15 @@ public: status_t addPublic(const SourcePos& pos, const String16& name, const uint32_t ident); - + + void canAddEntry(const String16& name); + String16 getName() const { return mName; } sp getEntry(const String16& entry, const SourcePos& pos, const ResTable_config* config = NULL, - bool doSetIndex = false); + bool doSetIndex = false, + bool overlay = false); const SourcePos& getFirstPublicSourcePos() const { return *mFirstPublicSourcePos; } @@ -426,6 +440,8 @@ public: const DefaultKeyedVector >& getConfigs() const { return mConfigs; } const Vector >& getOrderedConfigs() const { return mOrderedConfigs; } + const SortedVector& getCanAddEntries() const { return mCanAddEntries; } + const SourcePos& getPos() const { return mPos; } private: String16 mName; @@ -434,6 +450,7 @@ public: SortedVector mUniqueConfigs; DefaultKeyedVector > mConfigs; Vector > mOrderedConfigs; + SortedVector mCanAddEntries; int32_t mPublicIndex; int32_t mIndex; SourcePos mPos; @@ -494,6 +511,7 @@ private: const String16& type, const String16& name, const SourcePos& pos, + bool overlay, const ResTable_config* config = NULL, bool doSetIndex = false); sp getEntry(uint32_t resID,