| 1 |
|
| 2 |
|
| 3 |
|
| 4 |
|
| 5 |
|
| 6 |
|
| 7 |
|
| 8 |
|
| 9 |
|
| 10 |
|
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
|
| 16 |
|
| 17 |
#ifndef AAPT_FORMAT_PROTO_PROTODESERIALIZE_H |
| 18 |
#define AAPT_FORMAT_PROTO_PROTODESERIALIZE_H |
| 19 |
|
| 20 |
#include "android-base/macros.h" |
| 21 |
#include "androidfw/ConfigDescription.h" |
| 22 |
#include "androidfw/ResourceTypes.h" |
| 23 |
|
| 24 |
#include "Configuration.pb.h" |
| 25 |
#include "ResourceTable.h" |
| 26 |
#include "ResourceValues.h" |
| 27 |
#include "Resources.pb.h" |
| 28 |
#include "ResourcesInternal.pb.h" |
| 29 |
#include "StringPool.h" |
| 30 |
#include "io/File.h" |
| 31 |
#include "xml/XmlDom.h" |
| 32 |
|
| 33 |
namespace aapt { |
| 34 |
|
| 35 |
std::unique_ptr<Value> DeserializeValueFromPb(const pb::Value& pb_value, |
| 36 |
const android::ResStringPool& src_pool, |
| 37 |
const android::ConfigDescription& config, |
| 38 |
StringPool* value_pool, io::IFileCollection* files, |
| 39 |
std::string* out_error); |
| 40 |
|
| 41 |
std::unique_ptr<Item> DeserializeItemFromPb(const pb::Item& pb_item, |
| 42 |
const android::ResStringPool& src_pool, |
| 43 |
const android::ConfigDescription& config, |
| 44 |
StringPool* value_pool, io::IFileCollection* files, |
| 45 |
std::string* out_error); |
| 46 |
|
| 47 |
std::unique_ptr<xml::XmlResource> DeserializeXmlResourceFromPb(const pb::XmlNode& pb_node, |
| 48 |
std::string* out_error); |
| 49 |
|
| 50 |
bool DeserializeXmlFromPb(const pb::XmlNode& pb_node, xml::Element* out_el, StringPool* value_pool, |
| 51 |
std::string* out_error); |
| 52 |
|
| 53 |
bool DeserializeConfigFromPb(const pb::Configuration& pb_config, |
| 54 |
android::ConfigDescription* out_config, std::string* out_error); |
| 55 |
|
| 56 |
|
| 57 |
bool DeserializeTableFromPb(const pb::ResourceTable& pb_table, io::IFileCollection* files, |
| 58 |
ResourceTable* out_table, std::string* out_error); |
| 59 |
|
| 60 |
bool DeserializeCompiledFileFromPb(const pb::internal::CompiledFile& pb_file, |
| 61 |
ResourceFile* out_file, std::string* out_error); |
| 62 |
|
| 63 |
} |
| 64 |
|
| 65 |
#endif |