return true;
}
+bool StepParse::AllServiceAppGlobal() {
+ auto service_list =
+ GetManifestDataForKey<const wgt::parse::ServiceList>(
+ app_keys::kTizenServiceKey);
+ if (!service_list) {
+ LOG(ERROR) << "service app list empty";
+ return false;
+ }
+ bool all_service_app_global = true;
+ for (const auto& service_info : service_list->services) {
+ if (service_info.type() != "global") {
+ all_service_app_global = false;
+ break;
+ }
+ }
+
+ if (!all_service_app_global) {
+ LOG(ERROR) << "All service app types are not global";
+ return false;
+ }
+
+ return true;
+}
+
bool StepParse::FillMainApplicationInfo(manifest_x* manifest) {
auto app_info =
GetManifestDataForKey<const wgt::parse::TizenApplicationInfo>(
app_keys::kTizenApplicationKey);
if (!app_info.get())
return true;
+
+ if (app_info.get()->id().empty()) {
+ if (!AllServiceAppGlobal()) {
+ LOG(ERROR) << "Empty of ui app's id is possible"
+ << " when service app types are all global";
+ return false;
+ }
+ if (app_info->package().empty()) {
+ LOG(ERROR) << "app_info's package is empty";
+ return false;
+ }
+ manifest->package = strdup(app_info->package().c_str());
+ return true;
+ }
+
bool has_watch_category = false;
bool has_ime = false;
bool has_downloadable_font = false;
application->metadata = g_list_append(application->metadata, item);
}
+ if (!manifest->mainapp_id)
+ manifest->mainapp_id = strdup(application->appid);
manifest->application = g_list_append(manifest->application, application);
}
return true;