From 9103eb85c54b1d3266576e545caf15d984b4fe13 Mon Sep 17 00:00:00 2001 From: WonYoung Choi Date: Mon, 11 May 2015 20:40:06 +0900 Subject: [PATCH] Fix bug of GetRuntimeVariable() Change-Id: Ibe1928c79c1571866847c7bbf912a2703d0ca668 --- src/extension/extension_server.cc | 15 ++++++++------- src/runtime/web_application.cc | 13 ++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/extension/extension_server.cc b/src/extension/extension_server.cc index c2305c3..77c28bd 100644 --- a/src/extension/extension_server.cc +++ b/src/extension/extension_server.cc @@ -66,6 +66,13 @@ bool ExtensionServer::Start() { } bool ExtensionServer::Start(const StringVector& paths) { + // Connect to DBusServer for Application of Runtime + if (!dbus_application_client_.ConnectByName( + app_uuid_ + "." + std::string(kDBusNameForApplication))) { + LOGGER(ERROR) << "Failed to connect to the dbus server for Application."; + return false; + } + // Register system extensions to support Tizen Device APIs RegisterSystemExtensions(); @@ -76,13 +83,6 @@ bool ExtensionServer::Start(const StringVector& paths) { } } - // Connect to DBusServer for Application of Runtime - if (!dbus_application_client_.ConnectByName( - app_uuid_ + "." + std::string(kDBusNameForApplication))) { - LOGGER(ERROR) << "Failed to connect to the dbus server for Application."; - return false; - } - // Start DBusServer using std::placeholders::_1; using std::placeholders::_2; @@ -102,6 +102,7 @@ bool ExtensionServer::Start(const StringVector& paths) { void ExtensionServer::RegisterExtension(const std::string& path) { Extension* ext = new Extension(path, this); + LOGGER(DEBUG) << "Register " << path; if (!ext->Initialize() || !RegisterSymbols(ext)) { delete ext; return; diff --git a/src/runtime/web_application.cc b/src/runtime/web_application.cc index baf6b3e..bfbcc3d 100755 --- a/src/runtime/web_application.cc +++ b/src/runtime/web_application.cc @@ -277,9 +277,9 @@ void WebApplication::Launch(std::unique_ptr appcontrol) { // application instead of widget_id. // Currently, uuid is passed as encoded_bundle argument temporarily. // ewk_send_widget_info(ewk_context_, 1, - // elm_config_scale_get(), - // elm_theme_get(NULL), - // uuid_.c_str()); + // elm_config_scale_get(), + // elm_theme_get(NULL), + // app_uuid_.c_str()); std::unique_ptr res = resource_manager_->GetStartResource(appcontrol.get()); @@ -638,9 +638,7 @@ void WebApplication::HandleDBusMethod(GDBusConnection* /*connection*/, GVariant* parameters, GDBusMethodInvocation* invocation) { if (method_name == kMethodNotifyEPCreated) { - // TODO(wy80.choi): send signal to injected bundle to make connection - // between injected bundle and extension process - LOGGER(DEBUG) << "Call!!!! NotifyEPCreated!"; + LOGGER(DEBUG) << "Received 'NotifyEPCreated' from ExtensionServer."; } else if (method_name == kMethodGetRuntimeVariable) { gchar* key; std::string value; @@ -648,7 +646,8 @@ void WebApplication::HandleDBusMethod(GDBusConnection* /*connection*/, if (g_strcmp0(key, "runtime_name") == 0) { value = std::string("wrt"); } else if (g_strcmp0(key, "app_id") == 0) { - value = appid_; + // TODO(wy80.choi): TEC requries double quotes, but webapi-plugins is not. + value = "\"" + appid_ + "\""; } else if (g_strcmp0(key, "encoded_bundle") == 0) { value = received_appcontrol_->encoded_bundle(); } -- 2.7.4