LOG(DEBUG) << "Icon was not found in package";
}
+ for (image_x* image : GListRange<image_x*>(app->image)) {
+ xmlTextWriterStartElement(writer, BAD_CAST "image");
+ xmlTextWriterWriteAttribute(writer, BAD_CAST "name",
+ BAD_CAST image->name);
+ if (image->lang) {
+ xmlTextWriterWriteAttribute(writer, BAD_CAST "xml:lang",
+ BAD_CAST image->lang);
+ }
+ xmlTextWriterEndElement(writer);
+ }
+
for (appcontrol_x* appc : GListRange<appcontrol_x*>(app->appcontrol)) {
xmlTextWriterStartElement(writer, BAD_CAST "app-control");
manifest->installlocation = strdup(pkg_info->install_location().c_str());
manifest->api_version = strdup(pkg_info->api_version().c_str());
+ for (auto& pair : pkg_info->labels()) {
+ label_x* label = reinterpret_cast<label_x*>(calloc(1, sizeof(label_x)));
+ if (!pair.first.empty())
+ label->lang = strdup(pair.first.c_str());
+ label->name = strdup(pair.second.c_str());
+ manifest->label = g_list_append(manifest->label, label);
+ }
+
std::shared_ptr<const ProfileInfo> profile_info =
std::static_pointer_cast<const ProfileInfo>(
parser_->GetManifestData(ProfileInfo::Key()));
return false;
if (!FillLabel(ui_app, application.label))
return false;
+ if (!FillImage(ui_app, application.app_images))
+ return false;
if (!FillMetadata(ui_app, application.meta_data))
return false;
}
return true;
}
+bool StepParse::FillImage(application_x* app,
+ const tpk::parse::ApplicationImagesInfo& image_list) {
+ for (auto& app_image : image_list.images) {
+ image_x* image =
+ static_cast<image_x*>(calloc(1, sizeof(image_x)));
+ image->name = strdup(app_image.name().c_str());
+ std::string lang = app_image.lang();
+ if (!lang.empty())
+ image->lang = strdup(lang.c_str());
+ app->image = g_list_append(app->image, image);
+ }
+ return true;
+}
+
bool StepParse::FillAccounts() {
std::shared_ptr<const AccountInfo> account_info =
std::static_pointer_cast<const AccountInfo>(parser_->GetManifestData(
#include <boost/filesystem.hpp>
#include <tpk_manifest_handlers/privileges_handler.h>
#include <tpk_manifest_handlers/tpk_config_parser.h>
+#include <tpk_manifest_handlers/ui_and_service_application_infos.h>
#include <memory>
#include <set>
bool FillLabel(application_x* manifest, const T& label_list);
template <typename T>
bool FillMetadata(application_x* manifest, const T& meta_data_list);
+ bool FillImage(application_x* app,
+ const tpk::parse::ApplicationImagesInfo& label_list);
bool FillAccounts();
bool FillShortcuts();
bool FillManifestX(manifest_x* manifest);